Skip to content

VPA: Implement startup CPU boost support #8413

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

Draft
wants to merge 5 commits into
base: experimental-cpu-boost
Choose a base branch
from

Conversation

kamarabbas99
Copy link
Contributor

@kamarabbas99 kamarabbas99 commented Aug 7, 2025

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This PR introduces the CPU Startup Boost feature to the Vertical Pod Autoscaler.

This feature addresses the common problem of slow startup times for applications (e.g., Java workloads) that have high CPU requirements during initialization. https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/enhancements/7862-cpu-startup-boost

The key changes include:

  • API Extension: Adds a startupBoost field to the VerticalPodAutoscalerSpec and ContainerResourcePolicy to allow users to define a boost factor or quantity and a
    duration.
  • Admission Controller Logic: The admission controller webhook is updated to apply the boosted CPU request to pods at creation time based on the VPA policy.
  • Updater Logic: The updater now monitors boosted pods. After a pod becomes Ready and the specified duration has passed, the updater performs an in-place resize to
    scale the CPU back down to the VPA's current recommendation.
  • End-to-End Tests: A new e2e test suite has been added to validate the full boost and unboost lifecycle, including failure modes.
  • Documentation: The AEP has been updated with clarifications(just need to submit this PR AEP-7862: Make API changes for CPU Startup boost #8349).

Which issue(s) this PR fixes:

#7862

Fixes #

Special notes for your reviewer:

Merging this to an experimental branch first.

Does this PR introduce a user-facing change?

 Users can now configure a startupBoost policy in the VPA spec. This allows pods to be created with temporarily elevated CPU resources to accelerate their startup time, after which they are resized in-place to their recommended steady-state values.

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

- [KEP]: (https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/enhancements/7862-cpu-startup-boost#aep-7862-cpu-startup-boost)

@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area labels Aug 7, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kamarabbas99
Once this PR has been reviewed and has the lgtm label, please assign voelzmo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 area/vertical-pod-autoscaler needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 7, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @kamarabbas99. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed do-not-merge/needs-area labels Aug 7, 2025
@kamarabbas99
Copy link
Contributor Author

/cc laoj2

@k8s-ci-robot k8s-ci-robot requested a review from laoj2 August 7, 2025 17:48
@kamarabbas99 kamarabbas99 marked this pull request as draft August 7, 2025 18:56
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 7, 2025
@adrianmoisey
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 7, 2025
@kamarabbas99
Copy link
Contributor Author

I got a suggestion to split this into multiple PRs, it will make the review process easier. First PR being #8417

Comment on lines +296 to +304
// PodReady returns true if the pod is ready.
func PodReady(pod *core.Pod) bool {
for _, cond := range pod.Status.Conditions {
if cond.Type == core.PodReady && cond.Status == core.ConditionTrue {
return true
}
}
return false
}
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to use https://pkg.go.dev/k8s.io/kubernetes/pkg/api/v1/pod#IsPodReadyConditionTrue, rather than writing it from scratch?

@kamarabbas99
Copy link
Contributor Author

/uncc omerap12 voelzmo laoj2

@adrianmoisey
Copy link
Member

I got a suggestion to split this into multiple PRs, it will make the review process easier. First PR being #8417

Ah sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants