You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
5.2 KiB

  1. ---
  2. kind: DaemonSet
  3. apiVersion: apps/v1
  4. metadata:
  5. name: csi-azuredisk-node
  6. namespace: kube-system
  7. spec:
  8. updateStrategy:
  9. rollingUpdate:
  10. maxUnavailable: 1
  11. type: RollingUpdate
  12. selector:
  13. matchLabels:
  14. app: csi-azuredisk-node
  15. template:
  16. metadata:
  17. labels:
  18. app: csi-azuredisk-node
  19. spec:
  20. hostNetwork: true
  21. dnsPolicy: Default
  22. serviceAccountName: csi-azuredisk-node-sa
  23. nodeSelector:
  24. kubernetes.io/os: linux
  25. {% if azure_csi_node_affinity %}
  26. affinity:
  27. {{ azure_csi_node_affinity | to_nice_yaml | indent(width=8) }}
  28. {% endif %}
  29. priorityClassName: system-node-critical
  30. tolerations:
  31. - operator: Exists
  32. containers:
  33. - name: liveness-probe
  34. volumeMounts:
  35. - mountPath: /csi
  36. name: socket-dir
  37. image: {{ azure_csi_image_repo }}/livenessprobe:{{ azure_csi_livenessprobe_image_tag }}
  38. imagePullPolicy: {{ k8s_image_pull_policy }}
  39. args:
  40. - --csi-address=/csi/csi.sock
  41. - --probe-timeout=3s
  42. - --health-port=29603
  43. - --v=2
  44. resources:
  45. limits:
  46. memory: 100Mi
  47. requests:
  48. cpu: 10m
  49. memory: 20Mi
  50. - name: node-driver-registrar
  51. image: {{ azure_csi_image_repo }}/csi-node-driver-registrar:{{ azure_csi_node_registrar_image_tag }}
  52. args:
  53. - --csi-address=$(ADDRESS)
  54. - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
  55. - --v=2
  56. livenessProbe:
  57. exec:
  58. command:
  59. - /csi-node-driver-registrar
  60. - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
  61. - --mode=kubelet-registration-probe
  62. initialDelaySeconds: 30
  63. timeoutSeconds: 15
  64. env:
  65. - name: ADDRESS
  66. value: /csi/csi.sock
  67. - name: DRIVER_REG_SOCK_PATH
  68. value: /var/lib/kubelet/plugins/disk.csi.azure.com/csi.sock
  69. volumeMounts:
  70. - name: socket-dir
  71. mountPath: /csi
  72. - name: registration-dir
  73. mountPath: /registration
  74. resources:
  75. limits:
  76. memory: 100Mi
  77. requests:
  78. cpu: 10m
  79. memory: 20Mi
  80. - name: azuredisk
  81. image: {{ azure_csi_plugin_image_repo }}/azuredisk-csi:{{ azure_csi_plugin_image_tag }}
  82. imagePullPolicy: {{ k8s_image_pull_policy }}
  83. args:
  84. - "--v=5"
  85. - "--endpoint=$(CSI_ENDPOINT)"
  86. - "--nodeid=$(KUBE_NODE_NAME)"
  87. - "--metrics-address=0.0.0.0:29605"
  88. - "--enable-perf-optimization=true"
  89. - "--drivername=disk.csi.azure.com"
  90. - "--volume-attach-limit=-1"
  91. - "--cloud-config-secret-name=cloud-config"
  92. - "--cloud-config-secret-namespace=kube-system"
  93. ports:
  94. - containerPort: 29603
  95. name: healthz
  96. protocol: TCP
  97. - containerPort: 29605
  98. name: metrics
  99. protocol: TCP
  100. livenessProbe:
  101. failureThreshold: 5
  102. httpGet:
  103. path: /healthz
  104. port: healthz
  105. initialDelaySeconds: 30
  106. timeoutSeconds: 10
  107. periodSeconds: 30
  108. env:
  109. - name: AZURE_CREDENTIAL_FILE
  110. value: "/etc/kubernetes/azure.json"
  111. - name: CSI_ENDPOINT
  112. value: unix:///csi/csi.sock
  113. - name: KUBE_NODE_NAME
  114. valueFrom:
  115. fieldRef:
  116. apiVersion: v1
  117. fieldPath: spec.nodeName
  118. securityContext:
  119. privileged: true
  120. volumeMounts:
  121. - mountPath: /csi
  122. name: socket-dir
  123. - mountPath: /var/lib/kubelet/
  124. mountPropagation: Bidirectional
  125. name: mountpoint-dir
  126. - mountPath: /etc/kubernetes/
  127. name: azure-cred
  128. - mountPath: /dev
  129. name: device-dir
  130. - mountPath: /sys/bus/scsi/devices
  131. name: sys-devices-dir
  132. - mountPath: /sys/class/scsi_host/
  133. name: scsi-host-dir
  134. resources:
  135. limits:
  136. memory: 200Mi
  137. requests:
  138. cpu: 10m
  139. memory: 20Mi
  140. volumes:
  141. - hostPath:
  142. path: /var/lib/kubelet/plugins/disk.csi.azure.com
  143. type: DirectoryOrCreate
  144. name: socket-dir
  145. - hostPath:
  146. path: /var/lib/kubelet/
  147. type: DirectoryOrCreate
  148. name: mountpoint-dir
  149. - hostPath:
  150. path: /var/lib/kubelet/plugins_registry/
  151. type: DirectoryOrCreate
  152. name: registration-dir
  153. - secret:
  154. defaultMode: 0644
  155. secretName: cloud-config
  156. name: azure-cred
  157. - hostPath:
  158. path: /dev
  159. type: Directory
  160. name: device-dir
  161. - hostPath:
  162. path: /sys/bus/scsi/devices
  163. type: Directory
  164. name: sys-devices-dir
  165. - hostPath:
  166. path: /sys/class/scsi_host/
  167. type: Directory
  168. name: scsi-host-dir