-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,11 +27,22 @@ | |
if spec.MachineConfigs[groupRef.Name].OSFamily() != controlPlaneOsFamily { | ||
return fmt.Errorf("worker node group osFamily cannot be different from control plane osFamily") | ||
} | ||
if group.UpgradeRolloutStrategy != nil { | ||
if spec.MachineConfigs[groupRef.Name].OSFamily() != v1alpha1.DefaultOSFamily && group.UpgradeRolloutStrategy.Type == "InPlace" { | ||
return fmt.Errorf("InPlace upgrades are only supported on the Ubuntu OS family") | ||
} | ||
} | ||
} | ||
|
||
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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
return fmt.Errorf("InPlace upgrades are only supported on the Ubuntu OS family") | ||
} | ||
} | ||
return 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.
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.