Skip to content

Add --in-place-skip-disruption-budget flag#8987

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
omerap12:issue-8980
Jan 13, 2026
Merged

Add --in-place-skip-disruption-budget flag#8987
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
omerap12:issue-8980

Conversation

@omerap12
Copy link
Copy Markdown
Member

@omerap12 omerap12 commented Jan 1, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

Adds --in-place-skip-disruption-budget flag 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?

Adds --in-place-skip-disruption-budget flag that skips disruption budget checks for in-place pod updates when all containers have NotRequired resize policy

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area Indicates that a PR should not merge because it lacks an area label. area/vertical-pod-autoscaler Issues or PRs related to the Vertical Pod Autoscaler component labels Jan 1, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 1, 2026
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed do-not-merge/needs-area Indicates that a PR should not merge because it lacks an area label. labels Jan 1, 2026
@omerap12
Copy link
Copy Markdown
Member Author

omerap12 commented Jan 1, 2026

/cc @maxcao13 @adrianmoisey

Comment thread vertical-pod-autoscaler/pkg/utils/test/test_pod.go Outdated
Comment thread vertical-pod-autoscaler/pkg/updater/main.go
Comment thread vertical-pod-autoscaler/pkg/updater/utils/pod.go
@omerap12 omerap12 force-pushed the issue-8980 branch 3 times, most recently from 3f857bf to 73e666f Compare January 4, 2026 13:57
Comment thread vertical-pod-autoscaler/docs/flags.md Outdated
| `eviction-tolerance` | float | 0.5 | Fraction of replica count that can be evicted for update, if more than one pod can be evicted. |
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (BETA - default=true)<br>PerVPAConfig=true\|false (ALPHA - default=false) |
| `ignored-vpa-object-namespaces` | string | | A comma-separated list of namespaces to ignore when searching for VPA objects. Leave empty to avoid ignoring any namespaces. These namespaces will not be cleaned by the garbage collector. |
| `in-place-skip-disruption-budget` | | | If true, VPA updater skips disruption budget checks for in-place pod updates when all containers have NotRequired resize policy (or no policy defined) for both CPU and memory resources. Disruption budgets are still respected when any container has RestartContainer resize policy for any resource. |
Copy link
Copy Markdown
Member

@maxcao13 maxcao13 Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question I'm not advocating for this, but would we ever consider this to be defaulted to on? InPlaceOrRecreate is still considered beta after all (I know we are impending 1.6.0), or is that too risky and/or would users not prefer this to be a defaulted option?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize we spoke about this in the other issue and mentioned that this flag would have an alpha and beta phase: #8818 (comment)

If we are not feature-gating this, should we indicate the current state of phases in the flag description?

Copy link
Copy Markdown
Member

@adrianmoisey adrianmoisey Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question I'm not advocating for this, but would we ever consider this to be defaulted to on?

I kinda like it defaulting to "on"

InPlaceOrRecreate is still considered beta after all (I know we are impending 1.6.0), or is that too risky and/or would users not prefer this to be a defaulted option?

Hmmm, since it's still in beta, may be we can make this change? We could delay the GA of InPlaceOrRecreate by a release.

Another option is to not default it to "on" in the VPA, but default it to "on" in the helm chart.

EDIT: thinking about it a little more, an inlace resize is still not a 100% safe operation. There's that edge case scenario where resizing RAM limits down could cause OOM. Since the VPA has historically put effort into protecting workloads by default, may be this should default to "off"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be on by default, as Adrian said inlace resize is still not a 100% safe operation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the description to include the the current state of the flag.

@adrianmoisey
Copy link
Copy Markdown
Member

I was wondering if https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/docs/features.md#in-place-updates-inplaceorrecreate also needs to be updated. There's a sentence "Updates still respect VPA's standard update conditions and timing restrictions" in there, that I think is implying that PDBs are respected, may be that needs some fleshing out and a reference to this new flag?

@omerap12
Copy link
Copy Markdown
Member Author

omerap12 commented Jan 7, 2026

I was wondering if https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/docs/features.md#in-place-updates-inplaceorrecreate also needs to be updated. There's a sentence "Updates still respect VPA's standard update conditions and timing restrictions" in there, that I think is implying that PDBs are respected, may be that needs some fleshing out and a reference to this new flag?

Yeah. it should be updated. will fix that

Signed-off-by: Omer Aplatony <omerap12@gmail.com>
@adrianmoisey
Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/vertical-pod-autoscaler Issues or PRs related to the Vertical Pod Autoscaler component cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VPA - Relax pod disruption budget logic for in-place updates when container resize policy is NotRequired

4 participants