Skip to content

Conversation

@omerap12
Copy link
Member

@omerap12 omerap12 commented Dec 4, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

VPA InPlace updateMode support.

Which issue(s) this PR fixes:

Fixes #8720

Special notes for your reviewer:

Does this PR introduce a user-facing change?

The VPA support InPlace update mode. VPA will not evict any pods and only try to resize pods inplace.

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

AEP: https://github.com/kubernetes/autoscaler/pull/8818

Signed-off-by: Omer Aplatony <[email protected]>
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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. do-not-merge/needs-area cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 4, 2025
@k8s-ci-robot
Copy link
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

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 Dec 4, 2025
@k8s-ci-robot k8s-ci-robot added area/vertical-pod-autoscaler kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-area labels Dec 4, 2025
Signed-off-by: Omer Aplatony <[email protected]>
@omerap12
Copy link
Member Author

omerap12 commented Dec 6, 2025

This is a draft since we need the AEP to be merged first.
/cc @adrianmoisey @maxcao13

@k8s-ci-robot k8s-ci-robot requested a review from maxcao13 December 6, 2025 17:40
Signed-off-by: Omer Aplatony <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 6, 2025
return podList
}

func setupPodsForInPlaceMode(f *framework.Framework, hamsterCPU, hamsterMemory string, withRecommendation bool) *apiv1.PodList {
Copy link
Contributor

Choose a reason for hiding this comment

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

This function is unused

Comment on lines +382 to +384
WithTarget(containerName, "200m").
WithLowerBound(containerName, "200m").
WithUpperBound(containerName, "200m").
Copy link
Contributor

Choose a reason for hiding this comment

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

if you want to use this function, then I think the function's arguments should be changed. The first argument should be a value with CPU units (or empty string based on previous calls), like millicores, and the second one should be a value with a memory unit.

Comment on lines +89 to +91
case vpa_types.UpdateModeInPlace:
if !features.Enabled(features.InPlace) {
return utils.InPlaceEvict
Copy link
Contributor

@iamzili iamzili Dec 7, 2025

Choose a reason for hiding this comment

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

do these lines mean that when the new mode (InPlace) is used in a VPA object, but its feature flag is disabled, we evict the pod? May I ask the reason?

Personally I would expect that we don't do anything with this type of pod, just log this as a event

Copy link
Contributor

Choose a reason for hiding this comment

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

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. 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.

Allow VPA to skip eviction when in-place update fails

3 participants