-
Notifications
You must be signed in to change notification settings - Fork 288
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
Add in place rollout strategy option #7328
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7328 +/- ##
==========================================
- Coverage 71.73% 71.73% -0.01%
==========================================
Files 559 559
Lines 43416 43426 +10
==========================================
+ Hits 31144 31151 +7
- Misses 10553 10555 +2
- Partials 1719 1720 +1 ☔ View full report in Codecov by Sentry. |
if w.UpgradeRolloutStrategy.Type != "RollingUpdate" { | ||
return fmt.Errorf("WorkerNodeGroupConfiguration: only 'RollingUpdate' supported for upgrade rollout strategy type") | ||
if w.UpgradeRolloutStrategy.Type != "RollingUpdate" && w.UpgradeRolloutStrategy.Type != "InPlace" { | ||
return fmt.Errorf("WorkerNodeGroupConfiguration: only 'RollingUpdate' and 'InPlace' are supported for upgrade rollout strategy type") |
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 looks like a provider agnostic check. So looks like we might need to restrict "InPlace" at other providers once the rolloutStrategy support PR for other providers get merged in.? Another option is to check if the type is inplace and if cpUpgradeRolloutStrategy.Type == "InPlace" && cluster.Spec.DatacenterRef.Kind != TinkerbellDatacenterKind
and error out for this case here.
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.
Yes, I'll include the logic to restrict this feature for the other providers in the validations PR.
} | ||
|
||
if controlPlaneOsFamily != v1alpha1.Bottlerocket && spec.DatacenterConfig.Spec.OSImageURL == "" && spec.ControlPlaneMachineConfig().Spec.OSImageURL == "" { | ||
return fmt.Errorf("please use bottlerocket as osFamily for auto-importing or provide a valid osImageURL") | ||
} | ||
|
||
if spec.ControlPlaneConfiguration().UpgradeRolloutStrategy != nil { | ||
if controlPlaneOsFamily != v1alpha1.DefaultOSFamily && spec.ControlPlaneConfiguration().UpgradeRolloutStrategy.Type == "InPlace" { |
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.
While we check for the CP and Worker rollout strategy types separately, do we also want to check if one is specified as InPlace
other cannot be rolling.? I don't think our controllers are designed in such a way but this will prevent unnecessary complications.
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 that makes sense. There is a separate task for fully validating this feature, so I can include this additional check there
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: taneyland 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 |
Issue #, if available:
Description of changes:
This adds the option for InPlace upgrade rollout strategy type in EKS-A spec. We will update the KCP/MD objects in a separate PR
Testing (if applicable):
Documentation added/planned (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.