-
Notifications
You must be signed in to change notification settings - Fork 4k
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
David.benque/prevent empty resource propagation upstream 2 #6062
David.benque/prevent empty resource propagation upstream 2 #6062
Conversation
…recommendation/recommendation_provider_test.go Co-authored-by: Joachim <[email protected]>
@jbartosik, Sorry for moving this here (new PR), but I preferred to restart from a clean codebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dbenque, mwielgus 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 |
Which component this PR applies to?
vertical-pod-autoscaler/admission-controller
What type of PR is this?
/kind bug
What this PR does / why we need it:
Using external recommender that was coming with a bug, we ended up with a VPA object that was presenting a recommendation for a resource that has an empty name:
In this PR we are proposing to sanitise the recommendation by removing any resource key that would be empty so that the admission is not pushing "garbage" to the pods.
Possible extension: instead of purging empty key, we could have a list of allowed resourceName given as input parameter of the admission. This would also allow us to purge unknown resource or the one coming with typo.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
If a recommendation comes with a resource key that is empty, this resource will be ignored in the admission-controller.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: