Skip to content
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

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

taneyland
Copy link
Member

@taneyland taneyland commented Jan 18, 2024

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.

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (c209ba7) 71.73% compared to head (d6bd3b6) 71.73%.
Report is 1 commits behind head on main.

Files Patch % Lines
pkg/providers/tinkerbell/validate.go 62.50% 2 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@eks-distro-bot eks-distro-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 18, 2024
@eks-distro-bot eks-distro-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 19, 2024
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")
Copy link
Member

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.

Copy link
Member Author

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" {
Copy link
Member

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.

Copy link
Member Author

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

@rahulbabu95
Copy link
Member

/lgtm

@taneyland
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit f84d429 into aws:main Jan 19, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants