Capture creation of cluster into Helm chart
[icn.git] / deploy / clusters / templates / cluster.yaml
1 {{- range $clusterName, $cluster := .Values.clusters }}
2 ---
3 apiVersion: cluster.x-k8s.io/v1alpha4
4 kind: Cluster
5 metadata:
6   labels:
7     cluster.x-k8s.io/cluster-name: {{ $clusterName }}
8     {{- toYaml $cluster.clusterLabels | nindent 4 }}
9   name: {{ $clusterName }}
10 spec:
11   clusterNetwork:
12     pods:
13       cidrBlocks:
14       - {{ $cluster.podCidr }}
15     services:
16       cidrBlocks:
17       - 10.244.0.0/18
18   controlPlaneRef:
19     apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
20     kind: KubeadmControlPlane
21     name: {{ $clusterName }}
22   infrastructureRef:
23     apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
24     kind: Metal3Cluster
25     name: {{ $clusterName }}
26 {{- end }}