sigs.k8s.io/cluster-api-provider-azure@v1.17.0/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 identity: UserAssigned 45 userAssignedIdentities: 46 - providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity} 47 --- 48 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 49 kind: KubeadmConfigTemplate 50 metadata: 51 name: "${CLUSTER_NAME}-md-win" 52 spec: 53 template: 54 spec: 55 users: 56 - name: capi 57 groups: Administrators 58 sshAuthorizedKeys: 59 - ${AZURE_SSH_PUBLIC_KEY:=""} 60 preKubeadmCommands: [] 61 postKubeadmCommands: 62 - nssm set kubelet start SERVICE_AUTO_START 63 - powershell C:/defender-exclude-calico.ps1 64 joinConfiguration: 65 nodeRegistration: 66 name: '{{ ds.meta_data["local_hostname"] }}' 67 criSocket: npipe:////./pipe/containerd-containerd 68 kubeletExtraArgs: 69 cloud-provider: external 70 v: "2" 71 windows-priorityclass: "ABOVE_NORMAL_PRIORITY_CLASS" 72 files: 73 - contentFrom: 74 secret: 75 name: ${CLUSTER_NAME}-md-win-azure-json 76 key: worker-node-azure.json 77 owner: root:root 78 path: c:/k/azure.json 79 permissions: "0644" 80 - path: C:/defender-exclude-calico.ps1 81 permissions: "0744" 82 content: |- 83 Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico.exe 84 Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico-ipam.exe