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