-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ Enable ClusterClass rebase operation #5644
✨ Enable ClusterClass rebase operation #5644
Conversation
58116fe
to
8f9f3a4
Compare
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.
I like the direction in which this is going :)
A few nits for now. I'll take a closer look later on, but would be good to get the underlying PR merged.
8f9f3a4
to
04f4be8
Compare
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.
@killianmuldoon Can you please rebase the PR on top of main?
I'll do another review then.
04f4be8
to
4ee61d4
Compare
@sbueringer rebased now. |
622a83d
to
53d3c26
Compare
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.
Looks great. Mostly nits from my side. I skipped compatibility_test.go and cluster_test.go. I'll do that on the next round, but there will be at most a few nits in those files.
// On update. | ||
if old != nil { | ||
// Error if the update moves the cluster from Managed to Unmanaged i.e. the managed topology is removed on update. | ||
if old.Spec.Topology != nil && new.Spec.Topology == 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.
Check for managed -> unmanaged
} | ||
|
||
for i, mdc := range clusterClass.Spec.Workers.MachineDeployments { | ||
allErrs = append(allErrs, LocalObjectTemplateIsValid(&mdc.Template.Bootstrap, clusterClass.Namespace, field.NewPath("spec", "workers", "machineDeployments").Index(i).Child("template", "bootstrap"))...) |
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.
(I wouldn't change anything in this PR, just realized it now)
Shouldn't the bootstrap template be optional? (based on that it's optional in MDs)
// ConfigRef is a reference to a bootstrap provider-specific resource
// that holds configuration details. The reference is optional to
// allow users/operators to specify Bootstrap.DataSecretName without
// the need of a controller.
Or is that something not supported by ClusterClass?
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.
cc @fabriziopandini Is this something we have to think about / create an issue for?
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.
I don't think so.
it is kind of impossible automatically creating clusters without a bootstrap provider, given that it is impractical or impossible to provide bootstrap data secrets at ClusterClass level
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.
Okay sounds good. Pretty relieved that we don't have to support optional BootstrapTemplates
05b5077
to
7937ad9
Compare
/lgtm |
Looks great, thx! lgtm pending squash |
7937ad9
to
09b577f
Compare
/lgtm |
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
09b577f
to
2ffa35b
Compare
/lgtm |
@sbueringer sorry for the ping pong over and back! 😄 |
No problem. I was just starting to write a comment about the state you had in between when I saw the new version :) |
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
This change removes a check in the Cluster Webhook which ensure a cluster can't be moved from one ClusterClass to another. Additional compatibility checks have been added to ensure that the resulting update to the Cluster is protected from some unreconcilable changes as outlined in the clusterClass proposal #4985
Fixes #5318