sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/test/ci/cluster-template-prow-flatcar.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 labels: 5 cloud-provider: azure-flatcar 6 cni: calico 7 name: ${CLUSTER_NAME} 8 namespace: default 9 spec: 10 clusterNetwork: 11 pods: 12 cidrBlocks: 13 - 192.168.0.0/16 14 controlPlaneRef: 15 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 16 kind: KubeadmControlPlane 17 name: ${CLUSTER_NAME}-control-plane 18 infrastructureRef: 19 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 20 kind: AzureCluster 21 name: ${CLUSTER_NAME} 22 --- 23 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 24 kind: AzureCluster 25 metadata: 26 name: ${CLUSTER_NAME} 27 namespace: default 28 spec: 29 additionalTags: 30 buildProvenance: ${BUILD_PROVENANCE} 31 creationTimestamp: ${TIMESTAMP} 32 jobName: ${JOB_NAME} 33 identityRef: 34 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 35 kind: AzureClusterIdentity 36 name: ${CLUSTER_IDENTITY_NAME} 37 location: ${AZURE_LOCATION} 38 networkSpec: 39 subnets: 40 - name: control-plane-subnet 41 role: control-plane 42 - name: node-subnet 43 role: node 44 vnet: 45 name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} 46 resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} 47 subscriptionID: ${AZURE_SUBSCRIPTION_ID} 48 --- 49 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 50 kind: KubeadmControlPlane 51 metadata: 52 name: ${CLUSTER_NAME}-control-plane 53 namespace: default 54 spec: 55 kubeadmConfigSpec: 56 clusterConfiguration: 57 apiServer: 58 extraArgs: 59 cloud-provider: external 60 timeoutForControlPlane: 20m 61 controllerManager: 62 extraArgs: 63 allocate-node-cidrs: "false" 64 cloud-provider: external 65 cluster-name: ${CLUSTER_NAME} 66 v: "4" 67 etcd: 68 local: 69 dataDir: /var/lib/etcddisk/etcd 70 extraArgs: 71 quota-backend-bytes: "8589934592" 72 diskSetup: 73 filesystems: 74 - device: /dev/disk/azure/scsi1/lun0 75 extraOpts: 76 - -E 77 - lazy_itable_init=1,lazy_journal_init=1 78 filesystem: ext4 79 label: etcd_disk 80 overwrite: false 81 partitions: [] 82 files: 83 - contentFrom: 84 secret: 85 key: control-plane-azure.json 86 name: ${CLUSTER_NAME}-control-plane-azure-json 87 owner: root:root 88 path: /etc/kubernetes/azure.json 89 permissions: "0644" 90 format: ignition 91 ignition: 92 containerLinuxConfig: 93 additionalConfig: | 94 systemd: 95 units: 96 - name: kubeadm.service 97 dropins: 98 - name: 10-flatcar.conf 99 contents: | 100 [Unit] 101 After=oem-cloudinit.service 102 # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. 103 After=containerd.service 104 # Workaround for https://github.com/kubernetes-sigs/cluster-api/issues/7679. 105 storage: 106 disks: 107 - device: /dev/disk/azure/scsi1/lun0 108 partitions: 109 - number: 1 110 initConfiguration: 111 nodeRegistration: 112 kubeletExtraArgs: 113 cloud-provider: external 114 name: '@@HOSTNAME@@' 115 joinConfiguration: 116 nodeRegistration: 117 kubeletExtraArgs: 118 cloud-provider: external 119 name: '@@HOSTNAME@@' 120 mounts: 121 - - etcd_disk 122 - /var/lib/etcddisk 123 postKubeadmCommands: [] 124 preKubeadmCommands: 125 - sed -i "s/@@HOSTNAME@@/$(curl -s -H Metadata:true --noproxy '*' 'http://169.254.169.254/metadata/instance?api-version=2020-09-01' 126 | jq -r .compute.name)/g" /etc/kubeadm.yml 127 machineTemplate: 128 infrastructureRef: 129 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 130 kind: AzureMachineTemplate 131 name: ${CLUSTER_NAME}-control-plane 132 replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1} 133 version: ${KUBERNETES_VERSION} 134 --- 135 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 136 kind: AzureMachineTemplate 137 metadata: 138 name: ${CLUSTER_NAME}-control-plane 139 namespace: default 140 spec: 141 template: 142 spec: 143 dataDisks: 144 - diskSizeGB: 256 145 lun: 0 146 nameSuffix: etcddisk 147 image: 148 computeGallery: 149 gallery: flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0 150 name: flatcar-stable-amd64-capi-${KUBERNETES_VERSION} 151 version: ${FLATCAR_VERSION} 152 osDisk: 153 diskSizeGB: 128 154 osType: Linux 155 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 156 vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} 157 --- 158 apiVersion: cluster.x-k8s.io/v1beta1 159 kind: MachineDeployment 160 metadata: 161 name: ${CLUSTER_NAME}-md-0 162 namespace: default 163 spec: 164 clusterName: ${CLUSTER_NAME} 165 replicas: ${WORKER_MACHINE_COUNT:=2} 166 selector: 167 matchLabels: null 168 template: 169 spec: 170 bootstrap: 171 configRef: 172 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 173 kind: KubeadmConfigTemplate 174 name: ${CLUSTER_NAME}-md-0 175 clusterName: ${CLUSTER_NAME} 176 infrastructureRef: 177 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 178 kind: AzureMachineTemplate 179 name: ${CLUSTER_NAME}-md-0 180 version: ${KUBERNETES_VERSION} 181 --- 182 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 183 kind: AzureMachineTemplate 184 metadata: 185 name: ${CLUSTER_NAME}-md-0 186 namespace: default 187 spec: 188 template: 189 spec: 190 image: 191 computeGallery: 192 gallery: flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0 193 name: flatcar-stable-amd64-capi-${KUBERNETES_VERSION} 194 version: ${FLATCAR_VERSION} 195 osDisk: 196 diskSizeGB: 128 197 osType: Linux 198 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 199 vmSize: ${AZURE_NODE_MACHINE_TYPE} 200 --- 201 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 202 kind: KubeadmConfigTemplate 203 metadata: 204 name: ${CLUSTER_NAME}-md-0 205 namespace: default 206 spec: 207 template: 208 spec: 209 files: 210 - contentFrom: 211 secret: 212 key: worker-node-azure.json 213 name: ${CLUSTER_NAME}-md-0-azure-json 214 owner: root:root 215 path: /etc/kubernetes/azure.json 216 permissions: "0644" 217 format: ignition 218 ignition: 219 containerLinuxConfig: 220 additionalConfig: | 221 systemd: 222 units: 223 - name: kubeadm.service 224 dropins: 225 - name: 10-flatcar.conf 226 contents: | 227 [Unit] 228 After=oem-cloudinit.service 229 # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. 230 After=containerd.service 231 joinConfiguration: 232 nodeRegistration: 233 kubeletExtraArgs: 234 cloud-provider: external 235 name: '@@HOSTNAME@@' 236 postKubeadmCommands: [] 237 preKubeadmCommands: 238 - sed -i "s/@@HOSTNAME@@/$(curl -s -H Metadata:true --noproxy '*' 'http://169.254.169.254/metadata/instance?api-version=2020-09-01' 239 | jq -r .compute.name)/g" /etc/kubeadm.yml 240 --- 241 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 242 kind: AzureClusterIdentity 243 metadata: 244 labels: 245 clusterctl.cluster.x-k8s.io/move-hierarchy: "true" 246 name: ${CLUSTER_IDENTITY_NAME} 247 namespace: default 248 spec: 249 allowedNamespaces: {} 250 clientID: ${AZURE_CLIENT_ID} 251 clientSecret: 252 name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} 253 namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} 254 tenantID: ${AZURE_TENANT_ID} 255 type: ServicePrincipal 256 --- 257 apiVersion: addons.cluster.x-k8s.io/v1alpha1 258 kind: HelmChartProxy 259 metadata: 260 name: calico 261 namespace: default 262 spec: 263 chartName: tigera-operator 264 clusterSelector: 265 matchLabels: 266 cni: calico 267 namespace: tigera-operator 268 releaseName: projectcalico 269 repoURL: https://docs.tigera.io/calico/charts 270 valuesTemplate: |- 271 installation: 272 cni: 273 type: Calico 274 calicoNetwork: 275 bgp: Disabled 276 mtu: 1350 277 ipPools: 278 ipPools:{{range $i, $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }} 279 - cidr: {{ $cidr }} 280 encapsulation: VXLAN{{end}} 281 registry: mcr.microsoft.com/oss 282 # Image and registry configuration for the tigera/operator pod. 283 tigeraOperator: 284 image: tigera/operator 285 registry: mcr.microsoft.com/oss 286 calicoctl: 287 image: mcr.microsoft.com/oss/calico/ctl 288 version: ${CALICO_VERSION} 289 --- 290 apiVersion: addons.cluster.x-k8s.io/v1alpha1 291 kind: HelmChartProxy 292 metadata: 293 name: azuredisk-csi-driver-chart 294 namespace: default 295 spec: 296 chartName: azuredisk-csi-driver 297 clusterSelector: 298 matchLabels: 299 azuredisk-csi: "true" 300 namespace: kube-system 301 releaseName: azuredisk-csi-driver-oot 302 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts 303 valuesTemplate: |- 304 controller: 305 replicas: 1 306 runOnControlPlane: true 307 windows: 308 useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} 309 --- 310 apiVersion: addons.cluster.x-k8s.io/v1alpha1 311 kind: HelmChartProxy 312 metadata: 313 name: cloud-provider-azure-chart-flatcar 314 namespace: default 315 spec: 316 chartName: cloud-provider-azure 317 clusterSelector: 318 matchLabels: 319 cloud-provider: azure-flatcar 320 releaseName: cloud-provider-azure-oot 321 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo 322 valuesTemplate: | 323 infra: 324 clusterName: {{ .Cluster.metadata.name }} 325 cloudControllerManager: 326 clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} 327 logVerbosity: 4 328 caCertDir: /usr/share/ca-certificates