-
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
Parameterize ObjectSelector for VPA webhook #6558
Comments
Hey @jackjii79 thanks for the feature request! As you correctly identified, there's a similar request open already, which has a bit more details on the desired use-case. Thanks! |
Thanks @voelzmo to your follow up. I want this feature because since admission controller support self-registry mutatingwebhookconfiguration, then it should allow to intercept resource request on finer degree because our internal cloud has a very strict regulation where we want to minimize the potential impact of VPA on cluster level. A concrete use case is we have a centralized provisioning service which will be responsible for creating/updating/deleting on-demand workload resource requests (statefulset, deployments, etc) to do certain tasks and all created resources are limited onto a single namespace and we want to utilize VPA to optimize operational cost, all created resources comes with a common set of labels in the same namespace which i want to customize the webhook to only intercept given set of resources in admission controller.
VPA is only gonna be used for ad-hoc resources managed by provisioning service so we want to be able to control what resource requests will be intercepted by the webhook service. The current workaround is to disallow self registry but since admission control do support creating mutation webhook then it makes this feature relevant. FYI, there is another requests i created which outlines a higher level motivation #6568 |
The discussion in #6232 is about better controlling the list of namespaces that the VPA should not operate in. Given the context of previous discussions we had about exposing a |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/area vertical-pod-autoscaler |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Which component are you using?:
vertical-pod-autoscaler - admission-controller
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
The MutatingAdmissionWebhook configuration supports ObjectSelector to select what resources should be sent to the webhook endpoint. This definition allow users to have a finer control over which resources should be selected.
What is missing is the ability to specify the selectors in admission controller when creating the MutatingWebhookConfiguration. There does not appear to be a way to specify what pods should be selected by the VPA webhook.
In practice, the scope of resources intercepted by mutating webhook should be limited to the minimal necessary set of resources, currently all pod creation requests will be intercepted.
Ideally a cluster admin could configure the admission control to ensure webhook only select certain resources. The only option right now is all pods get created expected to be in the cluster and admission control will find the pods where there exists matching VPA.
Describe the solution you'd like.:
Expose new parameters to
--object-selector="{ 'matchExpressions': [ { 'key': 'runlevel', 'operator': 'NotIn', 'values': [ '0', '1' ] } ] }"
Describe any alternative solutions you've considered.:
--namespace-selector
could serve similar purpose on namespace level.Additional context.:
There has one similar request #6232
The text was updated successfully, but these errors were encountered: