-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Make changes to updater to add the unboosting logic #8618
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
base: experimental-cpu-boost
Are you sure you want to change the base?
Make changes to updater to add the unboosting logic #8618
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kamarabbas99 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 |
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 Once the patch is verified, the new status will be reflected by the 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. |
/cc laoj2 |
/ok-to-test |
7c55ed5
to
6286cc8
Compare
6286cc8
to
79460ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good! Just a few minor nits from me. I’ll do one more pass on this as well :)
if vpa_api_util.GetUpdateMode(vpa) != vpa_types.UpdateModeRecreate && | ||
vpa_api_util.GetUpdateMode(vpa) != vpa_types.UpdateModeAuto && vpa_api_util.GetUpdateMode(vpa) != vpa_types.UpdateModeInPlaceOrRecreate { | ||
klog.V(3).InfoS("Skipping VPA object because its mode is not \"InPlaceOrRecreate\", \"Recreate\" or \"Auto\"", "vpa", klog.KObj(vpa)) | ||
updateMode := vpa_api_util.GetUpdateMode(vpa) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this :)
} | ||
err := inPlaceLimiter.InPlaceUpdate(pod, vpa, u.eventRecorder) | ||
if err != nil { | ||
klog.V(0).InfoS("Unboosting failed", "error", err, "pod", klog.KObj(pod)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the unboosting operation fails each time? don't we want to fallback to eviction at some point?
withInPlaceUpdated := false | ||
|
||
podsForInPlace := make([]*apiv1.Pod, 0) | ||
if features.Enabled(features.CPUStartupBoost) && vpa.Spec.StartupBoost != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check for features.Enabled(features.CPUStartupBoost)
once ( outside of this loop ) since it won't change between VPAs
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Introduces changes in the updater component to unboost cpu if its applied by the admission-controller.
Also the original cpu request is added in annotation because we need to revert to original(not recommeded) if update mode is set to Off.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: