VPA: Skip minReplicas check when in-place-skip-disruption-budget is enabled#9180
Conversation
| 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Yeah, good catch. Let me figure out how to avoid that
| usingInPlaceOrRecreate := vpa_api_util.GetUpdateMode(vpa) == vpa_types.UpdateModeInPlaceOrRecreate | ||
| skipReplicaCheck := usingInPlaceOrRecreate && f.inPlaceSkipDisruptionBudget |
There was a problem hiding this comment.
Can we have a TODO to insert InPlaceOnly when we have that done?
9d6c7a6 to
e47e655
Compare
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@adrianmoisey feel free to unhold. |
|
/unhold |
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?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: