-
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
ClusterClass rebase should check variable compatibility #8154
Comments
I think we're very close to having that already Let's assume we have a Cluster update call which changes the ClusterClass. Looking at this code: cluster-api/internal/webhooks/cluster.go Lines 247 to 270 in d9226f2
As soon as oldCluster is != nil we don't accept not found errors right now. If we now change the code to if oldCluster != nil { // On update
if clusterClassPollErr != nil {
allErrs = append(
allErrs, field.InternalError(
fldPath.Child("class"),
clusterClassPollErr))
return allErrs
} We can ensure that either I think I think this is also in line with our idea that for a rebase old and new ClusterClass have to exist and be successfully reconciled. |
/triage accepted I think we should have strict validation for the rebase operation and block if CC is not ready or other issues; we should also check if we are doing default, so new variables with defaults are added (this can be also a separate PR). The only issue that I see is when ClusterClass introduces some breaking changes on variables because in this case rebase won't be possible. But I think that this is a bigger discussion and soon or later we have to start thinking about some sort of support for variable conversion during rebase. |
/help |
@killianmuldoon: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/priority important-longterm |
PR #8153 removes the variable compatibility checks for Clusters using a ClusterClass when that class is being updated in place. This change is a consequence of external variables.
During ClusterClass rebase - moving a Cluster from one ClusterClass to another - similar variable checks could be done allowing users to safely update from one set of variables to another while changing ClusterClass. Currently validation of those variables is not done during ClusterClass rebase.
This validation should be added to give rebase webhook based validation of variable changes.
/area topology
/kind feature
The text was updated successfully, but these errors were encountered: