sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/flavors/windows/machine-deployment-windows.yaml (about)

     1  ---
     2  apiVersion: cluster.x-k8s.io/v1beta1
     3  kind: MachineDeployment
     4  metadata:
     5    name: "${CLUSTER_NAME}-md-win"
     6  spec:
     7    clusterName: "${CLUSTER_NAME}"
     8    replicas: ${WORKER_MACHINE_COUNT:=2}
     9    selector:
    10      matchLabels:
    11    template:
    12      spec:
    13        clusterName: "${CLUSTER_NAME}"
    14        version: "${KUBERNETES_VERSION}"
    15        bootstrap:
    16          configRef:
    17            name: "${CLUSTER_NAME}-md-win"
    18            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    19            kind: KubeadmConfigTemplate
    20        infrastructureRef:
    21          name: "${CLUSTER_NAME}-md-win"
    22          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    23          kind: AzureMachineTemplate
    24  ---
    25  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    26  kind: AzureMachineTemplate
    27  metadata:
    28    name: "${CLUSTER_NAME}-md-win"
    29    annotations:
    30      runtime: containerd
    31  spec:
    32    template:
    33      metadata:
    34        annotations:
    35          runtime: containerd
    36      spec:
    37        vmSize: ${AZURE_NODE_MACHINE_TYPE}
    38        osDisk:
    39          osType: "Windows"
    40          diskSizeGB: 128
    41          managedDisk:
    42            storageAccountType: "Premium_LRS"
    43        sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
    44  ---
    45  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    46  kind: KubeadmConfigTemplate
    47  metadata:
    48    name: "${CLUSTER_NAME}-md-win"
    49  spec:
    50    template:
    51      spec:
    52        users:
    53        - name: capi
    54          groups: Administrators
    55          sshAuthorizedKeys:
    56          - ${AZURE_SSH_PUBLIC_KEY:=""}
    57        preKubeadmCommands: []
    58        postKubeadmCommands:
    59          - nssm set kubelet start SERVICE_AUTO_START
    60          - powershell C:/defender-exclude-calico.ps1
    61        joinConfiguration:
    62          nodeRegistration:
    63            name: '{{ ds.meta_data["local_hostname"] }}'
    64            criSocket: npipe:////./pipe/containerd-containerd
    65            kubeletExtraArgs:
    66              cloud-provider: external
    67              v: "2"
    68              windows-priorityclass: "ABOVE_NORMAL_PRIORITY_CLASS"
    69        files:
    70        - contentFrom:
    71            secret:
    72              name: ${CLUSTER_NAME}-md-win-azure-json
    73              key: worker-node-azure.json
    74          owner: root:root
    75          path: c:/k/azure.json
    76          permissions: "0644"
    77        - path: C:/defender-exclude-calico.ps1
    78          permissions: "0744"
    79          content: |-
    80            Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico.exe
    81            Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico-ipam.exe