...
1kind: StatefulSet
2apiVersion: apps/v1
3metadata:
4 name: csi-gce-pd-controller
5spec:
6 serviceName: "csi-gce-pd"
7 replicas: 1
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 serviceAccountName: csi-gce-pd-controller-sa
22 containers:
23 - name: csi-snapshotter
24 image: registry.k8s.io/sig-storage/csi-snapshotter:v5.0.1
25 args:
26 - "--v=5"
27 - "--csi-address=/csi/csi.sock"
28 - "--metrics-address=:22014"
29 - "--leader-election"
30 - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
31 - "--timeout=300s"
32 env:
33 - name: PDCSI_NAMESPACE
34 valueFrom:
35 fieldRef:
36 fieldPath: metadata.namespace
37 imagePullPolicy: Always
38 volumeMounts:
39 - name: socket-dir
40 mountPath: /csi
41 - name: csi-provisioner
42 image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0
43 args:
44 - "--v=5"
45 - "--csi-address=/csi/csi.sock"
46 - "--feature-gates=Topology=true"
47 - "--http-endpoint=:22011"
48 - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
49 - "--timeout=250s"
50 - "--extra-create-metadata"
51 # - "--run-controller-service=false" # disable the controller service of the CSI driver
52 # - "--run-node-service=false" # disable the node service of the CSI driver
53 - "--leader-election"
54 - "--default-fstype=ext4"
55 env:
56 - name: PDCSI_NAMESPACE
57 valueFrom:
58 fieldRef:
59 fieldPath: metadata.namespace
60 ports:
61 - containerPort: 22011
62 name: http-endpoint
63 protocol: TCP
64 livenessProbe:
65 failureThreshold: 1
66 httpGet:
67 path: /healthz/leader-election
68 port: http-endpoint
69 initialDelaySeconds: 10
70 timeoutSeconds: 10
71 periodSeconds: 20
72 volumeMounts:
73 - name: socket-dir
74 mountPath: /csi
75 - name: csi-attacher
76 image: registry.k8s.io/sig-storage/csi-attacher:v4.0.0
77 args:
78 - "--v=5"
79 - "--csi-address=/csi/csi.sock"
80 - "--http-endpoint=:22012"
81 - "--leader-election"
82 - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
83 - "--timeout=250s"
84 env:
85 - name: PDCSI_NAMESPACE
86 valueFrom:
87 fieldRef:
88 fieldPath: metadata.namespace
89 ports:
90 - containerPort: 22012
91 name: http-endpoint
92 protocol: TCP
93 livenessProbe:
94 failureThreshold: 1
95 httpGet:
96 path: /healthz/leader-election
97 port: http-endpoint
98 initialDelaySeconds: 10
99 timeoutSeconds: 10
100 periodSeconds: 20
101 volumeMounts:
102 - name: socket-dir
103 mountPath: /csi
104 - name: csi-resizer
105 image: registry.k8s.io/sig-storage/csi-resizer:v1.6.0
106 args:
107 - "--v=5"
108 - "--csi-address=/csi/csi.sock"
109 - "--http-endpoint=:22013"
110 - "--leader-election"
111 - "--leader-election-namespace=$(PDCSI_NAMESPACE)"
112 - "--handle-volume-inuse-error=false"
113 env:
114 - name: PDCSI_NAMESPACE
115 valueFrom:
116 fieldRef:
117 fieldPath: metadata.namespace
118 ports:
119 - containerPort: 22013
120 name: http-endpoint
121 protocol: TCP
122 livenessProbe:
123 failureThreshold: 1
124 httpGet:
125 path: /healthz/leader-election
126 port: http-endpoint
127 initialDelaySeconds: 10
128 timeoutSeconds: 10
129 periodSeconds: 20
130 volumeMounts:
131 - name: socket-dir
132 mountPath: /csi
133 - name: gce-pd-driver
134 image: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.4.0
135 args:
136 - "--v=5"
137 - "--endpoint=unix:/csi/csi.sock"
138 env:
139 - name: GOOGLE_APPLICATION_CREDENTIALS
140 value: "/etc/cloud-sa/cloud-sa.json"
141 volumeMounts:
142 - name: socket-dir
143 mountPath: /csi
144 - name: cloud-sa-volume
145 readOnly: true
146 mountPath: "/etc/cloud-sa"
147 volumes:
148 - name: socket-dir
149 emptyDir: {}
150 - name: cloud-sa-volume
151 secret:
152 secretName: cloud-sa
View as plain text