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.

127 lines
4.1 KiB

  1. ---
  2. kind: Deployment
  3. apiVersion: apps/v1
  4. metadata:
  5. name: ebs-csi-controller
  6. namespace: kube-system
  7. spec:
  8. replicas: {{ aws_ebs_csi_controller_replicas }}
  9. selector:
  10. matchLabels:
  11. app: ebs-csi-controller
  12. app.kubernetes.io/name: aws-ebs-csi-driver
  13. template:
  14. metadata:
  15. labels:
  16. app: ebs-csi-controller
  17. app.kubernetes.io/name: aws-ebs-csi-driver
  18. spec:
  19. nodeSelector:
  20. kubernetes.io/os: linux
  21. serviceAccount: ebs-csi-controller-sa
  22. priorityClassName: system-cluster-critical
  23. containers:
  24. - name: ebs-plugin
  25. image: {{ aws_ebs_csi_plugin_image_repo }}:{{ aws_ebs_csi_plugin_image_tag }}
  26. args:
  27. - --endpoint=$(CSI_ENDPOINT)
  28. {% if aws_ebs_csi_extra_volume_tags is defined %}
  29. - --extra-volume-tags={{ aws_ebs_csi_extra_volume_tags }}
  30. {% endif %}
  31. - --logtostderr
  32. - --v=5
  33. env:
  34. - name: CSI_ENDPOINT
  35. value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
  36. - name: AWS_ACCESS_KEY_ID
  37. valueFrom:
  38. secretKeyRef:
  39. name: aws-secret
  40. key: key_id
  41. optional: true
  42. - name: AWS_SECRET_ACCESS_KEY
  43. valueFrom:
  44. secretKeyRef:
  45. name: aws-secret
  46. key: access_key
  47. optional: true
  48. volumeMounts:
  49. - name: socket-dir
  50. mountPath: /var/lib/csi/sockets/pluginproxy/
  51. ports:
  52. - name: healthz
  53. containerPort: 9808
  54. protocol: TCP
  55. livenessProbe:
  56. httpGet:
  57. path: /healthz
  58. port: healthz
  59. initialDelaySeconds: 10
  60. timeoutSeconds: 3
  61. periodSeconds: 10
  62. failureThreshold: 5
  63. - name: csi-provisioner
  64. image: {{ csi_provisioner_image_repo }}:{{ csi_provisioner_image_tag }}
  65. args:
  66. - --csi-address=$(ADDRESS)
  67. - --v=5
  68. {% if aws_ebs_csi_enable_volume_scheduling %}
  69. - --feature-gates=Topology=true
  70. {% endif %}
  71. - --enable-leader-election
  72. - --leader-election-type=leases
  73. env:
  74. - name: ADDRESS
  75. value: /var/lib/csi/sockets/pluginproxy/csi.sock
  76. volumeMounts:
  77. - name: socket-dir
  78. mountPath: /var/lib/csi/sockets/pluginproxy/
  79. - name: csi-attacher
  80. image: {{ csi_attacher_image_repo }}:{{ csi_attacher_image_tag }}
  81. args:
  82. - --csi-address=$(ADDRESS)
  83. - --v=5
  84. env:
  85. - name: ADDRESS
  86. value: /var/lib/csi/sockets/pluginproxy/csi.sock
  87. volumeMounts:
  88. - name: socket-dir
  89. mountPath: /var/lib/csi/sockets/pluginproxy/
  90. {% if aws_ebs_csi_enable_volume_snapshot %}
  91. - name: csi-snapshotter
  92. image: {{ csi_snapshotter_image_repo }}:{{ csi_snapshotter_image_tag }}
  93. args:
  94. - --csi-address=$(ADDRESS)
  95. - --timeout=15s
  96. env:
  97. - name: ADDRESS
  98. value: /var/lib/csi/sockets/pluginproxy/csi.sock
  99. volumeMounts:
  100. - name: socket-dir
  101. mountPath: /var/lib/csi/sockets/pluginproxy/
  102. {% endif %}
  103. {% if aws_ebs_csi_enable_volume_resizing %}
  104. - name: csi-resizer
  105. image: {{ csi_resizer_image_repo }}:{{ csi_resizer_image_tag }}
  106. imagePullPolicy: {{ k8s_image_pull_policy }}
  107. args:
  108. - --csi-address=$(ADDRESS)
  109. - --v=5
  110. env:
  111. - name: ADDRESS
  112. value: /var/lib/csi/sockets/pluginproxy/csi.sock
  113. volumeMounts:
  114. - name: socket-dir
  115. mountPath: /var/lib/csi/sockets/pluginproxy/
  116. {% endif %}
  117. - name: liveness-probe
  118. image: {{ csi_livenessprobe_image_repo }}:{{ csi_livenessprobe_image_tag }}
  119. args:
  120. - --csi-address=/csi/csi.sock
  121. volumeMounts:
  122. - name: socket-dir
  123. mountPath: /csi
  124. volumes:
  125. - name: socket-dir
  126. emptyDir: {}