|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: DaemonSet |
| 3 | +metadata: |
| 4 | + name: azure-cns-win |
| 5 | + namespace: kube-system |
| 6 | + labels: |
| 7 | + app: azure-cns-win |
| 8 | +spec: |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + k8s-app: azure-cns-win |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + labels: |
| 15 | + k8s-app: azure-cns-win |
| 16 | + kubernetes.azure.com/managedby: aks |
| 17 | + annotations: |
| 18 | + cluster-autoscaler.kubernetes.io/daemonset-pod: "true" |
| 19 | + prometheus.io/port: "10092" |
| 20 | + spec: |
| 21 | + securityContext: |
| 22 | + windowsOptions: |
| 23 | + hostProcess: true |
| 24 | + runAsUserName: "NT AUTHORITY\\SYSTEM" |
| 25 | + affinity: |
| 26 | + nodeAffinity: |
| 27 | + requiredDuringSchedulingIgnoredDuringExecution: |
| 28 | + nodeSelectorTerms: |
| 29 | + - matchExpressions: |
| 30 | + - key: kubernetes.azure.com/cluster |
| 31 | + operator: Exists |
| 32 | + - key: type |
| 33 | + operator: NotIn |
| 34 | + values: |
| 35 | + - virtual-kubelet |
| 36 | + - key: kubernetes.io/os |
| 37 | + operator: In |
| 38 | + values: |
| 39 | + - windows |
| 40 | + tolerations: |
| 41 | + - operator: "Exists" |
| 42 | + effect: NoExecute |
| 43 | + - operator: "Exists" |
| 44 | + effect: NoSchedule |
| 45 | + containers: |
| 46 | + - name: cns-container |
| 47 | + image: acnpublic.azurecr.io/azure-cns:latest |
| 48 | + imagePullPolicy: IfNotPresent |
| 49 | + securityContext: |
| 50 | + privileged: true |
| 51 | + command: ["powershell.exe"] |
| 52 | + args: |
| 53 | + [ |
| 54 | + '.\setkubeconfigpath.ps1', |
| 55 | + ";", |
| 56 | + '.\azure-cns.exe', |
| 57 | + "-c", |
| 58 | + "tcp://$(CNSIpAddress):$(CNSPort)", |
| 59 | + "-t", |
| 60 | + "$(CNSLogTarget)", |
| 61 | + "-o", |
| 62 | + "$(CNSLogDir)", |
| 63 | + "-storefilepath", |
| 64 | + "$(CNSStoreFilePath)", |
| 65 | + "-config-path", |
| 66 | + "%CONTAINER_SANDBOX_MOUNT_POINT%\\$(CNS_CONFIGURATION_PATH)", |
| 67 | + "--kubeconfig", |
| 68 | + '.\kubeconfig', |
| 69 | + ] |
| 70 | + volumeMounts: |
| 71 | + - name: log |
| 72 | + mountPath: /k/azurecns |
| 73 | + - name: cns-config |
| 74 | + mountPath: /etc/azure-cns |
| 75 | + - name: cni-conflist |
| 76 | + mountPath: /k/azurecni/netconf |
| 77 | + ports: |
| 78 | + - containerPort: 10090 |
| 79 | + hostPort: 10090 |
| 80 | + name: api |
| 81 | + protocol: TCP |
| 82 | + - containerPort: 10092 |
| 83 | + hostPort: 10092 |
| 84 | + name: metrics |
| 85 | + protocol: TCP |
| 86 | + env: |
| 87 | + - name: PATH |
| 88 | + value: '%CONTAINER_SANDBOX_MOUNT_POINT%\Windows\System32\WindowsPowershell\v1.0\' |
| 89 | + - name: CNSIpAddress |
| 90 | + value: "127.0.0.1" |
| 91 | + - name: CNSPort |
| 92 | + value: "10090" |
| 93 | + - name: CNSLogTarget |
| 94 | + value: "stdoutfile" |
| 95 | + - name: CNSLogDir |
| 96 | + value: /k/azurecns/ |
| 97 | + - name: CNSStoreFilePath |
| 98 | + value: /k/azurecns/ |
| 99 | + - name: CNS_CONFIGURATION_PATH |
| 100 | + value: /etc/azure-cns/cns_config.json |
| 101 | + - name: NODENAME |
| 102 | + valueFrom: |
| 103 | + fieldRef: |
| 104 | + apiVersion: v1 |
| 105 | + fieldPath: spec.nodeName |
| 106 | + initContainers: |
| 107 | + - name: init-cni-dropgz |
| 108 | + image: acnpublic.azurecr.io/cni-dropgz:CNI_DROPGZ_VERSION |
| 109 | + imagePullPolicy: Always |
| 110 | + command: ["%CONTAINER_SANDBOX_MOUNT_POINT%/dropgz.exe"] |
| 111 | + args: |
| 112 | + - deploy |
| 113 | + - azure-vnet.exe |
| 114 | + - -o |
| 115 | + - /k/azurecni/bin/azure-vnet.exe # // TODO: add windows cni conflist when ready |
| 116 | + volumeMounts: |
| 117 | + - name: cni-bin |
| 118 | + mountPath: /k/azurecni/bin/ # TODO: add cni conflist when ready |
| 119 | + hostNetwork: true |
| 120 | + volumes: |
| 121 | + - name: log |
| 122 | + hostPath: |
| 123 | + path: /k/azurecns |
| 124 | + type: DirectoryOrCreate |
| 125 | + - name: cns-config |
| 126 | + configMap: |
| 127 | + name: cns-win-config |
| 128 | + defaultMode: 420 |
| 129 | + - name: cni-bin |
| 130 | + hostPath: |
| 131 | + path: /k/azurecni/bin |
| 132 | + type: Directory # // TODO: add windows cni conflist when ready |
| 133 | + serviceAccount: azure-cns |
| 134 | + serviceAccountName: azure-cns |
0 commit comments