sigs.k8s.io/cluster-api-provider-azure@v1.14.3/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool.yaml (about)

     1  apiVersion: addons.cluster.x-k8s.io/v1alpha1
     2  kind: HelmChartProxy
     3  metadata:
     4    name: azuredisk-csi-driver-chart
     5  spec:
     6    chartName: azuredisk-csi-driver
     7    clusterSelector:
     8      matchLabels:
     9        azuredisk-csi: "true"
    10    namespace: kube-system
    11    releaseName: azuredisk-csi-driver-oot
    12    repoURL: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts
    13    valuesTemplate: |-
    14      controller:
    15        replicas: 1
    16        runOnControlPlane: true
    17      windows:
    18        useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }}
    19  ---
    20  apiVersion: addons.cluster.x-k8s.io/v1alpha1
    21  kind: HelmChartProxy
    22  metadata:
    23    name: calico
    24  spec:
    25    chartName: tigera-operator
    26    clusterSelector:
    27      matchLabels:
    28        cni: calico
    29    namespace: tigera-operator
    30    releaseName: projectcalico
    31    repoURL: https://docs.tigera.io/calico/charts
    32    valuesTemplate: |-
    33      installation:
    34        cni:
    35          type: Calico
    36        calicoNetwork:
    37          bgp: Disabled
    38          mtu: 1350
    39          ipPools:
    40          ipPools:{{range $i, $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }}
    41          - cidr: {{ $cidr }}
    42            encapsulation: VXLAN{{end}}
    43        registry: mcr.microsoft.com/oss
    44      # Image and registry configuration for the tigera/operator pod.
    45      tigeraOperator:
    46        image: tigera/operator
    47        registry: mcr.microsoft.com/oss
    48      calicoctl:
    49        image: mcr.microsoft.com/oss/calico/ctl
    50    version: ${CALICO_VERSION}
    51  ---
    52  apiVersion: addons.cluster.x-k8s.io/v1alpha1
    53  kind: HelmChartProxy
    54  metadata:
    55    name: cloud-provider-azure-chart
    56  spec:
    57    chartName: cloud-provider-azure
    58    clusterSelector:
    59      matchLabels:
    60        cloud-provider: azure
    61    releaseName: cloud-provider-azure-oot
    62    repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo
    63    valuesTemplate: |
    64      infra:
    65        clusterName: {{ .Cluster.metadata.name }}
    66      cloudControllerManager:
    67        clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }}
    68        logVerbosity: 4
    69  ---
    70  apiVersion: addons.cluster.x-k8s.io/v1alpha1
    71  kind: HelmChartProxy
    72  metadata:
    73    name: cloud-provider-azure-chart-ci
    74  spec:
    75    chartName: cloud-provider-azure
    76    clusterSelector:
    77      matchLabels:
    78        cloud-provider: azure-ci
    79    releaseName: cloud-provider-azure-oot
    80    repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo
    81    valuesTemplate: |
    82      infra:
    83        clusterName: {{ .Cluster.metadata.name }}
    84      cloudControllerManager:
    85        cloudConfig: ${CLOUD_CONFIG:-"/etc/kubernetes/azure.json"}
    86        cloudConfigSecretName: ${CONFIG_SECRET_NAME:-""}
    87        clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }}
    88        imageName: "${CCM_IMAGE_NAME:-""}"
    89        imageRepository: "${IMAGE_REGISTRY:-""}"
    90        imageTag: "${IMAGE_TAG_CCM:-""}"
    91        logVerbosity: ${CCM_LOG_VERBOSITY:-4}
    92        replicas: ${CCM_COUNT:-1}
    93        enableDynamicReloading: ${ENABLE_DYNAMIC_RELOADING:-false}
    94      cloudNodeManager:
    95        imageName: "${CNM_IMAGE_NAME:-""}"
    96        imageRepository: "${IMAGE_REGISTRY:-""}"
    97        imageTag: "${IMAGE_TAG_CNM:-""}"
    98  ---
    99  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   100  kind: KubeadmConfig
   101  metadata:
   102    name: ${CLUSTER_NAME}-mp-0
   103    namespace: default
   104  spec:
   105    files:
   106    - contentFrom:
   107        secret:
   108          key: worker-node-azure.json
   109          name: ${CLUSTER_NAME}-mp-0-azure-json
   110      owner: root:root
   111      path: /etc/kubernetes/azure.json
   112      permissions: "0644"
   113    joinConfiguration:
   114      nodeRegistration:
   115        kubeletExtraArgs:
   116          cloud-provider: external
   117        name: '{{ ds.meta_data["local_hostname"] }}'
   118  ---
   119  apiVersion: cluster.x-k8s.io/v1beta1
   120  kind: Cluster
   121  metadata:
   122    labels:
   123      cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL:=azure}
   124      cni: calico
   125    name: ${CLUSTER_NAME}
   126    namespace: default
   127  spec:
   128    clusterNetwork:
   129      pods:
   130        cidrBlocks:
   131        - 192.168.0.0/16
   132    controlPlaneRef:
   133      apiVersion: controlplane.cluster.x-k8s.io/v1beta1
   134      kind: KubeadmControlPlane
   135      name: ${CLUSTER_NAME}-control-plane
   136    infrastructureRef:
   137      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   138      kind: AzureCluster
   139      name: ${CLUSTER_NAME}
   140  ---
   141  apiVersion: cluster.x-k8s.io/v1beta1
   142  kind: MachinePool
   143  metadata:
   144    name: ${CLUSTER_NAME}-mp-0
   145    namespace: default
   146  spec:
   147    clusterName: ${CLUSTER_NAME}
   148    replicas: ${WORKER_MACHINE_COUNT}
   149    template:
   150      spec:
   151        bootstrap:
   152          configRef:
   153            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   154            kind: KubeadmConfig
   155            name: ${CLUSTER_NAME}-mp-0
   156        clusterName: ${CLUSTER_NAME}
   157        infrastructureRef:
   158          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   159          kind: AzureMachinePool
   160          name: ${CLUSTER_NAME}-mp-0
   161        version: ${KUBERNETES_VERSION}
   162  ---
   163  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
   164  kind: KubeadmControlPlane
   165  metadata:
   166    labels:
   167      cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
   168    name: ${CLUSTER_NAME}-control-plane
   169  spec:
   170    kubeadmConfigSpec:
   171      clusterConfiguration:
   172        apiServer:
   173          extraArgs:
   174            cloud-provider: external
   175          extraVolumes:
   176          - hostPath: /etc/kubernetes/azure.json
   177            mountPath: /etc/kubernetes/azure.json
   178            name: cloud-config
   179            readOnly: true
   180          timeoutForControlPlane: 20m
   181        controllerManager:
   182          extraArgs:
   183            allocate-node-cidrs: "false"
   184            cloud-provider: external
   185            cluster-name: ${CLUSTER_NAME}
   186          extraVolumes:
   187          - hostPath: /etc/kubernetes/azure.json
   188            mountPath: /etc/kubernetes/azure.json
   189            name: cloud-config
   190            readOnly: true
   191        etcd:
   192          local:
   193            dataDir: /var/lib/etcddisk/etcd
   194      diskSetup:
   195        filesystems:
   196        - device: /dev/disk/azure/scsi1/lun0
   197          extraOpts:
   198          - -E
   199          - lazy_itable_init=1,lazy_journal_init=1
   200          filesystem: ext4
   201          label: etcd_disk
   202        - device: ephemeral0.1
   203          filesystem: ext4
   204          label: ephemeral0
   205          replaceFS: ntfs
   206        partitions:
   207        - device: /dev/disk/azure/scsi1/lun0
   208          layout: true
   209          overwrite: false
   210          tableType: gpt
   211      files:
   212      - contentFrom:
   213          secret:
   214            key: control-plane-azure.json
   215            name: ${CLUSTER_NAME}-control-plane-azure-json
   216        owner: root:root
   217        path: /etc/kubernetes/azure.json
   218        permissions: "0644"
   219      initConfiguration:
   220        nodeRegistration:
   221          kubeletExtraArgs:
   222            cloud-provider: external
   223          name: '{{ ds.meta_data["local_hostname"] }}'
   224      joinConfiguration:
   225        nodeRegistration:
   226          kubeletExtraArgs:
   227            cloud-provider: external
   228          name: '{{ ds.meta_data["local_hostname"] }}'
   229      mounts:
   230      - - LABEL=etcd_disk
   231        - /var/lib/etcddisk
   232    machineTemplate:
   233      infrastructureRef:
   234        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   235        kind: AzureMachineTemplate
   236        name: ${CLUSTER_NAME}-control-plane
   237    replicas: ${CONTROL_PLANE_MACHINE_COUNT}
   238    version: ${KUBERNETES_VERSION}
   239  ---
   240  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   241  kind: AzureCluster
   242  metadata:
   243    name: ${CLUSTER_NAME}
   244  spec:
   245    additionalTags:
   246      creationTimestamp: ${TIMESTAMP}
   247      jobName: ${JOB_NAME}
   248    identityRef:
   249      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   250      kind: AzureClusterIdentity
   251      name: ${CLUSTER_IDENTITY_NAME}
   252    location: ${AZURE_LOCATION}
   253    networkSpec:
   254      vnet:
   255        name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet}
   256    resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}}
   257    subscriptionID: ${AZURE_SUBSCRIPTION_ID}
   258  ---
   259  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   260  kind: AzureClusterIdentity
   261  metadata:
   262    labels:
   263      clusterctl.cluster.x-k8s.io/move-hierarchy: "true"
   264    name: ${CLUSTER_IDENTITY_NAME}
   265  spec:
   266    allowedNamespaces: {}
   267    clientID: ${AZURE_CLIENT_ID}
   268    clientSecret:
   269      name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME}
   270      namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE}
   271    tenantID: ${AZURE_TENANT_ID}
   272    type: ServicePrincipal
   273  ---
   274  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   275  kind: AzureMachinePool
   276  metadata:
   277    name: ${CLUSTER_NAME}-mp-0
   278    namespace: default
   279  spec:
   280    identity: SystemAssigned
   281    location: ${AZURE_LOCATION}
   282    template:
   283      osDisk:
   284        diskSizeGB: 30
   285        managedDisk:
   286          storageAccountType: Premium_LRS
   287        osType: Linux
   288      sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
   289      vmSize: ${AZURE_NODE_MACHINE_TYPE}
   290  ---
   291  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   292  kind: AzureMachineTemplate
   293  metadata:
   294    name: ${CLUSTER_NAME}-control-plane
   295    namespace: default
   296  spec:
   297    template:
   298      spec:
   299        dataDisks:
   300        - diskSizeGB: 256
   301          lun: 0
   302          nameSuffix: etcddisk
   303        osDisk:
   304          diskSizeGB: 128
   305          osType: Linux
   306        sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
   307        vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE}