feat: add ClusterClass support#32
Open
mweibel wants to merge 1 commit into
Open
Conversation
6a8f69f to
f10a8cd
Compare
155a3cf to
d995a59
Compare
Adds CloudscaleClusterTemplate CRD (with defaulting/validation webhook sharing logic with CloudscaleCluster), a `quick-start` ClusterClass, and a `topology` flavor cluster template using said ClusterClass.
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.
Summary
CloudscaleClusterTemplateCRD + webhook (defaulting/validation shared withCloudscaleCluster, spec immutable on update).quick-startClusterClass with variables for region, credentials, control-plane/worker flavor/image/root volume size, and SSH keys.topologyflavor (cluster-template-topology.yaml) that produces aClusterreferencing 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:
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:
CloudscaleClusterTemplatewith an invalid region → rejected.CloudscaleClusterTemplate.spec→ rejected as immutable.