-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: add restriction when upgrade addon from 0.8 to 0.9 #433
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #433 +/- ##
==========================================
+ Coverage 44.89% 44.91% +0.01%
==========================================
Files 157 157
Lines 23000 23021 +21
==========================================
+ Hits 10325 10339 +14
- Misses 11443 11448 +5
- Partials 1232 1234 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -75,6 +76,10 @@ func (r *addonEnableFlags) useDefault() bool { | |||
len(r.TolerationsSet) == 0 | |||
} | |||
|
|||
func (r *addonEnableFlags) noChange() bool { |
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 if Values are set before upgrading?
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.
@@ -354,6 +362,24 @@ func (o *addonCmdOpts) validate() error { | |||
return nil | |||
} | |||
|
|||
func checkBreakingChange(o *addonCmdOpts) error { | |||
if o.addonEnableFlags.noChange() && o.addon.Status.Phase == extensionsv1alpha1.AddonEnabled { |
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 if enable and enabled addon, and disable an disabled addon? For changes that wont modify Addon CR, there won't be a 'PATCH'.
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.
Used Webhook instead. Will close this issue. |
assume the situation that addon version is 0.8 and kb version was upgrade from 0.8 to 0.9