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.

165 lines
5.4 KiB

  1. kind: Deployment
  2. apiVersion: apps/v1
  3. metadata:
  4. name: csi-gce-pd-controller
  5. namespace: kube-system
  6. spec:
  7. replicas: {{ gcp_pd_csi_controller_replicas }}
  8. selector:
  9. matchLabels:
  10. app: gcp-compute-persistent-disk-csi-driver
  11. template:
  12. metadata:
  13. labels:
  14. app: gcp-compute-persistent-disk-csi-driver
  15. spec:
  16. # Host network must be used for interaction with Workload Identity in GKE
  17. # since it replaces GCE Metadata Server with GKE Metadata Server. Remove
  18. # this requirement when issue is resolved and before any exposure of
  19. # metrics ports
  20. hostNetwork: true
  21. nodeSelector:
  22. kubernetes.io/os: linux
  23. serviceAccountName: csi-gce-pd-controller-sa
  24. priorityClassName: csi-gce-pd-controller
  25. containers:
  26. - name: csi-provisioner
  27. image: {{ csi_provisioner_image_repo }}:{{ csi_provisioner_image_tag }}
  28. args:
  29. - "--v=5"
  30. - "--csi-address=/csi/csi.sock"
  31. - "--feature-gates=Topology=true"
  32. - "--http-endpoint=:22011"
  33. - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
  34. - "--timeout=250s"
  35. - "--extra-create-metadata"
  36. # - "--run-controller-service=false" # disable the controller service of the CSI driver
  37. # - "--run-node-service=false" # disable the node service of the CSI driver
  38. - "--leader-election"
  39. - "--default-fstype=ext4"
  40. - "--controller-publish-readonly=true"
  41. env:
  42. - name: PDCSI_NAMESPACE
  43. valueFrom:
  44. fieldRef:
  45. fieldPath: metadata.namespace
  46. ports:
  47. - containerPort: 22011
  48. name: http-endpoint
  49. protocol: TCP
  50. livenessProbe:
  51. failureThreshold: 1
  52. httpGet:
  53. path: /healthz/leader-election
  54. port: http-endpoint
  55. initialDelaySeconds: 10
  56. timeoutSeconds: 10
  57. periodSeconds: 20
  58. volumeMounts:
  59. - name: socket-dir
  60. mountPath: /csi
  61. - name: csi-attacher
  62. image: {{ csi_attacher_image_repo }}:{{ csi_attacher_image_tag }}
  63. args:
  64. - "--v=5"
  65. - "--csi-address=/csi/csi.sock"
  66. - "--http-endpoint=:22012"
  67. - "--leader-election"
  68. - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
  69. - "--timeout=250s"
  70. env:
  71. - name: PDCSI_NAMESPACE
  72. valueFrom:
  73. fieldRef:
  74. fieldPath: metadata.namespace
  75. ports:
  76. - containerPort: 22012
  77. name: http-endpoint
  78. protocol: TCP
  79. livenessProbe:
  80. failureThreshold: 1
  81. httpGet:
  82. path: /healthz/leader-election
  83. port: http-endpoint
  84. initialDelaySeconds: 10
  85. timeoutSeconds: 10
  86. periodSeconds: 20
  87. volumeMounts:
  88. - name: socket-dir
  89. mountPath: /csi
  90. - name: csi-resizer
  91. image: {{ csi_resizer_image_repo }}:{{ csi_resizer_image_tag }}
  92. args:
  93. - "--v=5"
  94. - "--csi-address=/csi/csi.sock"
  95. - "--http-endpoint=:22013"
  96. - "--leader-election"
  97. - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
  98. - "--handle-volume-inuse-error=false"
  99. env:
  100. - name: PDCSI_NAMESPACE
  101. valueFrom:
  102. fieldRef:
  103. fieldPath: metadata.namespace
  104. ports:
  105. - containerPort: 22013
  106. name: http-endpoint
  107. protocol: TCP
  108. livenessProbe:
  109. failureThreshold: 1
  110. httpGet:
  111. path: /healthz/leader-election
  112. port: http-endpoint
  113. initialDelaySeconds: 10
  114. timeoutSeconds: 10
  115. periodSeconds: 20
  116. volumeMounts:
  117. - name: socket-dir
  118. mountPath: /csi
  119. - name: csi-snapshotter
  120. image: {{ csi_snapshotter_image_repo }}:{{ csi_snapshotter_image_tag }}
  121. args:
  122. - "--v=5"
  123. - "--csi-address=/csi/csi.sock"
  124. - "--metrics-address=:22014"
  125. - "--leader-election"
  126. - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
  127. - "--timeout=300s"
  128. env:
  129. - name: PDCSI_NAMESPACE
  130. valueFrom:
  131. fieldRef:
  132. fieldPath: metadata.namespace
  133. volumeMounts:
  134. - name: socket-dir
  135. mountPath: /csi
  136. - name: gce-pd-driver
  137. # Don't change base image without changing pdImagePlaceholder in
  138. # test/k8s-integration/main.go
  139. image: {{ gcp_pd_csi_plugin_image_repo }}:{{ gcp_pd_csi_plugin_image_tag }}
  140. args:
  141. - "--v=5"
  142. - "--endpoint=unix:/csi/csi.sock"
  143. env:
  144. - name: GOOGLE_APPLICATION_CREDENTIALS
  145. value: "/etc/cloud-sa/cloud-sa.json"
  146. volumeMounts:
  147. - name: socket-dir
  148. mountPath: /csi
  149. - name: cloud-sa-volume
  150. readOnly: true
  151. mountPath: "/etc/cloud-sa"
  152. volumes:
  153. - name: socket-dir
  154. emptyDir: {}
  155. - name: cloud-sa-volume
  156. secret:
  157. secretName: cloud-sa
  158. ---
  159. apiVersion: storage.k8s.io/v1
  160. kind: CSIDriver
  161. metadata:
  162. name: pd.csi.storage.gke.io
  163. spec:
  164. attachRequired: true
  165. podInfoOnMount: false