sigs.k8s.io/cluster-api-provider-azure@v1.17.0/templates/test/ci/cluster-template-prow-dual-stack.yaml (about)

     1  apiVersion: cluster.x-k8s.io/v1beta1
     2  kind: Cluster
     3  metadata:
     4    labels:
     5      cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL:=azure}
     6      cni: calico-dual-stack
     7    name: ${CLUSTER_NAME}
     8    namespace: default
     9  spec:
    10    clusterNetwork:
    11      pods:
    12        cidrBlocks:
    13        - 10.244.0.0/16
    14        - 2001:1234:5678:9a40::/58
    15      services:
    16        cidrBlocks:
    17        - 10.0.0.0/16
    18        - fd00::/108
    19    controlPlaneRef:
    20      apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    21      kind: KubeadmControlPlane
    22      name: ${CLUSTER_NAME}-control-plane
    23    infrastructureRef:
    24      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    25      kind: AzureCluster
    26      name: ${CLUSTER_NAME}
    27  ---
    28  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    29  kind: AzureCluster
    30  metadata:
    31    name: ${CLUSTER_NAME}
    32    namespace: default
    33  spec:
    34    additionalTags:
    35      buildProvenance: ${BUILD_PROVENANCE}
    36      creationTimestamp: ${TIMESTAMP}
    37      jobName: ${JOB_NAME}
    38    identityRef:
    39      apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    40      kind: AzureClusterIdentity
    41      name: ${CLUSTER_IDENTITY_NAME}
    42    location: ${AZURE_LOCATION}
    43    networkSpec:
    44      subnets:
    45      - cidrBlocks:
    46        - 10.0.0.0/16
    47        - 2001:1234:5678:9abc::/64
    48        name: control-plane-subnet
    49        role: control-plane
    50      - cidrBlocks:
    51        - 10.1.0.0/16
    52        - 2001:1234:5678:9abd::/64
    53        name: node-subnet
    54        role: node
    55      vnet:
    56        cidrBlocks:
    57        - 10.0.0.0/8
    58        - 2001:1234:5678:9a00::/56
    59        name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet}
    60    resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}}
    61    subscriptionID: ${AZURE_SUBSCRIPTION_ID}
    62  ---
    63  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    64  kind: KubeadmControlPlane
    65  metadata:
    66    name: ${CLUSTER_NAME}-control-plane
    67    namespace: default
    68  spec:
    69    kubeadmConfigSpec:
    70      clusterConfiguration:
    71        apiServer:
    72          extraArgs:
    73            cloud-provider: external
    74          timeoutForControlPlane: 20m
    75        controllerManager:
    76          extraArgs:
    77            allocate-node-cidrs: "true"
    78            cloud-provider: external
    79            cluster-cidr: 10.244.0.0/16,2001:1234:5678:9a40::/58
    80            cluster-name: ${CLUSTER_NAME}
    81            configure-cloud-routes: "true"
    82            v: "4"
    83        etcd:
    84          local:
    85            dataDir: /var/lib/etcddisk/etcd
    86            extraArgs:
    87              quota-backend-bytes: "8589934592"
    88      diskSetup:
    89        filesystems:
    90        - device: /dev/disk/azure/scsi1/lun0
    91          extraOpts:
    92          - -E
    93          - lazy_itable_init=1,lazy_journal_init=1
    94          filesystem: ext4
    95          label: etcd_disk
    96        - device: ephemeral0.1
    97          filesystem: ext4
    98          label: ephemeral0
    99          replaceFS: ntfs
   100        partitions:
   101        - device: /dev/disk/azure/scsi1/lun0
   102          layout: true
   103          overwrite: false
   104          tableType: gpt
   105      files:
   106      - contentFrom:
   107          secret:
   108            key: control-plane-azure.json
   109            name: ${CLUSTER_NAME}-control-plane-azure-json
   110        owner: root:root
   111        path: /etc/kubernetes/azure.json
   112        permissions: "0644"
   113      initConfiguration:
   114        localAPIEndpoint:
   115          bindPort: 6443
   116        nodeRegistration:
   117          kubeletExtraArgs:
   118            cloud-provider: external
   119          name: '{{ ds.meta_data["local_hostname"] }}'
   120      joinConfiguration:
   121        controlPlane:
   122          localAPIEndpoint:
   123            bindPort: 6443
   124        nodeRegistration:
   125          kubeletExtraArgs:
   126            cloud-provider: external
   127          name: '{{ ds.meta_data["local_hostname"] }}'
   128      mounts:
   129      - - LABEL=etcd_disk
   130        - /var/lib/etcddisk
   131      postKubeadmCommands: []
   132      preKubeadmCommands: []
   133    machineTemplate:
   134      infrastructureRef:
   135        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   136        kind: AzureMachineTemplate
   137        name: ${CLUSTER_NAME}-control-plane
   138    replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
   139    version: ${KUBERNETES_VERSION}
   140  ---
   141  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   142  kind: AzureMachineTemplate
   143  metadata:
   144    name: ${CLUSTER_NAME}-control-plane
   145    namespace: default
   146  spec:
   147    template:
   148      spec:
   149        dataDisks:
   150        - diskSizeGB: 256
   151          lun: 0
   152          nameSuffix: etcddisk
   153        enableIPForwarding: true
   154        identity: UserAssigned
   155        osDisk:
   156          diskSizeGB: 128
   157          osType: Linux
   158        sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
   159        userAssignedIdentities:
   160        - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity}
   161        vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE}
   162  ---
   163  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   164  kind: AzureClusterIdentity
   165  metadata:
   166    labels:
   167      clusterctl.cluster.x-k8s.io/move-hierarchy: "true"
   168    name: ${CLUSTER_IDENTITY_NAME}
   169    namespace: default
   170  spec:
   171    allowedNamespaces: {}
   172    clientID: ${AZURE_CLIENT_ID_USER_ASSIGNED_IDENTITY}
   173    tenantID: ${AZURE_TENANT_ID}
   174    type: ${CLUSTER_IDENTITY_TYPE:=WorkloadIdentity}
   175  ---
   176  apiVersion: cluster.x-k8s.io/v1beta1
   177  kind: MachineDeployment
   178  metadata:
   179    name: ${CLUSTER_NAME}-md-0
   180    namespace: default
   181  spec:
   182    clusterName: ${CLUSTER_NAME}
   183    replicas: ${WORKER_MACHINE_COUNT:=2}
   184    selector:
   185      matchLabels: null
   186    template:
   187      spec:
   188        bootstrap:
   189          configRef:
   190            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   191            kind: KubeadmConfigTemplate
   192            name: ${CLUSTER_NAME}-md-0
   193        clusterName: ${CLUSTER_NAME}
   194        infrastructureRef:
   195          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   196          kind: AzureMachineTemplate
   197          name: ${CLUSTER_NAME}-md-0
   198        version: ${KUBERNETES_VERSION}
   199  ---
   200  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   201  kind: AzureMachineTemplate
   202  metadata:
   203    name: ${CLUSTER_NAME}-md-0
   204    namespace: default
   205  spec:
   206    template:
   207      spec:
   208        enableIPForwarding: true
   209        identity: UserAssigned
   210        osDisk:
   211          diskSizeGB: 30
   212          managedDisk:
   213            storageAccountType: Premium_LRS
   214          osType: Linux
   215        sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
   216        userAssignedIdentities:
   217        - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity}
   218        vmSize: ${AZURE_NODE_MACHINE_TYPE}
   219  ---
   220  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   221  kind: KubeadmConfigTemplate
   222  metadata:
   223    name: ${CLUSTER_NAME}-md-0
   224    namespace: default
   225  spec:
   226    template:
   227      spec:
   228        files:
   229        - contentFrom:
   230            secret:
   231              key: worker-node-azure.json
   232              name: ${CLUSTER_NAME}-md-0-azure-json
   233          owner: root:root
   234          path: /etc/kubernetes/azure.json
   235          permissions: "0644"
   236        joinConfiguration:
   237          nodeRegistration:
   238            kubeletExtraArgs:
   239              cloud-provider: external
   240            name: '{{ ds.meta_data["local_hostname"] }}'
   241  ---
   242  apiVersion: cluster.x-k8s.io/v1beta1
   243  kind: MachinePool
   244  metadata:
   245    name: ${CLUSTER_NAME}-mp-0
   246    namespace: default
   247  spec:
   248    clusterName: ${CLUSTER_NAME}
   249    replicas: ${WORKER_MACHINE_COUNT}
   250    template:
   251      spec:
   252        bootstrap:
   253          configRef:
   254            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   255            kind: KubeadmConfig
   256            name: ${CLUSTER_NAME}-mp-0
   257        clusterName: ${CLUSTER_NAME}
   258        infrastructureRef:
   259          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   260          kind: AzureMachinePool
   261          name: ${CLUSTER_NAME}-mp-0
   262        version: ${KUBERNETES_VERSION}
   263  ---
   264  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   265  kind: AzureMachinePool
   266  metadata:
   267    name: ${CLUSTER_NAME}-mp-0
   268    namespace: default
   269  spec:
   270    location: ${AZURE_LOCATION}
   271    strategy:
   272      rollingUpdate:
   273        deletePolicy: Oldest
   274        maxSurge: 25%
   275        maxUnavailable: 1
   276      type: RollingUpdate
   277    template:
   278      osDisk:
   279        diskSizeGB: 30
   280        managedDisk:
   281          storageAccountType: Premium_LRS
   282        osType: Linux
   283      sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
   284      vmSize: ${AZURE_NODE_MACHINE_TYPE}
   285  ---
   286  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   287  kind: KubeadmConfig
   288  metadata:
   289    name: ${CLUSTER_NAME}-mp-0
   290    namespace: default
   291  spec:
   292    files:
   293    - contentFrom:
   294        secret:
   295          key: worker-node-azure.json
   296          name: ${CLUSTER_NAME}-md-0-azure-json
   297      owner: root:root
   298      path: /etc/kubernetes/azure.json
   299      permissions: "0644"
   300    joinConfiguration:
   301      nodeRegistration:
   302        kubeletExtraArgs:
   303          cloud-provider: external
   304          cluster-dns: '[fd00::10]'
   305        name: '{{ ds.meta_data["local_hostname"] }}'
   306  ---
   307  apiVersion: addons.cluster.x-k8s.io/v1alpha1
   308  kind: HelmChartProxy
   309  metadata:
   310    name: calico-dual-stack
   311    namespace: default
   312  spec:
   313    chartName: tigera-operator
   314    clusterSelector:
   315      matchLabels:
   316        cni: calico-dual-stack
   317    namespace: tigera-operator
   318    releaseName: projectcalico
   319    repoURL: https://docs.tigera.io/calico/charts
   320    valuesTemplate: |
   321      installation:
   322        cni:
   323          type: Calico
   324          ipam:
   325            type: HostLocal
   326        calicoNetwork:
   327          bgp: Disabled
   328          mtu: 1350
   329          ipPools:
   330          - blockSize: 26
   331            cidr: {{ index .Cluster.spec.clusterNetwork.pods.cidrBlocks 0 }}
   332            encapsulation: None
   333            natOutgoing: Enabled
   334            nodeSelector: all()
   335          - blockSize: 122
   336            cidr: {{ index .Cluster.spec.clusterNetwork.pods.cidrBlocks 1 }}
   337            encapsulation: None
   338            natOutgoing: Enabled
   339            nodeSelector: all()
   340        registry: mcr.microsoft.com/oss
   341      # Image and registry configuration for the tigera/operator pod.
   342      tigeraOperator:
   343        image: tigera/operator
   344        registry: mcr.microsoft.com/oss
   345      calicoctl:
   346        image: mcr.microsoft.com/oss/calico/ctl
   347    version: ${CALICO_VERSION}
   348  ---
   349  apiVersion: addons.cluster.x-k8s.io/v1alpha1
   350  kind: HelmChartProxy
   351  metadata:
   352    name: azuredisk-csi-driver-chart
   353    namespace: default
   354  spec:
   355    chartName: azuredisk-csi-driver
   356    clusterSelector:
   357      matchLabels:
   358        azuredisk-csi: "true"
   359    namespace: kube-system
   360    releaseName: azuredisk-csi-driver-oot
   361    repoURL: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts
   362    valuesTemplate: |-
   363      controller:
   364        replicas: 1
   365        runOnControlPlane: true
   366      windows:
   367        useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }}
   368  ---
   369  apiVersion: addons.cluster.x-k8s.io/v1alpha1
   370  kind: HelmChartProxy
   371  metadata:
   372    name: cloud-provider-azure-chart
   373    namespace: default
   374  spec:
   375    chartName: cloud-provider-azure
   376    clusterSelector:
   377      matchLabels:
   378        cloud-provider: azure
   379    releaseName: cloud-provider-azure-oot
   380    repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo
   381    valuesTemplate: |
   382      infra:
   383        clusterName: {{ .Cluster.metadata.name }}
   384      cloudControllerManager:
   385        clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }}
   386        logVerbosity: 4
   387  ---
   388  apiVersion: addons.cluster.x-k8s.io/v1alpha1
   389  kind: HelmChartProxy
   390  metadata:
   391    name: cloud-provider-azure-chart-ci
   392    namespace: default
   393  spec:
   394    chartName: cloud-provider-azure
   395    clusterSelector:
   396      matchLabels:
   397        cloud-provider: azure-ci
   398    releaseName: cloud-provider-azure-oot
   399    repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo
   400    valuesTemplate: |
   401      infra:
   402        clusterName: {{ .Cluster.metadata.name }}
   403      cloudControllerManager:
   404        cloudConfig: ${CLOUD_CONFIG:-"/etc/kubernetes/azure.json"}
   405        cloudConfigSecretName: ${CONFIG_SECRET_NAME:-""}
   406        clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }}
   407        imageName: "${CCM_IMAGE_NAME:-""}"
   408        imageRepository: "${IMAGE_REGISTRY:-""}"
   409        imageTag: "${IMAGE_TAG_CCM:-""}"
   410        logVerbosity: ${CCM_LOG_VERBOSITY:-4}
   411        replicas: ${CCM_COUNT:-1}
   412        enableDynamicReloading: ${ENABLE_DYNAMIC_RELOADING:-false}
   413      cloudNodeManager:
   414        imageName: "${CNM_IMAGE_NAME:-""}"
   415        imageRepository: "${IMAGE_REGISTRY:-""}"
   416        imageTag: "${IMAGE_TAG_CNM:-""}"