Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vm webhook limits #477

Merged
merged 15 commits into from
Oct 17, 2023
Merged

Conversation

rajivnathan
Copy link
Contributor

@rajivnathan rajivnathan commented Oct 4, 2023

@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Merging #477 (26cd6d6) into master (fdca75c) will increase coverage by 0.04%.
The diff coverage is 78.94%.

@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
+ Coverage   82.29%   82.34%   +0.04%     
==========================================
  Files          28       30       +2     
  Lines        3101     3160      +59     
==========================================
+ Hits         2552     2602      +50     
- Misses        419      426       +7     
- Partials      130      132       +2     
Files Coverage Δ
pkg/webhook/mutatingwebhook/userpods_mutate.go 87.09% <87.09%> (ø)
pkg/webhook/mutatingwebhook/mutate.go 66.66% <53.84%> (-5.96%) ⬇️
pkg/webhook/mutatingwebhook/vm_mutate.go 80.00% <80.00%> (ø)

Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

deploy/webhook/member-operator-webhook.yaml Show resolved Hide resolved
pkg/webhook/mutatingwebhook/vm_mutate.go Show resolved Hide resolved
Copy link
Contributor

@alexeykazakov alexeykazakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Looking forward to advanced e2e-tests though and also your ideas around how we can mitigate our risks of undetected braking CNV API changes... I don't have much to suggest :(

@rajivnathan rajivnathan marked this pull request as ready for review October 12, 2023 16:33
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
9.9% 9.9% Duplication

@openshift-ci
Copy link

openshift-ci bot commented Oct 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, rajivnathan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rajivnathan rajivnathan merged commit a142fe4 into codeready-toolchain:master Oct 17, 2023
9 of 10 checks passed
// This should be removed once https://issues.redhat.com/browse/CNV-32069 is complete.
func ensureLimits(unstructuredObj *unstructured.Unstructured, patchItems []map[string]interface{}) []map[string]interface{} {

requests, reqFound, err := unstructured.NestedStringMap(unstructuredObj.Object, "spec", "template", "spec", "domain", "resources", "requests")
Copy link
Contributor

@MatousJobanek MatousJobanek Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about this unstructured.NestedStringMap function, it does exactly what we need 🎉.
It's really neat 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants