-
Notifications
You must be signed in to change notification settings - Fork 1.4k
✨ MD: Implement CanUpdateMachineSet #12965
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
base: main
Are you sure you want to change the base?
✨ MD: Implement CanUpdateMachineSet #12965
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5896543 to
7c325f8
Compare
4178ca8 to
6813157
Compare
|
/test pull-cluster-api-e2e-main-gke |
6813157 to
3c99995
Compare
Signed-off-by: Stefan Büringer [email protected]
3c99995 to
d02f2b2
Compare
|
/test pull-cluster-api-e2e-main-gke |
|
/test pull-cluster-api-e2e-main-gke |
| // Cleanup fields that are not the responsibility of the in-place update extension. | ||
| // Remove in-place mutable fields. | ||
| cleanedUpPatchedMachineSet.Spec.Template = *mdutil.MachineTemplateDeepCopyRolloutFields(&cleanedUpPatchedMachineSet.Spec.Template) | ||
| cleanedUpDesiredMachineSet.Spec.Template = *mdutil.MachineTemplateDeepCopyRolloutFields(&cleanedUpDesiredMachineSet.Spec.Template) | ||
| // Set refs equal. | ||
| cleanedUpPatchedMachineSet.Spec.Template.Spec.Bootstrap.ConfigRef = cleanedUpDesiredMachineSet.Spec.Template.Spec.Bootstrap.ConfigRef | ||
| cleanedUpPatchedMachineSet.Spec.Template.Spec.InfrastructureRef = cleanedUpDesiredMachineSet.Spec.Template.Spec.InfrastructureRef | ||
| return compare.Diff(cleanedUpPatchedMachineSet, cleanedUpDesiredMachineSet) |
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.
@fabriziopandini Let's talk about this on Monday
I think we should filter out fields here that are not relevant for the diff and we should share a util across here, KCP and the regular MD rollout decision as far as possible.
An alternative would be to explicitly only compare Version / FailureDomain but I think that has the risk that we forget to add new fields here in the future. In that case I would prefer to get a full rollout instead of an in-place rollout that doesn't work
Note to myself:
- Also update KCP + add test coverage for this logic in both places
|
/test pull-cluster-api-e2e-main-gke |
Signed-off-by: Stefan Büringer [email protected]
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Part of #12291