Last active
January 4, 2025 18:31
-
-
Save sadysnaat/3663b95e234736d584052edcf62de1b8 to your computer and use it in GitHub Desktop.
Cluster Class With Patch Example
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
apiVersion: cluster.x-k8s.io/v1beta1 | |
kind: ClusterClass | |
metadata: | |
name: docker-clusterclass-v0.1.0 | |
spec: | |
... | |
patches: | |
- name: dnsImageRespository | |
definitions: | |
- selector: | |
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | |
kind: KubeadmControlPlaneTemplate | |
matchResources: | |
controlPlane: true | |
jsonPatches: | |
- op: add | |
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/dns/imageRepository | |
valueFrom: | |
variable: dnsImageRespository |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference taken from https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/write-clusterclass#clusterclass-with-patches