sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/flavors/base/cluster-template.yaml (about)

     1  ---
     2  apiVersion: cluster.x-k8s.io/v1beta1
     3  kind: Cluster
     4  metadata:
     5    name: ${CLUSTER_NAME}
     6  spec:
     7    clusterNetwork:
     8      pods:
     9        cidrBlocks: [ "192.168.0.0/16" ]
    10    infrastructureRef:
    11      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    12      kind: AzureCluster
    13      name: ${CLUSTER_NAME}
    14    controlPlaneRef:
    15      kind: KubeadmControlPlane
    16      apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    17      name: "${CLUSTER_NAME}-control-plane"
    18  ---
    19  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    20  kind: AzureCluster
    21  metadata:
    22    name: ${CLUSTER_NAME}
    23  spec:
    24    resourceGroup: "${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}}"
    25    location: "${AZURE_LOCATION}"
    26    subscriptionID: ${AZURE_SUBSCRIPTION_ID}
    27    networkSpec:
    28      vnet:
    29        name: "${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet}"
    30      subnets:
    31      - name: control-plane-subnet
    32        role: control-plane
    33      - name: node-subnet
    34        role: node
    35  ---
    36  kind: KubeadmControlPlane
    37  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    38  metadata:
    39    name: "${CLUSTER_NAME}-control-plane"
    40  spec:
    41    replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
    42    machineTemplate:
    43      infrastructureRef:
    44        kind: AzureMachineTemplate
    45        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    46        name: "${CLUSTER_NAME}-control-plane"
    47    kubeadmConfigSpec:
    48      initConfiguration:
    49        nodeRegistration:
    50          name: '{{ ds.meta_data["local_hostname"] }}'
    51          kubeletExtraArgs:
    52            cloud-provider: external
    53      joinConfiguration:
    54        nodeRegistration:
    55          name: '{{ ds.meta_data["local_hostname"] }}'
    56          kubeletExtraArgs:
    57            cloud-provider: external
    58      clusterConfiguration:
    59        apiServer:
    60          timeoutForControlPlane: 20m
    61          extraArgs:
    62            cloud-provider: external
    63        controllerManager:
    64          extraArgs:
    65            allocate-node-cidrs: "false"
    66            cluster-name: ${CLUSTER_NAME}
    67            cloud-provider: external
    68        etcd:
    69          local:
    70            dataDir: "/var/lib/etcddisk/etcd"
    71            extraArgs:
    72              quota-backend-bytes: "8589934592"
    73      files:
    74        - contentFrom:
    75            secret:
    76              name: ${CLUSTER_NAME}-control-plane-azure-json
    77              key: control-plane-azure.json
    78          owner: root:root
    79          path: /etc/kubernetes/azure.json
    80          permissions: "0644"
    81      diskSetup:
    82        partitions:
    83          - device: /dev/disk/azure/scsi1/lun0
    84            tableType: gpt
    85            layout: true
    86            overwrite: false
    87        filesystems:
    88          - label: etcd_disk
    89            filesystem: ext4
    90            device: /dev/disk/azure/scsi1/lun0
    91            extraOpts:
    92              - "-E"
    93              - "lazy_itable_init=1,lazy_journal_init=1"
    94          - label: ephemeral0
    95            filesystem: ext4
    96            device: ephemeral0.1
    97            replaceFS: ntfs
    98      mounts:
    99        - - LABEL=etcd_disk
   100          - /var/lib/etcddisk
   101      preKubeadmCommands: []
   102      postKubeadmCommands: []
   103    version: "${KUBERNETES_VERSION}"
   104  ---
   105  kind: AzureMachineTemplate
   106  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   107  metadata:
   108    name: "${CLUSTER_NAME}-control-plane"
   109  spec:
   110    template:
   111      spec:
   112        vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE}
   113        osDisk:
   114          osType: "Linux"
   115          diskSizeGB: 128
   116        dataDisks:
   117          - nameSuffix: etcddisk
   118            diskSizeGB: 256
   119            lun: 0
   120        sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}