Skip to content

feat: add ClusterClass support#32

Open
mweibel wants to merge 1 commit into
mainfrom
clusterclass
Open

feat: add ClusterClass support#32
mweibel wants to merge 1 commit into
mainfrom
clusterclass

Conversation

@mweibel
Copy link
Copy Markdown
Collaborator

@mweibel mweibel commented May 12, 2026

Summary

  • New CloudscaleClusterTemplate CRD + webhook (defaulting/validation shared with CloudscaleCluster, spec immutable on update).
  • quick-start ClusterClass with variables for region, credentials, control-plane/worker flavor/image/root volume size, and SSH keys.
  • New topology flavor (cluster-template-topology.yaml) that produces a Cluster referencing the ClusterClass instead of inline infra/CP/MD resources.

How to test

Check out this branch.

Apply the ClusterClass once per namespace:

$ clusterctl generate cluster quick-start \
--kubernetes-version v1.35.2 \
--from templates/cluster-class.yaml \
| kubectl apply -f -

Generate and apply a topology-based cluster:

$ clusterctl generate cluster my-cluster \
--kubernetes-version v1.35.2 \
--control-plane-machine-count 1 \
--worker-machine-count 2 \
--from templates/cluster-template-topology.yaml \
| kubectl apply -f -

Verify:

$ kubectl get cluster,cloudscalecluster,kubeadmcontrolplane,machinedeployment
$ clusterctl describe cluster my-cluster

Scale workers via the topology (no direct MD edits):

kubectl patch cluster my-cluster --type=merge -p \
'{"spec":{"topology":{"workers":{"machineDeployments":[{"class":"worker","name":"md-0","replicas":3}]}}}}'

Webhook checks:

  • Create a CloudscaleClusterTemplate with an invalid region → rejected.
  • Update an existing CloudscaleClusterTemplate.spec → rejected as immutable.

Base automatically changed from improve-resiliency to main May 18, 2026 15:11
@mweibel mweibel force-pushed the clusterclass branch 3 times, most recently from 6a8f69f to f10a8cd Compare May 19, 2026 12:05
@mweibel mweibel changed the title feat: ClusterClass support feat: add ClusterClass support May 19, 2026
@mweibel mweibel marked this pull request as ready for review May 19, 2026 12:59
@mweibel mweibel force-pushed the clusterclass branch 2 times, most recently from 155a3cf to d995a59 Compare May 19, 2026 13:05
 Adds CloudscaleClusterTemplate CRD (with defaulting/validation webhook
 sharing logic with CloudscaleCluster), a `quick-start` ClusterClass,
 and a `topology` flavor cluster template using said ClusterClass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant