Skip to content

Instantly share code, notes, and snippets.

@sadysnaat
Last active January 4, 2025 18:31
Show Gist options
  • Save sadysnaat/3663b95e234736d584052edcf62de1b8 to your computer and use it in GitHub Desktop.
Save sadysnaat/3663b95e234736d584052edcf62de1b8 to your computer and use it in GitHub Desktop.
Cluster Class With Patch Example
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