2023-06-12 11:45:47 +08:00
|
|
|
kind: Deployment
|
2020-03-31 15:06:40 +08:00
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-gce-pd-controller
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
|
|
|
replicas: {{ gcp_pd_csi_controller_replicas }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: gcp-compute-persistent-disk-csi-driver
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: gcp-compute-persistent-disk-csi-driver
|
|
|
|
spec:
|
|
|
|
# Host network must be used for interaction with Workload Identity in GKE
|
|
|
|
# since it replaces GCE Metadata Server with GKE Metadata Server. Remove
|
|
|
|
# this requirement when issue is resolved and before any exposure of
|
|
|
|
# metrics ports
|
|
|
|
hostNetwork: true
|
2023-06-12 11:45:47 +08:00
|
|
|
nodeSelector:
|
|
|
|
kubernetes.io/os: linux
|
2020-03-31 15:06:40 +08:00
|
|
|
serviceAccountName: csi-gce-pd-controller-sa
|
|
|
|
priorityClassName: csi-gce-pd-controller
|
|
|
|
containers:
|
|
|
|
- name: csi-provisioner
|
2022-05-03 23:55:56 +08:00
|
|
|
image: {{ csi_provisioner_image_repo }}:{{ csi_provisioner_image_tag }}
|
2020-03-31 15:06:40 +08:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--csi-address=/csi/csi.sock"
|
|
|
|
- "--feature-gates=Topology=true"
|
2023-06-12 11:45:47 +08:00
|
|
|
- "--http-endpoint=:22011"
|
|
|
|
- "--leader-election-namespace=$(PDCSI_NAMESPACE)"
|
|
|
|
- "--timeout=250s"
|
|
|
|
- "--extra-create-metadata"
|
|
|
|
# - "--run-controller-service=false" # disable the controller service of the CSI driver
|
|
|
|
# - "--run-node-service=false" # disable the node service of the CSI driver
|
|
|
|
- "--leader-election"
|
2022-05-03 23:55:56 +08:00
|
|
|
- "--default-fstype=ext4"
|
2023-06-12 11:45:47 +08:00
|
|
|
- "--controller-publish-readonly=true"
|
|
|
|
env:
|
|
|
|
- name: PDCSI_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
ports:
|
|
|
|
- containerPort: 22011
|
|
|
|
name: http-endpoint
|
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
failureThreshold: 1
|
|
|
|
httpGet:
|
|
|
|
path: /healthz/leader-election
|
|
|
|
port: http-endpoint
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 10
|
|
|
|
periodSeconds: 20
|
2020-03-31 15:06:40 +08:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: csi-attacher
|
2022-05-03 23:55:56 +08:00
|
|
|
image: {{ csi_attacher_image_repo }}:{{ csi_attacher_image_tag }}
|
2020-03-31 15:06:40 +08:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--csi-address=/csi/csi.sock"
|
2023-06-12 11:45:47 +08:00
|
|
|
- "--http-endpoint=:22012"
|
|
|
|
- "--leader-election"
|
|
|
|
- "--leader-election-namespace=$(PDCSI_NAMESPACE)"
|
|
|
|
- "--timeout=250s"
|
|
|
|
env:
|
|
|
|
- name: PDCSI_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
ports:
|
|
|
|
- containerPort: 22012
|
|
|
|
name: http-endpoint
|
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
failureThreshold: 1
|
|
|
|
httpGet:
|
|
|
|
path: /healthz/leader-election
|
|
|
|
port: http-endpoint
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 10
|
|
|
|
periodSeconds: 20
|
2020-03-31 15:06:40 +08:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: csi-resizer
|
2022-05-03 23:55:56 +08:00
|
|
|
image: {{ csi_resizer_image_repo }}:{{ csi_resizer_image_tag }}
|
2020-03-31 15:06:40 +08:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--csi-address=/csi/csi.sock"
|
2023-06-12 11:45:47 +08:00
|
|
|
- "--http-endpoint=:22013"
|
|
|
|
- "--leader-election"
|
|
|
|
- "--leader-election-namespace=$(PDCSI_NAMESPACE)"
|
|
|
|
- "--handle-volume-inuse-error=false"
|
|
|
|
env:
|
|
|
|
- name: PDCSI_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
ports:
|
|
|
|
- containerPort: 22013
|
|
|
|
name: http-endpoint
|
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
failureThreshold: 1
|
|
|
|
httpGet:
|
|
|
|
path: /healthz/leader-election
|
|
|
|
port: http-endpoint
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 10
|
|
|
|
periodSeconds: 20
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: csi-snapshotter
|
|
|
|
image: {{ csi_snapshotter_image_repo }}:{{ csi_snapshotter_image_tag }}
|
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--csi-address=/csi/csi.sock"
|
|
|
|
- "--metrics-address=:22014"
|
|
|
|
- "--leader-election"
|
|
|
|
- "--leader-election-namespace=$(PDCSI_NAMESPACE)"
|
|
|
|
- "--timeout=300s"
|
|
|
|
env:
|
|
|
|
- name: PDCSI_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2020-03-31 15:06:40 +08:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: gce-pd-driver
|
|
|
|
# Don't change base image without changing pdImagePlaceholder in
|
|
|
|
# test/k8s-integration/main.go
|
2022-05-03 23:55:56 +08:00
|
|
|
image: {{ gcp_pd_csi_plugin_image_repo }}:{{ gcp_pd_csi_plugin_image_tag }}
|
2020-03-31 15:06:40 +08:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--endpoint=unix:/csi/csi.sock"
|
|
|
|
env:
|
|
|
|
- name: GOOGLE_APPLICATION_CREDENTIALS
|
|
|
|
value: "/etc/cloud-sa/cloud-sa.json"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: cloud-sa-volume
|
|
|
|
readOnly: true
|
|
|
|
mountPath: "/etc/cloud-sa"
|
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
|
|
|
emptyDir: {}
|
|
|
|
- name: cloud-sa-volume
|
|
|
|
secret:
|
|
|
|
secretName: cloud-sa
|
2023-06-12 11:45:47 +08:00
|
|
|
---
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
kind: CSIDriver
|
|
|
|
metadata:
|
|
|
|
name: pd.csi.storage.gke.io
|
|
|
|
spec:
|
|
|
|
attachRequired: true
|
2024-05-22 02:17:05 +08:00
|
|
|
podInfoOnMount: false
|