sigs.k8s.io/cluster-api-provider-azure@v1.17.0/templates/cluster-template-azure-cni-v1.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 name: ${CLUSTER_NAME} 5 namespace: default 6 spec: 7 clusterNetwork: 8 pods: 9 cidrBlocks: 10 - 192.168.0.0/16 11 controlPlaneRef: 12 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 13 kind: KubeadmControlPlane 14 name: ${CLUSTER_NAME}-control-plane 15 infrastructureRef: 16 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 17 kind: AzureCluster 18 name: ${CLUSTER_NAME} 19 --- 20 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 21 kind: AzureCluster 22 metadata: 23 name: ${CLUSTER_NAME} 24 namespace: default 25 spec: 26 identityRef: 27 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 28 kind: AzureClusterIdentity 29 name: ${CLUSTER_IDENTITY_NAME} 30 location: ${AZURE_LOCATION} 31 networkSpec: 32 subnets: 33 - name: control-plane-subnet 34 role: control-plane 35 - name: node-subnet 36 role: node 37 vnet: 38 name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} 39 resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} 40 subscriptionID: ${AZURE_SUBSCRIPTION_ID} 41 --- 42 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 43 kind: KubeadmControlPlane 44 metadata: 45 name: ${CLUSTER_NAME}-control-plane 46 namespace: default 47 spec: 48 kubeadmConfigSpec: 49 clusterConfiguration: 50 apiServer: 51 extraArgs: 52 cloud-provider: external 53 timeoutForControlPlane: 20m 54 controllerManager: 55 extraArgs: 56 allocate-node-cidrs: "false" 57 cloud-provider: external 58 cluster-name: ${CLUSTER_NAME} 59 etcd: 60 local: 61 dataDir: /var/lib/etcddisk/etcd 62 extraArgs: 63 quota-backend-bytes: "8589934592" 64 diskSetup: 65 filesystems: 66 - device: /dev/disk/azure/scsi1/lun0 67 extraOpts: 68 - -E 69 - lazy_itable_init=1,lazy_journal_init=1 70 filesystem: ext4 71 label: etcd_disk 72 - device: ephemeral0.1 73 filesystem: ext4 74 label: ephemeral0 75 replaceFS: ntfs 76 partitions: 77 - device: /dev/disk/azure/scsi1/lun0 78 layout: true 79 overwrite: false 80 tableType: gpt 81 files: 82 - contentFrom: 83 secret: 84 key: control-plane-azure.json 85 name: ${CLUSTER_NAME}-control-plane-azure-json 86 owner: root:root 87 path: /etc/kubernetes/azure.json 88 permissions: "0644" 89 initConfiguration: 90 nodeRegistration: 91 kubeletExtraArgs: 92 cloud-provider: external 93 max-pods: "110" 94 name: '{{ ds.meta_data["local_hostname"] }}' 95 joinConfiguration: 96 nodeRegistration: 97 kubeletExtraArgs: 98 cloud-provider: external 99 max-pods: "110" 100 name: '{{ ds.meta_data["local_hostname"] }}' 101 mounts: 102 - - LABEL=etcd_disk 103 - /var/lib/etcddisk 104 postKubeadmCommands: [] 105 preKubeadmCommands: [] 106 machineTemplate: 107 infrastructureRef: 108 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 109 kind: AzureMachineTemplate 110 name: ${CLUSTER_NAME}-control-plane 111 replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1} 112 version: ${KUBERNETES_VERSION} 113 --- 114 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 115 kind: AzureMachineTemplate 116 metadata: 117 name: ${CLUSTER_NAME}-control-plane 118 namespace: default 119 spec: 120 template: 121 spec: 122 dataDisks: 123 - diskSizeGB: 256 124 lun: 0 125 nameSuffix: etcddisk 126 identity: UserAssigned 127 networkInterfaces: 128 - privateIPConfigs: 110 129 subnetName: control-plane-subnet 130 osDisk: 131 diskSizeGB: 128 132 osType: Linux 133 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 134 userAssignedIdentities: 135 - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity} 136 vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} 137 --- 138 apiVersion: cluster.x-k8s.io/v1beta1 139 kind: MachineDeployment 140 metadata: 141 name: ${CLUSTER_NAME}-md-0 142 namespace: default 143 spec: 144 clusterName: ${CLUSTER_NAME} 145 replicas: ${WORKER_MACHINE_COUNT:=2} 146 selector: 147 matchLabels: null 148 template: 149 spec: 150 bootstrap: 151 configRef: 152 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 153 kind: KubeadmConfigTemplate 154 name: ${CLUSTER_NAME}-md-0 155 clusterName: ${CLUSTER_NAME} 156 infrastructureRef: 157 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 158 kind: AzureMachineTemplate 159 name: ${CLUSTER_NAME}-md-0 160 version: ${KUBERNETES_VERSION} 161 --- 162 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 163 kind: AzureMachineTemplate 164 metadata: 165 name: ${CLUSTER_NAME}-md-0 166 namespace: default 167 spec: 168 template: 169 spec: 170 networkInterfaces: 171 - privateIPConfigs: 110 172 subnetName: node-subnet 173 osDisk: 174 diskSizeGB: 128 175 osType: Linux 176 sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} 177 vmSize: ${AZURE_NODE_MACHINE_TYPE} 178 --- 179 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 180 kind: KubeadmConfigTemplate 181 metadata: 182 name: ${CLUSTER_NAME}-md-0 183 namespace: default 184 spec: 185 template: 186 spec: 187 files: 188 - contentFrom: 189 secret: 190 key: worker-node-azure.json 191 name: ${CLUSTER_NAME}-md-0-azure-json 192 owner: root:root 193 path: /etc/kubernetes/azure.json 194 permissions: "0644" 195 joinConfiguration: 196 nodeRegistration: 197 kubeletExtraArgs: 198 cloud-provider: external 199 max-pods: "110" 200 name: '{{ ds.meta_data["local_hostname"] }}' 201 preKubeadmCommands: [] 202 --- 203 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 204 kind: AzureClusterIdentity 205 metadata: 206 labels: 207 clusterctl.cluster.x-k8s.io/move-hierarchy: "true" 208 name: ${CLUSTER_IDENTITY_NAME} 209 namespace: default 210 spec: 211 allowedNamespaces: {} 212 clientID: ${AZURE_CLIENT_ID_USER_ASSIGNED_IDENTITY} 213 tenantID: ${AZURE_TENANT_ID} 214 type: ${CLUSTER_IDENTITY_TYPE:=WorkloadIdentity}