-
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
Wrong VPA is attempting to update pod resources and failing #7499
Comments
/area vertical-pod-autoscaler |
I believe this issue would happen with the VPA deployed from OSS as well. The way VPA knows which pods to target is that it will fetch the CronJob object: And it fetches the From your example above, you are not setting any labels in your So now the two VPAs are essentially racing and competing against each-other. To fix this, you'll need to set some labels in your two CronJob templates to make sure you are differentiating them from each-other. Hope that helps :) |
@raywainman Yep, that seems to be the issue! In the real environment where we were doing experimentation, the Not sure if y'all are considering this a bug, though. If not, at a minimum it would be helpful if this behavior was documented somewhere clearly so that it doesn't confuse others in the same way. |
That's a great idea, it's an easy pitfall. I thought we had something documenting this but I actually couldn't find anything. Let me see if I can put together a PR with this. Thanks @WesCossick! |
Which component are you using?:
vertical-pod-autoscaler
What version of the component are you using?:
Component version: Not sure; using the one auto-installed by GKE.
What k8s version are you using (
kubectl version
)?:kubectl version
OutputWhat environment is this in?:
Google Cloud Platform's GKE.
What did you expect to happen?:
For the resources to be updated by the correct VPA.
What happened instead?:
The wrong VPA is updating pod resources and failing.
How to reproduce it (as minimally and precisely as possible):
Create the following two VPAs:
Create the following two CronJobs:
Using
describe pod
, see the following annotations on one of the cronjob's pods:When this happens, the other cronjob's pods look correct and have their CPU and memory correctly set by the VPA:
Which one is mixed up changes based on the order in which you create the VPAs it seems.
Anything else we need to know?:
I pared down the two
CronJob
resources to simplify them.The text was updated successfully, but these errors were encountered: