-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat: deprecate UpdateMode Auto
in VPA
#8426
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
feat: deprecate UpdateMode Auto
in VPA
#8426
Conversation
1d726e6
to
ac56983
Compare
Auto
in VPA
ac56983
to
7ca3bb2
Compare
// Changed from UpdateModeAuto to UpdateModeRecreate as part of Auto mode deprecation | ||
defaultUpdateMode := vpa_types.UpdateModeRecreate |
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.
This is incorrect.
People who use the default setting would be suddenly and unexpectedly affected, because their VPA objects would now use Recreate
by default.
Recreate is not really less stable than Auto
here, but the rule shows we need a smooth change.
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.
On second thought it might be ok since currently Auto = Recreate.
I still think we should revert this but I may be wrong here :)
@soltysh @adrianmoisey
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.
Sure! Let me know if its required or not 🙂
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.
IIUC this is only for newly created objects, in which case that's perfectly reasonable approach. Since you're starting the deprecation, you should not set the default to a deprecated value. As Omer mentioned, even though this might come as a surprise to some (Auto vs Recreate). But the outcome will be the same, given that currently Auto means Recreate.
vertical-pod-autoscaler/pkg/admission-controller/logic/server.go
Outdated
Show resolved
Hide resolved
vertical-pod-autoscaler/pkg/admission-controller/logic/server.go
Outdated
Show resolved
Hide resolved
8c85301
to
3af6d54
Compare
3af6d54
to
f99c5e1
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.
Thanks for this!
Overall LGTM except this https://github.com/kubernetes/autoscaler/pull/8426/files#r2265295659.
/lgtm
/assign @adrianmoisey
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.
I like the warning you're adding there. Overall lgtm :)
// Changed from UpdateModeAuto to UpdateModeRecreate as part of Auto mode deprecation | ||
defaultUpdateMode := vpa_types.UpdateModeRecreate |
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.
IIUC this is only for newly created objects, in which case that's perfectly reasonable approach. Since you're starting the deprecation, you should not set the default to a deprecated value. As Omer mentioned, even though this might come as a surprise to some (Auto vs Recreate). But the outcome will be the same, given that currently Auto means Recreate.
since @soltysh LGTMed we can merge this |
@adrianmoisey Done! |
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianmoisey, rushmash91 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 |
What type of PR is this?
/kind deprecation
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #8424
Special notes for your reviewer:
This PR implements deprecation warnings for the VPA UpdateMode "Auto" value as part of the deprecation process. The Auto mode is now deprecated and users are encouraged to use explicit update modes like "Recreate", "Initial", or "InPlaceOrRecreate" instead.
Does this PR introduce a user-facing change?