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