sigs.k8s.io/cluster-api-provider-azure@v1.17.0/templates/flavors/aks-aso-clusterclass/clusterclass.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: ClusterClass 3 metadata: 4 name: ${CLUSTER_CLASS_NAME} 5 namespace: default 6 spec: 7 controlPlane: 8 ref: 9 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 10 kind: AzureASOManagedControlPlaneTemplate 11 name: ${CLUSTER_NAME}-control-plane 12 infrastructure: 13 ref: 14 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 15 kind: AzureASOManagedClusterTemplate 16 name: ${CLUSTER_NAME} 17 workers: 18 machinePools: 19 - class: default-system 20 template: 21 bootstrap: 22 ref: 23 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 24 kind: KubeadmConfigTemplate 25 name: ${CLUSTER_NAME}-pool0 26 infrastructure: 27 ref: 28 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 29 kind: AzureASOManagedMachinePoolTemplate 30 name: ${CLUSTER_NAME}-pool0 31 - class: default-worker 32 template: 33 bootstrap: 34 ref: 35 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 36 kind: KubeadmConfigTemplate 37 name: ${CLUSTER_NAME}-pool1 38 infrastructure: 39 ref: 40 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 41 kind: AzureASOManagedMachinePoolTemplate 42 name: ${CLUSTER_NAME}-pool1 43 # CAPI doesn't let you replace fields of array elements, so we patch the 44 # whole spec of each CAPZ object. 45 # https://kubernetes.slack.com/archives/C8TSNPY4T/p1709249751874959 46 patches: 47 - name: azureasomanagedcluster-spec 48 definitions: 49 - selector: 50 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 51 kind: AzureASOManagedClusterTemplate 52 matchResources: 53 infrastructureCluster: true 54 jsonPatches: 55 - op: replace 56 path: /spec/template/spec 57 valueFrom: 58 template: | 59 resources: 60 - apiVersion: resources.azure.com/v1api20200601 61 kind: ResourceGroup 62 metadata: 63 name: "{{ .builtin.cluster.name }}" 64 annotations: 65 serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME} 66 spec: 67 location: ${AZURE_LOCATION} 68 - name: azureasomanagedcontrolplane-spec 69 definitions: 70 - selector: 71 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 72 kind: AzureASOManagedControlPlaneTemplate 73 matchResources: 74 controlPlane: true 75 jsonPatches: 76 - op: replace 77 path: /spec/template/spec 78 valueFrom: 79 template: | 80 version: ${KUBERNETES_VERSION} 81 resources: 82 - apiVersion: containerservice.azure.com/v1api20231001 83 kind: ManagedCluster 84 metadata: 85 name: "{{ .builtin.cluster.name }}" 86 annotations: 87 serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME} 88 spec: 89 owner: 90 name: "{{ .builtin.cluster.name }}" 91 dnsPrefix: "{{ .builtin.cluster.name }}" 92 location: ${AZURE_LOCATION} 93 identity: 94 type: SystemAssigned 95 servicePrincipalProfile: 96 clientId: msi 97 networkProfile: 98 networkPlugin: azure 99 - name: azureasomanagedmachinepool-pool0-spec 100 definitions: 101 - selector: 102 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 103 kind: AzureASOManagedMachinePoolTemplate 104 matchResources: 105 machinePoolClass: 106 names: 107 - default-system 108 jsonPatches: 109 - op: replace 110 path: /spec/template/spec 111 valueFrom: 112 template: | 113 resources: 114 - apiVersion: "containerservice.azure.com/v1api20231001" 115 kind: ManagedClustersAgentPool 116 metadata: 117 name: "{{ .builtin.cluster.name }}-pool0" 118 annotations: 119 serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME} 120 spec: 121 azureName: "pool0" 122 owner: 123 name: "{{ .builtin.cluster.name }}" 124 mode: System 125 type: VirtualMachineScaleSets 126 vmSize: ${AZURE_NODE_MACHINE_TYPE} 127 - name: azureasomanagedmachinepool-pool1-spec 128 definitions: 129 - selector: 130 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 131 kind: AzureASOManagedMachinePoolTemplate 132 matchResources: 133 machinePoolClass: 134 names: 135 - default-worker 136 jsonPatches: 137 - op: replace 138 path: /spec/template/spec 139 valueFrom: 140 template: | 141 resources: 142 - apiVersion: containerservice.azure.com/v1api20231001 143 kind: ManagedClustersAgentPool 144 metadata: 145 name: "{{ .builtin.cluster.name }}-pool1" 146 annotations: 147 serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME} 148 spec: 149 azureName: "pool1" 150 owner: 151 name: "{{ .builtin.cluster.name }}" 152 mode: User 153 type: VirtualMachineScaleSets 154 vmSize: ${AZURE_NODE_MACHINE_TYPE} 155