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