sigs.k8s.io/cluster-api-provider-azure@v1.14.3/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} 220 clientSecret: 221 name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} 222 namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} 223 tenantID: ${AZURE_TENANT_ID} 224 type: ServicePrincipal 225 --- 226 apiVersion: cluster.x-k8s.io/v1beta1 227 kind: MachineHealthCheck 228 metadata: 229 name: ${CLUSTER_NAME}-mhc-0 230 namespace: default 231 spec: 232 clusterName: ${CLUSTER_NAME} 233 maxUnhealthy: 100% 234 selector: 235 matchLabels: 236 nodepool: pool1 237 unhealthyConditions: 238 - status: "True" 239 timeout: 30s 240 type: E2ENodeUnhealthy 241 --- 242 apiVersion: addons.cluster.x-k8s.io/v1alpha1 243 kind: HelmChartProxy 244 metadata: 245 name: calico 246 namespace: default 247 spec: 248 chartName: tigera-operator 249 clusterSelector: 250 matchLabels: 251 cni: calico 252 namespace: tigera-operator 253 releaseName: projectcalico 254 repoURL: https://docs.tigera.io/calico/charts 255 valuesTemplate: |- 256 installation: 257 cni: 258 type: Calico 259 calicoNetwork: 260 bgp: Disabled 261 mtu: 1350 262 ipPools: 263 ipPools:{{range $i, $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }} 264 - cidr: {{ $cidr }} 265 encapsulation: VXLAN{{end}} 266 registry: mcr.microsoft.com/oss 267 # Image and registry configuration for the tigera/operator pod. 268 tigeraOperator: 269 image: tigera/operator 270 registry: mcr.microsoft.com/oss 271 calicoctl: 272 image: mcr.microsoft.com/oss/calico/ctl 273 version: ${CALICO_VERSION} 274 --- 275 apiVersion: addons.cluster.x-k8s.io/v1alpha1 276 kind: HelmChartProxy 277 metadata: 278 name: azuredisk-csi-driver-chart 279 namespace: default 280 spec: 281 chartName: azuredisk-csi-driver 282 clusterSelector: 283 matchLabels: 284 azuredisk-csi: "true" 285 namespace: kube-system 286 releaseName: azuredisk-csi-driver-oot 287 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts 288 valuesTemplate: |- 289 controller: 290 replicas: 1 291 runOnControlPlane: true 292 windows: 293 useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} 294 --- 295 apiVersion: addons.cluster.x-k8s.io/v1alpha1 296 kind: HelmChartProxy 297 metadata: 298 name: cloud-provider-azure-chart 299 namespace: default 300 spec: 301 chartName: cloud-provider-azure 302 clusterSelector: 303 matchLabels: 304 cloud-provider: azure 305 releaseName: cloud-provider-azure-oot 306 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo 307 valuesTemplate: | 308 infra: 309 clusterName: {{ .Cluster.metadata.name }} 310 cloudControllerManager: 311 clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} 312 logVerbosity: 4 313 --- 314 apiVersion: addons.cluster.x-k8s.io/v1alpha1 315 kind: HelmChartProxy 316 metadata: 317 name: cloud-provider-azure-chart-ci 318 namespace: default 319 spec: 320 chartName: cloud-provider-azure 321 clusterSelector: 322 matchLabels: 323 cloud-provider: azure-ci 324 releaseName: cloud-provider-azure-oot 325 repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo 326 valuesTemplate: | 327 infra: 328 clusterName: {{ .Cluster.metadata.name }} 329 cloudControllerManager: 330 cloudConfig: ${CLOUD_CONFIG:-"/etc/kubernetes/azure.json"} 331 cloudConfigSecretName: ${CONFIG_SECRET_NAME:-""} 332 clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} 333 imageName: "${CCM_IMAGE_NAME:-""}" 334 imageRepository: "${IMAGE_REGISTRY:-""}" 335 imageTag: "${IMAGE_TAG_CCM:-""}" 336 logVerbosity: ${CCM_LOG_VERBOSITY:-4} 337 replicas: ${CCM_COUNT:-1} 338 enableDynamicReloading: ${ENABLE_DYNAMIC_RELOADING:-false} 339 cloudNodeManager: 340 imageName: "${CNM_IMAGE_NAME:-""}" 341 imageRepository: "${IMAGE_REGISTRY:-""}" 342 imageTag: "${IMAGE_TAG_CNM:-""}"