sigs.k8s.io/cluster-api-provider-azure@v1.17.0/templates/cluster-template-aks-aso-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    patches:
    18    - definitions:
    19      - jsonPatches:
    20        - op: replace
    21          path: /spec/template/spec
    22          valueFrom:
    23            template: |
    24              resources:
    25              - apiVersion: resources.azure.com/v1api20200601
    26                kind: ResourceGroup
    27                metadata:
    28                  name: "{{ .builtin.cluster.name }}"
    29                  annotations:
    30                    serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
    31                spec:
    32                  location: ${AZURE_LOCATION}
    33        selector:
    34          apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
    35          kind: AzureASOManagedClusterTemplate
    36          matchResources:
    37            infrastructureCluster: true
    38      name: azureasomanagedcluster-spec
    39    - definitions:
    40      - jsonPatches:
    41        - op: replace
    42          path: /spec/template/spec
    43          valueFrom:
    44            template: |
    45              version: ${KUBERNETES_VERSION}
    46              resources:
    47              - apiVersion: containerservice.azure.com/v1api20231001
    48                kind: ManagedCluster
    49                metadata:
    50                  name: "{{ .builtin.cluster.name }}"
    51                  annotations:
    52                    serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
    53                spec:
    54                  owner:
    55                    name: "{{ .builtin.cluster.name }}"
    56                  dnsPrefix: "{{ .builtin.cluster.name }}"
    57                  location: ${AZURE_LOCATION}
    58                  identity:
    59                    type: SystemAssigned
    60                  servicePrincipalProfile:
    61                    clientId: msi
    62                  networkProfile:
    63                    networkPlugin: azure
    64        selector:
    65          apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
    66          kind: AzureASOManagedControlPlaneTemplate
    67          matchResources:
    68            controlPlane: true
    69      name: azureasomanagedcontrolplane-spec
    70    - definitions:
    71      - jsonPatches:
    72        - op: replace
    73          path: /spec/template/spec
    74          valueFrom:
    75            template: |
    76              resources:
    77              - apiVersion: "containerservice.azure.com/v1api20231001"
    78                kind: ManagedClustersAgentPool
    79                metadata:
    80                  name: "{{ .builtin.cluster.name }}-pool0"
    81                  annotations:
    82                    serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
    83                spec:
    84                  azureName: "pool0"
    85                  owner:
    86                    name: "{{ .builtin.cluster.name }}"
    87                  mode: System
    88                  type: VirtualMachineScaleSets
    89                  vmSize: ${AZURE_NODE_MACHINE_TYPE}
    90        selector:
    91          apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
    92          kind: AzureASOManagedMachinePoolTemplate
    93          matchResources:
    94            machinePoolClass:
    95              names:
    96              - default-system
    97      name: azureasomanagedmachinepool-pool0-spec
    98    - definitions:
    99      - jsonPatches:
   100        - op: replace
   101          path: /spec/template/spec
   102          valueFrom:
   103            template: |
   104              resources:
   105              - apiVersion: containerservice.azure.com/v1api20231001
   106                kind: ManagedClustersAgentPool
   107                metadata:
   108                  name: "{{ .builtin.cluster.name }}-pool1"
   109                  annotations:
   110                    serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
   111                spec:
   112                  azureName: "pool1"
   113                  owner:
   114                    name: "{{ .builtin.cluster.name }}"
   115                  mode: User
   116                  type: VirtualMachineScaleSets
   117                  vmSize: ${AZURE_NODE_MACHINE_TYPE}
   118        selector:
   119          apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
   120          kind: AzureASOManagedMachinePoolTemplate
   121          matchResources:
   122            machinePoolClass:
   123              names:
   124              - default-worker
   125      name: azureasomanagedmachinepool-pool1-spec
   126    workers:
   127      machinePools:
   128      - class: default-system
   129        template:
   130          bootstrap:
   131            ref:
   132              apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   133              kind: KubeadmConfigTemplate
   134              name: ${CLUSTER_NAME}-pool0
   135          infrastructure:
   136            ref:
   137              apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
   138              kind: AzureASOManagedMachinePoolTemplate
   139              name: ${CLUSTER_NAME}-pool0
   140      - class: default-worker
   141        template:
   142          bootstrap:
   143            ref:
   144              apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   145              kind: KubeadmConfigTemplate
   146              name: ${CLUSTER_NAME}-pool1
   147          infrastructure:
   148            ref:
   149              apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
   150              kind: AzureASOManagedMachinePoolTemplate
   151              name: ${CLUSTER_NAME}-pool1
   152  ---
   153  apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
   154  kind: AzureASOManagedControlPlaneTemplate
   155  metadata:
   156    name: ${CLUSTER_NAME}-control-plane
   157    namespace: default
   158  spec:
   159    template:
   160      spec: {}
   161  ---
   162  apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
   163  kind: AzureASOManagedClusterTemplate
   164  metadata:
   165    name: ${CLUSTER_NAME}
   166    namespace: default
   167  spec:
   168    template:
   169      spec: {}
   170  ---
   171  apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
   172  kind: AzureASOManagedMachinePoolTemplate
   173  metadata:
   174    name: ${CLUSTER_NAME}-pool0
   175    namespace: default
   176  spec:
   177    template:
   178      spec: {}
   179  ---
   180  apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
   181  kind: AzureASOManagedMachinePoolTemplate
   182  metadata:
   183    name: ${CLUSTER_NAME}-pool1
   184    namespace: default
   185  spec:
   186    template:
   187      spec: {}
   188  ---
   189  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   190  kind: KubeadmConfigTemplate
   191  metadata:
   192    name: ${CLUSTER_NAME}-pool0
   193    namespace: default
   194  spec:
   195    template:
   196      spec: {}
   197  ---
   198  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   199  kind: KubeadmConfigTemplate
   200  metadata:
   201    name: ${CLUSTER_NAME}-pool1
   202    namespace: default
   203  spec:
   204    template:
   205      spec: {}