-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Add --in-place-skip-disruption-budget flag #8987
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: omerap12 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| return &r | ||
| } | ||
|
|
||
| func (pb *podBuilderImpl) WithContainerResizePolicy(containerName string, resizePolicy []apiv1.ContainerResizePolicy) PodBuilder { |
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.
Does it not make sense to add this to the containerBuilder struct?
Somewhere here: https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/utils/test/test_container.go
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.
I actually started adding this to the containerBuilder struct, but then I thought it might be unnecessary in the future. That said, since you mentioned it, it probably does make sense to include it.
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.
Yeah, makes much more sense. done :)
| inPlaceSkipDisruptionBudget = flag.Bool( | ||
| "in-place-skip-disruption-budget", | ||
| false, | ||
| "If true, VPA updater skips disruption budget checks for in-place pod updates when all containers have NotRequired resize policy or no policy. "+ | ||
| "Disruption budgets are still respected when any container has RestartContainer resize policy.", | ||
| ) | ||
|
|
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.
I think we might have to say that it only skips if all containers have NotRequired for both cpu and memory resources as well.
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.
Agree. will fix
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.
Done
| // TODO(omerap12): do we want to check here for InitContainers/InitContainers+restartPolicy Always/ | ||
| // Also check init containers if they can be resized |
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.
What's the reason to specially handle this?
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.
Currently the VPA does not support native sidecar (ref: #7229) so in the current implementation I am not checking those
00d9e72 to
3f857bf
Compare
Signed-off-by: Omer Aplatony <[email protected]>
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds
--in-place-skip-disruption-budgetflag that skips disruption budget checks for in-place pod updates when all containers have NotRequired resize policy. This allows non-disruptive in-place updates to proceed without being throttled by eviction tolerance, while still respecting disruption budgets for RestartContainer resize policy.Which issue(s) this PR fixes:
Fixes #8980
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: