Capture creation of cluster into Helm chart
[icn.git] / deploy / clusters / templates / machinedeployment.yaml
1 {{- range $clusterName, $cluster := .Values.clusters }}
2 ---
3 apiVersion: cluster.x-k8s.io/v1alpha4
4 kind: MachineDeployment
5 metadata:
6   labels:
7     cluster.x-k8s.io/cluster-name: {{ $clusterName }}
8   name: {{ $clusterName }}
9 spec:
10   clusterName: {{ $clusterName }}
11   replicas: {{ $cluster.numWorkerMachines }}
12   selector:
13     matchLabels:
14       cluster.x-k8s.io/cluster-name: {{ $clusterName }}
15   template:
16     metadata:
17       labels:
18         cluster.x-k8s.io/cluster-name: {{ $clusterName }}
19     spec:
20       bootstrap:
21         configRef:
22           apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4
23           kind: KubeadmConfigTemplate
24           name: {{ $clusterName }}-workers
25       clusterName: {{ $clusterName }}
26       infrastructureRef:
27         apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
28         kind: Metal3MachineTemplate
29         name: {{ $clusterName }}-workers
30       nodeDrainTimeout: 0s
31       version: {{ $cluster.k8sVersion }}
32 {{- end }}