sigs.k8s.io/cluster-api-provider-azure@v1.17.0/templates/test/ci/cluster-template-prow-spot.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 labels: 5 cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL:=azure} 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 - device: ephemeral0.1 81 filesystem: ext4 82 label: ephemeral0 83 replaceFS: ntfs 84 partitions: 85 - device: /dev/disk/azure/scsi1/lun0 86 layout: true 87 overwrite: false 88 tableType: gpt 89 files: 90 - contentFrom: 91 secret: 92 key: control-plane-azure.json 93 name: ${CLUSTER_NAME}-control-plane-azure-json 94 owner: root:root 95 path: /etc/kubernetes/azure.json 96 permissions: "0644" 97 initConfiguration: 98 nodeRegistration: 99 kubeletExtraArgs: 100 cloud-provider: external 101 name: '{{ ds.meta_data["local_hostname"] }}' 102 joinConfiguration: 103 nodeRegistration: 104 kubeletExtraArgs: 105 cloud-provider: external 106 name: '{{ ds.meta_data["local_hostname"] }}' 107 mounts: 108 - - LABEL=etcd_disk 109 - /var/lib/etcddisk 110 postKubeadmCommands: [] 111 preKubeadmCommands: [] 112 machineTemplate: 113 infrastructureRef: 114 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 115 kind: AzureMachineTemplate 116 name: ${CLUSTER_NAME}-control-plane 117 replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1} 118 version: ${KUBERNETES_VERSION} 119 --- 120 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 121 kind: AzureMachineTemplate 122 metadata: 123 name: ${CLUSTER_NAME}-control-plane 124 namespace: default 125 spec: 126 template: 127 spec: 128 dataDisks: 129 - diskSizeGB: 256 130 lun: 0 131 nameSuffix: etcddisk 132 identity: UserAssigned 133 osDisk: 134 diskSizeGB: 128 135 osType: Linux 136 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 137 userAssignedIdentities: 138 - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity} 139 vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} 140 --- 141 apiVersion: cluster.x-k8s.io/v1beta1 142 kind: MachineDeployment 143 metadata: 144 name: ${CLUSTER_NAME}-md-0 145 namespace: default 146 spec: 147 clusterName: ${CLUSTER_NAME} 148 replicas: ${WORKER_MACHINE_COUNT:=2} 149 selector: {} 150 template: 151 metadata: 152 labels: 153 nodepool: pool1 154 spec: 155 bootstrap: 156 configRef: 157 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 158 kind: KubeadmConfigTemplate 159 name: ${CLUSTER_NAME}-md-0 160 clusterName: ${CLUSTER_NAME} 161 infrastructureRef: 162 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 163 kind: AzureMachineTemplate 164 name: ${CLUSTER_NAME}-md-0 165 version: ${KUBERNETES_VERSION} 166 --- 167 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 168 kind: AzureMachineTemplate 169 metadata: 170 name: ${CLUSTER_NAME}-md-0 171 namespace: default 172 spec: 173 template: 174 spec: 175 identity: UserAssigned 176 osDisk: 177 diskSizeGB: 128 178 osType: Linux 179 spotVMOptions: 180 evictionPolicy: Delete 181 maxPrice: 1000 182 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 183 userAssignedIdentities: 184 - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity} 185 vmSize: Standard_B2s_v2 186 --- 187 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 188 kind: KubeadmConfigTemplate 189 metadata: 190 name: ${CLUSTER_NAME}-md-0 191 namespace: default 192 spec: 193 template: 194 spec: 195 files: 196 - contentFrom: 197 secret: 198 key: worker-node-azure.json 199 name: ${CLUSTER_NAME}-md-0-azure-json 200 owner: root:root 201 path: /etc/kubernetes/azure.json 202 permissions: "0644" 203 joinConfiguration: 204 nodeRegistration: 205 kubeletExtraArgs: 206 cloud-provider: external 207 name: '{{ ds.meta_data["local_hostname"] }}' 208 preKubeadmCommands: [] 209 --- 210 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 211 kind: AzureClusterIdentity 212 metadata: 213 labels: 214 clusterctl.cluster.x-k8s.io/move-hierarchy: "true" 215 name: ${CLUSTER_IDENTITY_NAME} 216 namespace: default 217 spec: 218 allowedNamespaces: {} 219 clientID: ${AZURE_CLIENT_ID_USER_ASSIGNED_IDENTITY} 220 tenantID: ${AZURE_TENANT_ID} 221 type: ${CLUSTER_IDENTITY_TYPE:=WorkloadIdentity} 222 --- 223 apiVersion: cluster.x-k8s.io/v1beta1 224 kind: MachineHealthCheck 225 metadata: 226 name: ${CLUSTER_NAME}-mhc-0 227 namespace: default 228 spec: 229 clusterName: ${CLUSTER_NAME} 230 maxUnhealthy: 100% 231 selector: 232 matchLabels: 233 nodepool: pool1 234 unhealthyConditions: 235 - status: "True" 236 timeout: 30s 237 type: E2ENodeUnhealthy 238 --- 239 apiVersion: addons.cluster.x-k8s.io/v1alpha1 240 kind: HelmChartProxy 241 metadata: 242 name: calico 243 namespace: default 244 spec: 245 chartName: tigera-operator 246 clusterSelector: 247 matchLabels: 248 cni: calico 249 namespace: tigera-operator 250 releaseName: projectcalico 251 repoURL: https://docs.tigera.io/calico/charts 252 valuesTemplate: |- 253 installation: 254 cni: 255 type: Calico 256 calicoNetwork: 257 bgp: Disabled 258 mtu: 1350 259 ipPools: 260 ipPools:{{range $i, $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }} 261 - cidr: {{ $cidr }} 262 encapsulation: VXLAN{{end}} 263 registry: mcr.microsoft.com/oss 264 # Image and registry configuration for the tigera/operator pod. 265 tigeraOperator: 266 image: tigera/operator 267 registry: mcr.microsoft.com/oss 268 calicoctl: 269 image: mcr.microsoft.com/oss/calico/ctl 270 version: ${CALICO_VERSION} 271 --- 272 apiVersion: addons.cluster.x-k8s.io/v1alpha1 273 kind: HelmChartProxy 274 metadata: 275 name: azuredisk-csi-driver-chart 276 namespace: default 277 spec: 278 chartName: azuredisk-csi-driver 279 clusterSelector: 280 matchLabels: 281 azuredisk-csi: "true" 282 namespace: kube-system 283 releaseName: azuredisk-csi-driver-oot 284 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts 285 valuesTemplate: |- 286 controller: 287 replicas: 1 288 runOnControlPlane: true 289 windows: 290 useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} 291 --- 292 apiVersion: addons.cluster.x-k8s.io/v1alpha1 293 kind: HelmChartProxy 294 metadata: 295 name: cloud-provider-azure-chart 296 namespace: default 297 spec: 298 chartName: cloud-provider-azure 299 clusterSelector: 300 matchLabels: 301 cloud-provider: azure 302 releaseName: cloud-provider-azure-oot 303 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo 304 valuesTemplate: | 305 infra: 306 clusterName: {{ .Cluster.metadata.name }} 307 cloudControllerManager: 308 clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} 309 logVerbosity: 4 310 --- 311 apiVersion: addons.cluster.x-k8s.io/v1alpha1 312 kind: HelmChartProxy 313 metadata: 314 name: cloud-provider-azure-chart-ci 315 namespace: default 316 spec: 317 chartName: cloud-provider-azure 318 clusterSelector: 319 matchLabels: 320 cloud-provider: azure-ci 321 releaseName: cloud-provider-azure-oot 322 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo 323 valuesTemplate: | 324 infra: 325 clusterName: {{ .Cluster.metadata.name }} 326 cloudControllerManager: 327 cloudConfig: ${CLOUD_CONFIG:-"/etc/kubernetes/azure.json"} 328 cloudConfigSecretName: ${CONFIG_SECRET_NAME:-""} 329 clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} 330 imageName: "${CCM_IMAGE_NAME:-""}" 331 imageRepository: "${IMAGE_REGISTRY:-""}" 332 imageTag: "${IMAGE_TAG_CCM:-""}" 333 logVerbosity: ${CCM_LOG_VERBOSITY:-4} 334 replicas: ${CCM_COUNT:-1} 335 enableDynamicReloading: ${ENABLE_DYNAMIC_RELOADING:-false} 336 cloudNodeManager: 337 imageName: "${CNM_IMAGE_NAME:-""}" 338 imageRepository: "${IMAGE_REGISTRY:-""}" 339 imageTag: "${IMAGE_TAG_CNM:-""}"