sigs.k8s.io/cluster-api-provider-azure@v1.14.3/test/e2e/data/infrastructure-azure/v1beta1/bases/cluster-with-kcp.yaml (about)

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