-
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
VPA: Support vertical scaling of injected containers #5617
Comments
Hey @jutley, thanks for the detailed description of what you're trying to achieve! While I'm not exactly sure, why the feature to ignore injected sidecar containers was introduced in the first place, I'm sure there was a good reason for it. @jbartosik @krzysied, can you maybe remember more context about why calculating recommendations for injected sidecars can be problematic? That being said, I think it should be possible to
If there's no general case to be made why we shouldn't update sidecar container resources at all, I think we can add something like sketched out above, WDYT @jbartosik? |
The reason for #2795 (VPA ignoring injected sidecars) is that some sidecars might be injected by webhooks acting after VPA admission controller. This is a problem because in that case VPA admission controller won't change requests of the injected side car. So when the pod starts VPA will evict the pod (because the injected side car has unadjusted request), causing an eviction loop. I have a few ideas for how to handle this:
EDIT:
|
That reasoning makes a lot of sense. The I can't find any reference to when this feature graduated from beta to GA, but the official docs on admission controllers reference this feature without any mention of it being in beta. I think it is reasonable to assume that it is GA. |
For reference, it looks like |
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 |
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 |
/remove-lifecycle rotten This is still a thing. My understanding is that we should offer a switch to the admission-controller to disable adding the @jutley On a sidenote: I think you can achieve the desired behavior already now, if you ensure that the vpa webhook will be called after the webhook that injects the container. This way, the container will be part of the Currently, the advice is the exact opposite to your situation: we want people to make sure that the vpa webhook is executed before all injecting webhooks, such that the feature of ignoring injected sidecars works properly. |
Which component are you using?:
Vertical Pod Autoscaler
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
There are scenarios where we inject sidecar containers into many pods. There is not a one-size-fits-all resource allocation for these pods, so I really want to be able to start with a generic value, and then use a VPA to tune these to a more appropriate value for the workload. Currently, injected containers seem to be entirely ignored, and there is no way to explicit ask for them to be configured.
Describe the solution you'd like.:
I would like to be able to configure either the VPA pods or the VPA resources in a way that allows us to include these injected containers in the VPA scaling process. I think the best option may be in the VPA pods. Since container injection is generally a cluster-admin responsibility, it makes sense that we would want to introduce this configuration at a level maintained by cluster admins.
I can imagine a new flag being introduced for the recommender like
--injected-sidecar-allowlist
which enumerates the container names which we want to support VPA scaling for.Describe any alternative solutions you've considered.:
We can augment the logic of our container injections to try to set more appropriate values for their resources, but this is very hard! After all, this is the point of the VPA existing in the first place.
The text was updated successfully, but these errors were encountered: