Skip to content

VPA: Skip minReplicas check when in-place-skip-disruption-budget is enabled#9180

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
adrianmoisey:adrian-skip-minreplicas
Feb 10, 2026
Merged

VPA: Skip minReplicas check when in-place-skip-disruption-budget is enabled#9180
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
adrianmoisey:adrian-skip-minreplicas

Conversation

@adrianmoisey
Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

When a user specifies --in-place-skip-disruption-budget, also skip the min replicas check.
This was missed in #8987

Which issue(s) this PR fixes:

Fixes #9157

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. do-not-merge/needs-area Indicates that a PR should not merge because it lacks an area label. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/vertical-pod-autoscaler Issues or PRs related to the Vertical Pod Autoscaler component labels Feb 4, 2026
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 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 Feb 4, 2026
Copy link
Copy Markdown
Member

@omerap12 omerap12 left a comment

Choose a reason for hiding this comment

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

/hold
/lgtm
/assign @maxcao13

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2026
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2026
Comment on lines +221 to +222
if !skipReplicaCheck {
klog.V(2).InfoS("Too few replicas", "kind", creator.Kind, "object", klog.KRef(creator.Namespace, creator.Name), "livePods", actual, "requiredPods", required, "globalMinReplicas", f.minReplicas)
Copy link
Copy Markdown
Member

@maxcao13 maxcao13 Feb 5, 2026

Choose a reason for hiding this comment

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

Wondering what should happen if we fall back to recreate here, would we be bypassing the minReplicas check? And I guess, are we okay with that?

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.

Yeah, good catch. Let me figure out how to avoid that

Comment on lines +214 to +215
usingInPlaceOrRecreate := vpa_api_util.GetUpdateMode(vpa) == vpa_types.UpdateModeInPlaceOrRecreate
skipReplicaCheck := usingInPlaceOrRecreate && f.inPlaceSkipDisruptionBudget
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.

Can we have a TODO to insert InPlaceOnly when we have that done?

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.

+1

@adrianmoisey adrianmoisey force-pushed the adrian-skip-minreplicas branch from 9d6c7a6 to e47e655 Compare February 7, 2026 12:11
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2026
Copy link
Copy Markdown
Member

@omerap12 omerap12 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 10, 2026
Copy link
Copy Markdown
Member

@maxcao13 maxcao13 left a comment

Choose a reason for hiding this comment

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

/lgtm
thanks!

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianmoisey, maxcao13

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

@omerap12
Copy link
Copy Markdown
Member

@adrianmoisey feel free to unhold.

@adrianmoisey
Copy link
Copy Markdown
Member Author

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 10, 2026
@k8s-ci-robot k8s-ci-robot merged commit bd02f22 into kubernetes:master Feb 10, 2026
13 checks passed
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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VPA] Allow in-place updates when replica group is below minReplicas (InPlaceOrRecreate); block eviction fallback

4 participants