|
| 1 | +apiVersion: cluster.x-k8s.io/v1beta1 |
| 2 | +kind: Cluster |
| 3 | +metadata: |
| 4 | + labels: |
| 5 | + cni: calico |
| 6 | + name: ${CLUSTER_NAME} |
| 7 | + namespace: default |
| 8 | +spec: |
| 9 | + clusterNetwork: |
| 10 | + pods: |
| 11 | + cidrBlocks: |
| 12 | + - 192.168.0.0/16 |
| 13 | + controlPlaneRef: |
| 14 | + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 |
| 15 | + kind: KubeadmControlPlane |
| 16 | + name: ${CLUSTER_NAME}-control-plane |
| 17 | + infrastructureRef: |
| 18 | + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 19 | + kind: AzureCluster |
| 20 | + name: ${CLUSTER_NAME} |
| 21 | +--- |
| 22 | +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 23 | +kind: AzureCluster |
| 24 | +metadata: |
| 25 | + name: ${CLUSTER_NAME} |
| 26 | + namespace: default |
| 27 | +spec: |
| 28 | + additionalTags: |
| 29 | + buildProvenance: ${BUILD_PROVENANCE} |
| 30 | + creationTimestamp: ${TIMESTAMP} |
| 31 | + jobName: ${JOB_NAME} |
| 32 | + identityRef: |
| 33 | + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 34 | + kind: AzureClusterIdentity |
| 35 | + name: ${CLUSTER_IDENTITY_NAME} |
| 36 | + location: ${AZURE_LOCATION} |
| 37 | + networkSpec: |
| 38 | + subnets: |
| 39 | + - name: control-plane-subnet |
| 40 | + role: control-plane |
| 41 | + - name: node-subnet |
| 42 | + role: node |
| 43 | + vnet: |
| 44 | + name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} |
| 45 | + resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} |
| 46 | + subscriptionID: ${AZURE_SUBSCRIPTION_ID} |
| 47 | +--- |
| 48 | +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 |
| 49 | +kind: KubeadmControlPlane |
| 50 | +metadata: |
| 51 | + name: ${CLUSTER_NAME}-control-plane |
| 52 | + namespace: default |
| 53 | +spec: |
| 54 | + kubeadmConfigSpec: |
| 55 | + clusterConfiguration: |
| 56 | + apiServer: |
| 57 | + extraArgs: |
| 58 | + cloud-provider: external |
| 59 | + feature-gates: MixedProtocolLBService=true |
| 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 | + azure-container-registry-config: /etc/kubernetes/azure.json |
| 101 | + cloud-provider: external |
| 102 | + name: '{{ ds.meta_data["local_hostname"] }}' |
| 103 | + joinConfiguration: |
| 104 | + nodeRegistration: |
| 105 | + kubeletExtraArgs: |
| 106 | + azure-container-registry-config: /etc/kubernetes/azure.json |
| 107 | + cloud-provider: external |
| 108 | + name: '{{ ds.meta_data["local_hostname"] }}' |
| 109 | + mounts: |
| 110 | + - - LABEL=etcd_disk |
| 111 | + - /var/lib/etcddisk |
| 112 | + postKubeadmCommands: [] |
| 113 | + preKubeadmCommands: [] |
| 114 | + machineTemplate: |
| 115 | + infrastructureRef: |
| 116 | + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 117 | + kind: AzureMachineTemplate |
| 118 | + name: ${CLUSTER_NAME}-control-plane |
| 119 | + replicas: ${CONTROL_PLANE_MACHINE_COUNT} |
| 120 | + version: ${KUBERNETES_VERSION} |
| 121 | +--- |
| 122 | +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 123 | +kind: AzureMachineTemplate |
| 124 | +metadata: |
| 125 | + name: ${CLUSTER_NAME}-control-plane |
| 126 | + namespace: default |
| 127 | +spec: |
| 128 | + template: |
| 129 | + spec: |
| 130 | + dataDisks: |
| 131 | + - diskSizeGB: 256 |
| 132 | + lun: 0 |
| 133 | + nameSuffix: etcddisk |
| 134 | + identity: UserAssigned |
| 135 | + osDisk: |
| 136 | + diskSizeGB: 128 |
| 137 | + osType: Linux |
| 138 | + sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} |
| 139 | + userAssignedIdentities: |
| 140 | + - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity} |
| 141 | + vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} |
| 142 | +--- |
| 143 | +apiVersion: cluster.x-k8s.io/v1beta1 |
| 144 | +kind: MachineDeployment |
| 145 | +metadata: |
| 146 | + name: ${CLUSTER_NAME}-md-0 |
| 147 | + namespace: default |
| 148 | +spec: |
| 149 | + clusterName: ${CLUSTER_NAME} |
| 150 | + replicas: ${WORKER_MACHINE_COUNT} |
| 151 | + selector: |
| 152 | + matchLabels: null |
| 153 | + template: |
| 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 | + sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} |
| 180 | + userAssignedIdentities: |
| 181 | + - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity} |
| 182 | + vmSize: ${AZURE_NODE_MACHINE_TYPE} |
| 183 | +--- |
| 184 | +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 |
| 185 | +kind: KubeadmConfigTemplate |
| 186 | +metadata: |
| 187 | + name: ${CLUSTER_NAME}-md-0 |
| 188 | + namespace: default |
| 189 | +spec: |
| 190 | + template: |
| 191 | + spec: |
| 192 | + files: |
| 193 | + - contentFrom: |
| 194 | + secret: |
| 195 | + key: worker-node-azure.json |
| 196 | + name: ${CLUSTER_NAME}-md-0-azure-json |
| 197 | + owner: root:root |
| 198 | + path: /etc/kubernetes/azure.json |
| 199 | + permissions: "0644" |
| 200 | + joinConfiguration: |
| 201 | + nodeRegistration: |
| 202 | + kubeletExtraArgs: |
| 203 | + azure-container-registry-config: /etc/kubernetes/azure.json |
| 204 | + cloud-provider: external |
| 205 | + name: '{{ ds.meta_data["local_hostname"] }}' |
| 206 | + preKubeadmCommands: [] |
| 207 | +--- |
| 208 | +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 209 | +kind: AzureClusterIdentity |
| 210 | +metadata: |
| 211 | + labels: |
| 212 | + clusterctl.cluster.x-k8s.io/move-hierarchy: "true" |
| 213 | + name: ${CLUSTER_IDENTITY_NAME} |
| 214 | + namespace: default |
| 215 | +spec: |
| 216 | + allowedNamespaces: {} |
| 217 | + clientID: ${AZURE_CLIENT_ID} |
| 218 | + clientSecret: |
| 219 | + name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} |
| 220 | + namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} |
| 221 | + tenantID: ${AZURE_TENANT_ID} |
| 222 | + type: WorkloadIdentity |
| 223 | +--- |
| 224 | +apiVersion: addons.cluster.x-k8s.io/v1alpha1 |
| 225 | +kind: HelmChartProxy |
| 226 | +metadata: |
| 227 | + name: calico |
| 228 | + namespace: default |
| 229 | +spec: |
| 230 | + chartName: tigera-operator |
| 231 | + clusterSelector: |
| 232 | + matchLabels: |
| 233 | + cni: calico |
| 234 | + namespace: tigera-operator |
| 235 | + releaseName: projectcalico |
| 236 | + repoURL: https://docs.tigera.io/calico/charts |
| 237 | + valuesTemplate: |- |
| 238 | + installation: |
| 239 | + cni: |
| 240 | + type: Calico |
| 241 | + calicoNetwork: |
| 242 | + bgp: Disabled |
| 243 | + mtu: 1350 |
| 244 | + ipPools: |
| 245 | + ipPools:{{range $i, $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }} |
| 246 | + - cidr: {{ $cidr }} |
| 247 | + encapsulation: VXLAN{{end}} |
| 248 | + registry: mcr.microsoft.com/oss |
| 249 | + # Image and registry configuration for the tigera/operator pod. |
| 250 | + tigeraOperator: |
| 251 | + image: tigera/operator |
| 252 | + registry: mcr.microsoft.com/oss |
| 253 | + calicoctl: |
| 254 | + image: mcr.microsoft.com/oss/calico/ctl |
| 255 | + version: ${CALICO_VERSION} |
0 commit comments