🌱 Add multiple control plane class support to v1.11.0#2
Closed
Dhairya-Arora01 wants to merge 1 commit intosyself-1.11.0from
Closed
🌱 Add multiple control plane class support to v1.11.0#2Dhairya-Arora01 wants to merge 1 commit intosyself-1.11.0from
Dhairya-Arora01 wants to merge 1 commit intosyself-1.11.0from
Conversation
guettli
reviewed
Apr 18, 2026
| // class denotes a type of control-plane node present in the cluster. | ||
| // When used in ControlPlaneTopologyClass.Classes, this name MUST be unique | ||
| // within the list and can be referenced from the Cluster topology. | ||
| // +optional |
guettli
requested changes
Apr 18, 2026
guettli
left a comment
There was a problem hiding this comment.
comments are missing. I just had a first look. The PR is big....
|
|
||
| // PatchSelectorMatchControlPlaneClass selects templates referenced | ||
| // in specific ControlPlaneClasses in .spec.controlPlane.classes. | ||
| type PatchSelectorMatchControlPlaneClass struct { |
|
|
||
| // class denotes a type of control-plane node present in the cluster. | ||
| // When used in ControlPlaneTopologyClass.Classes, this name MUST be unique | ||
| // within the list and can be referenced from the Cluster topology. |
| } | ||
|
|
||
| // PatchSelectorMatchControlPlaneClass selects templates referenced | ||
| // in specific ControlPlaneClasses in .spec.controlPlane.classes. |
|
|
||
| // class is the class name of the ControlPlane, | ||
| // to which the current template belongs to. | ||
| // +optional |
| _, err = o.fetchRef(ctx, discoveryBackoff, cc.Spec.Infrastructure.TemplateRef.ToObjectReference(cc.Namespace)) | ||
| errs = append(errs, err) | ||
| _, err = o.fetchRef(ctx, discoveryBackoff, cc.Spec.ControlPlane.TemplateRef.ToObjectReference(cc.Namespace)) | ||
| errs = append(errs, err) |
There was a problem hiding this comment.
is it ok to delete these two lines?
maybe leave the, but as commented-out with a leading syself comment, explaining why this was removed.
| } | ||
| } | ||
|
|
||
| func TestControlPlaneClassesAreUnique(t *testing.T) { |
|
|
||
| fldPath := field.NewPath("spec", "topology", "controlPlane", "healthCheck") | ||
|
|
||
| // Resolve the control plane class to use for validation. |
| return nil | ||
| } | ||
|
|
||
| func controlPlaneClassOfName(clusterClass *clusterv1.ClusterClass, name string) *clusterv1.ControlPlaneClass { |
| // resolveControlPlaneClassForValidation returns the ControlPlaneClass to use for validation. | ||
| // If the Cluster topology specifies a control plane class, it is looked up from ClusterClass.spec.controlPlane.classes. | ||
| // Otherwise, the inline ClusterClass.spec.controlPlane definition is used. | ||
| func resolveControlPlaneClassForValidation(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) (*clusterv1.ControlPlaneClass, error) { |
| } | ||
| } | ||
|
|
||
| // Validate selectors for control plane classes |
* enable multiple control plane classes - ClusterClass now supports multiple classes for control-plane - similar to workers. - Cluster topology now includes a field "class" for control-plane which references to the control. Signed-off-by: Dhairya Arora <dhairya.arora@syself.com>
e2d5f0d to
5811822
Compare
Author
|
Superseded by #3 - which enables the feature for v1.11.6 i.e. the latest v1.11.x version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR involves cherry-picking the merge commit
de6901dfrom the PR #1 to enable multiple control plane classes.The changes to the API are made to v1beta2 API type as well.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #