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.

101 lines
3.1 KiB

  1. ---
  2. # Node Service
  3. kind: DaemonSet
  4. apiVersion: apps/v1
  5. metadata:
  6. name: ebs-csi-node
  7. namespace: kube-system
  8. spec:
  9. selector:
  10. matchLabels:
  11. app: ebs-csi-node
  12. app.kubernetes.io/name: aws-ebs-csi-driver
  13. template:
  14. metadata:
  15. labels:
  16. app: ebs-csi-node
  17. app.kubernetes.io/name: aws-ebs-csi-driver
  18. spec:
  19. nodeSelector:
  20. kubernetes.io/os: linux
  21. hostNetwork: true
  22. priorityClassName: system-node-critical
  23. containers:
  24. - name: ebs-plugin
  25. securityContext:
  26. privileged: true
  27. image: {{ aws_ebs_csi_plugin_image_repo }}:{{ aws_ebs_csi_plugin_image_tag }}
  28. args:
  29. - --endpoint=$(CSI_ENDPOINT)
  30. {% if aws_ebs_csi_extra_volume_tags is defined %}
  31. - --extra-volume-tags={{ aws_ebs_csi_extra_volume_tags }}
  32. {% endif %}
  33. - --logtostderr
  34. - --v=5
  35. env:
  36. - name: CSI_ENDPOINT
  37. value: unix:/csi/csi.sock
  38. volumeMounts:
  39. - name: kubelet-dir
  40. mountPath: /var/lib/kubelet
  41. mountPropagation: "Bidirectional"
  42. - name: plugin-dir
  43. mountPath: /csi
  44. - name: device-dir
  45. mountPath: /dev
  46. ports:
  47. - name: healthz
  48. containerPort: 9808
  49. protocol: TCP
  50. livenessProbe:
  51. httpGet:
  52. path: /healthz
  53. port: healthz
  54. initialDelaySeconds: 10
  55. timeoutSeconds: 3
  56. periodSeconds: 10
  57. failureThreshold: 5
  58. - name: node-driver-registrar
  59. image: {{ csi_node_driver_registrar_image_repo }}:{{ csi_node_driver_registrar_image_tag }}
  60. args:
  61. - --csi-address=$(ADDRESS)
  62. - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
  63. - --v=5
  64. lifecycle:
  65. preStop:
  66. exec:
  67. command: ["/bin/sh", "-c", "rm -rf /registration/ebs.csi.aws.com-reg.sock /csi/csi.sock"]
  68. env:
  69. - name: ADDRESS
  70. value: /csi/csi.sock
  71. - name: DRIVER_REG_SOCK_PATH
  72. value: /var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock
  73. volumeMounts:
  74. - name: plugin-dir
  75. mountPath: /csi
  76. - name: registration-dir
  77. mountPath: /registration
  78. - name: liveness-probe
  79. image: {{ csi_livenessprobe_image_repo }}:{{ csi_livenessprobe_image_tag }}
  80. args:
  81. - --csi-address=/csi/csi.sock
  82. volumeMounts:
  83. - name: plugin-dir
  84. mountPath: /csi
  85. volumes:
  86. - name: kubelet-dir
  87. hostPath:
  88. path: /var/lib/kubelet
  89. type: Directory
  90. - name: plugin-dir
  91. hostPath:
  92. path: /var/lib/kubelet/plugins/ebs.csi.aws.com/
  93. type: DirectoryOrCreate
  94. - name: registration-dir
  95. hostPath:
  96. path: /var/lib/kubelet/plugins_registry/
  97. type: Directory
  98. - name: device-dir
  99. hostPath:
  100. path: /dev
  101. type: Directory