Skip to content

Commit 95537a1

Browse files
Merge pull request #312 from shiftstack/add-manila-to-hypershift
OSASINFRA-3638: Add support for Hypershift to Manila CSI
2 parents 5ea6277 + 8d4534b commit 95537a1

24 files changed

+1014
-8
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Generated file. Do not edit. Update using "make update".
2+
#
3+
# Loaded from base/cabundle_cm.yaml
4+
#
5+
#
6+
7+
apiVersion: v1
8+
kind: ConfigMap
9+
metadata:
10+
labels:
11+
config.openshift.io/inject-trusted-cabundle: "true"
12+
name: manila-csi-driver-trusted-ca-bundle
13+
namespace: ${NAMESPACE}
Lines changed: 375 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,375 @@
1+
# Generated file. Do not edit. Update using "make update".
2+
#
3+
# Loaded from base/controller.yaml
4+
# Applied strategic merge patch overlays/openstack-manila/patches/controller_add_driver.yaml
5+
# Applied strategic merge patch common/sidecars/controller_driver_kube_rbac_proxy.yaml
6+
# provisioner.yaml: Loaded from common/sidecars/provisioner.yaml
7+
# provisioner.yaml: Added arguments [--timeout=120s --feature-gates=Topology=true]
8+
# provisioner.yaml: Applied JSON patch common/hypershift/sidecar_add_kubeconfig.yaml.patch
9+
# Applied strategic merge patch provisioner.yaml
10+
# resizer.yaml: Loaded from common/sidecars/resizer.yaml
11+
# resizer.yaml: Applied JSON patch common/hypershift/sidecar_add_kubeconfig.yaml.patch
12+
# Applied strategic merge patch resizer.yaml
13+
# snapshotter.yaml: Loaded from common/sidecars/snapshotter.yaml
14+
# snapshotter.yaml: Applied JSON patch common/hypershift/sidecar_add_kubeconfig.yaml.patch
15+
# Applied strategic merge patch snapshotter.yaml
16+
# livenessprobe.yaml: Loaded from common/sidecars/livenessprobe.yaml
17+
# livenessprobe.yaml: Added arguments [--probe-timeout=10s]
18+
# Applied strategic merge patch livenessprobe.yaml
19+
# Applied strategic merge patch common/hypershift/controller_add_affinity_tolerations.yaml
20+
# Applied strategic merge patch overlays/openstack-manila/patches/controller_add_hypershift_volumes.yaml
21+
# Applied strategic merge patch overlays/openstack-manila/patches/controller_rename_config_map.yaml
22+
#
23+
#
24+
25+
apiVersion: apps/v1
26+
kind: Deployment
27+
metadata:
28+
annotations:
29+
config.openshift.io/inject-proxy: csi-driver
30+
config.openshift.io/inject-proxy-cabundle: csi-driver
31+
name: openstack-manila-csi-controllerplugin
32+
namespace: ${NAMESPACE}
33+
spec:
34+
selector:
35+
matchLabels:
36+
app: openstack-manila-csi
37+
component: controllerplugin
38+
strategy:
39+
rollingUpdate:
40+
maxSurge: 0
41+
maxUnavailable: 1
42+
type: RollingUpdate
43+
template:
44+
metadata:
45+
annotations:
46+
cluster-autoscaler.kubernetes.io/safe-to-evict-local-volumes: socket-dir
47+
openshift.io/required-scc: restricted-v2
48+
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
49+
labels:
50+
app: openstack-manila-csi
51+
component: controllerplugin
52+
hypershift.openshift.io/hosted-control-plane: ${NAMESPACE}
53+
spec:
54+
affinity:
55+
nodeAffinity:
56+
preferredDuringSchedulingIgnoredDuringExecution:
57+
- preference:
58+
matchExpressions:
59+
- key: hypershift.openshift.io/control-plane
60+
operator: In
61+
values:
62+
- "true"
63+
weight: 50
64+
- preference:
65+
matchExpressions:
66+
- key: hypershift.openshift.io/cluster
67+
operator: In
68+
values:
69+
- ${NAMESPACE}
70+
weight: 100
71+
podAffinity:
72+
preferredDuringSchedulingIgnoredDuringExecution:
73+
- podAffinityTerm:
74+
labelSelector:
75+
matchLabels:
76+
hypershift.openshift.io/hosted-control-plane: ${NAMESPACE}
77+
topologyKey: kubernetes.io/hostname
78+
weight: 100
79+
podAntiAffinity:
80+
preferredDuringSchedulingIgnoredDuringExecution:
81+
- podAffinityTerm:
82+
labelSelector:
83+
matchLabels:
84+
app: manila-csi-driver-controller
85+
topologyKey: kubernetes.io/hostname
86+
weight: 100
87+
containers:
88+
- args:
89+
- --v=${LOG_LEVEL}
90+
- --cluster-id=${CLUSTER_ID}
91+
- --nodeid=$(NODE_ID)
92+
- --endpoint=$(CSI_ENDPOINT)
93+
- --drivername=$(DRIVER_NAME)
94+
- --share-protocol-selector=$(MANILA_SHARE_PROTO)
95+
- --fwdendpoint=$(FWD_CSI_ENDPOINT)
96+
env:
97+
- name: DRIVER_NAME
98+
value: manila.csi.openstack.org
99+
- name: NODE_ID
100+
valueFrom:
101+
fieldRef:
102+
fieldPath: spec.nodeName
103+
- name: CSI_ENDPOINT
104+
value: unix:///plugin/csi.sock
105+
- name: MANILA_SHARE_PROTO
106+
value: NFS
107+
- name: FWD_CSI_ENDPOINT
108+
value: unix:///plugin/csi-nfs.sock
109+
image: ${DRIVER_IMAGE}
110+
imagePullPolicy: IfNotPresent
111+
livenessProbe:
112+
failureThreshold: 5
113+
httpGet:
114+
path: /healthz
115+
port: healthz
116+
initialDelaySeconds: 10
117+
periodSeconds: 30
118+
timeoutSeconds: 10
119+
name: csi-driver
120+
ports:
121+
- containerPort: 10306
122+
name: healthz
123+
protocol: TCP
124+
resources:
125+
requests:
126+
cpu: 10m
127+
memory: 50Mi
128+
terminationMessagePolicy: FallbackToLogsOnError
129+
volumeMounts:
130+
- mountPath: /plugin
131+
name: socket-dir
132+
- mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config
133+
name: cacert
134+
- args:
135+
- --nodeid=$(NODE_ID)
136+
- --endpoint=unix://plugin/csi-nfs.sock
137+
- --mount-permissions=0777
138+
env:
139+
- name: NODE_ID
140+
valueFrom:
141+
fieldRef:
142+
fieldPath: spec.nodeName
143+
image: ${NFS_DRIVER_IMAGE}
144+
imagePullPolicy: IfNotPresent
145+
name: csi-driver-nfs
146+
resources:
147+
requests:
148+
cpu: 10m
149+
memory: 50Mi
150+
terminationMessagePolicy: FallbackToLogsOnError
151+
volumeMounts:
152+
- mountPath: /plugin
153+
name: socket-dir
154+
- args:
155+
- --secure-listen-address=0.0.0.0:9202
156+
- --upstream=http://127.0.0.1:8202/
157+
- --tls-cert-file=/etc/tls/private/tls.crt
158+
- --tls-private-key-file=/etc/tls/private/tls.key
159+
- --tls-cipher-suites=${TLS_CIPHER_SUITES}
160+
- --tls-min-version=${TLS_MIN_VERSION}
161+
- --logtostderr=true
162+
image: ${KUBE_RBAC_PROXY_IMAGE}
163+
imagePullPolicy: IfNotPresent
164+
name: kube-rbac-proxy-8202
165+
ports:
166+
- containerPort: 9202
167+
name: driver-m
168+
protocol: TCP
169+
resources:
170+
requests:
171+
cpu: 10m
172+
memory: 20Mi
173+
terminationMessagePolicy: FallbackToLogsOnError
174+
volumeMounts:
175+
- mountPath: /etc/tls/private
176+
name: metrics-serving-cert
177+
- args:
178+
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
179+
- --http-endpoint=localhost:8203
180+
- --leader-election
181+
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
182+
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
183+
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
184+
- --leader-election-namespace=${NODE_NAMESPACE}
185+
- --v=${LOG_LEVEL}
186+
- --timeout=120s
187+
- --feature-gates=Topology=true
188+
- --kubeconfig=$(KUBECONFIG)
189+
env:
190+
- name: KUBECONFIG
191+
value: /etc/hosted-kubernetes/kubeconfig
192+
image: ${PROVISIONER_IMAGE}
193+
imagePullPolicy: IfNotPresent
194+
name: csi-provisioner
195+
resources:
196+
requests:
197+
cpu: 10m
198+
memory: 50Mi
199+
terminationMessagePolicy: FallbackToLogsOnError
200+
volumeMounts:
201+
- mountPath: /var/lib/csi/sockets/pluginproxy/
202+
name: socket-dir
203+
- mountPath: /etc/hosted-kubernetes
204+
name: hosted-kubeconfig
205+
readOnly: true
206+
- args:
207+
- --secure-listen-address=0.0.0.0:9203
208+
- --upstream=http://127.0.0.1:8203/
209+
- --tls-cert-file=/etc/tls/private/tls.crt
210+
- --tls-private-key-file=/etc/tls/private/tls.key
211+
- --tls-cipher-suites=${TLS_CIPHER_SUITES}
212+
- --tls-min-version=${TLS_MIN_VERSION}
213+
- --logtostderr=true
214+
image: ${KUBE_RBAC_PROXY_IMAGE}
215+
imagePullPolicy: IfNotPresent
216+
name: provisioner-kube-rbac-proxy
217+
ports:
218+
- containerPort: 9203
219+
name: provisioner-m
220+
protocol: TCP
221+
resources:
222+
requests:
223+
cpu: 10m
224+
memory: 20Mi
225+
terminationMessagePolicy: FallbackToLogsOnError
226+
volumeMounts:
227+
- mountPath: /etc/tls/private
228+
name: metrics-serving-cert
229+
- args:
230+
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
231+
- --http-endpoint=localhost:8204
232+
- --leader-election
233+
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
234+
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
235+
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
236+
- --leader-election-namespace=${NODE_NAMESPACE}
237+
- --v=${LOG_LEVEL}
238+
- --kubeconfig=$(KUBECONFIG)
239+
env:
240+
- name: KUBECONFIG
241+
value: /etc/hosted-kubernetes/kubeconfig
242+
image: ${RESIZER_IMAGE}
243+
imagePullPolicy: IfNotPresent
244+
name: csi-resizer
245+
resources:
246+
requests:
247+
cpu: 10m
248+
memory: 50Mi
249+
terminationMessagePolicy: FallbackToLogsOnError
250+
volumeMounts:
251+
- mountPath: /var/lib/csi/sockets/pluginproxy/
252+
name: socket-dir
253+
- mountPath: /etc/hosted-kubernetes
254+
name: hosted-kubeconfig
255+
readOnly: true
256+
- args:
257+
- --secure-listen-address=0.0.0.0:9204
258+
- --upstream=http://127.0.0.1:8204/
259+
- --tls-cert-file=/etc/tls/private/tls.crt
260+
- --tls-private-key-file=/etc/tls/private/tls.key
261+
- --tls-cipher-suites=${TLS_CIPHER_SUITES}
262+
- --tls-min-version=${TLS_MIN_VERSION}
263+
- --logtostderr=true
264+
image: ${KUBE_RBAC_PROXY_IMAGE}
265+
imagePullPolicy: IfNotPresent
266+
name: resizer-kube-rbac-proxy
267+
ports:
268+
- containerPort: 9204
269+
name: resizer-m
270+
protocol: TCP
271+
resources:
272+
requests:
273+
cpu: 10m
274+
memory: 20Mi
275+
terminationMessagePolicy: FallbackToLogsOnError
276+
volumeMounts:
277+
- mountPath: /etc/tls/private
278+
name: metrics-serving-cert
279+
- args:
280+
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
281+
- --metrics-address=localhost:8205
282+
- --leader-election
283+
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
284+
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
285+
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
286+
- --leader-election-namespace=${NODE_NAMESPACE}
287+
- --v=${LOG_LEVEL}
288+
- --kubeconfig=$(KUBECONFIG)
289+
env:
290+
- name: KUBECONFIG
291+
value: /etc/hosted-kubernetes/kubeconfig
292+
image: ${SNAPSHOTTER_IMAGE}
293+
imagePullPolicy: IfNotPresent
294+
name: csi-snapshotter
295+
resources:
296+
requests:
297+
cpu: 10m
298+
memory: 50Mi
299+
terminationMessagePolicy: FallbackToLogsOnError
300+
volumeMounts:
301+
- mountPath: /var/lib/csi/sockets/pluginproxy/
302+
name: socket-dir
303+
- mountPath: /etc/hosted-kubernetes
304+
name: hosted-kubeconfig
305+
readOnly: true
306+
- args:
307+
- --secure-listen-address=0.0.0.0:9205
308+
- --upstream=http://127.0.0.1:8205/
309+
- --tls-cert-file=/etc/tls/private/tls.crt
310+
- --tls-private-key-file=/etc/tls/private/tls.key
311+
- --tls-cipher-suites=${TLS_CIPHER_SUITES}
312+
- --tls-min-version=${TLS_MIN_VERSION}
313+
- --logtostderr=true
314+
image: ${KUBE_RBAC_PROXY_IMAGE}
315+
imagePullPolicy: IfNotPresent
316+
name: snapshotter-kube-rbac-proxy
317+
ports:
318+
- containerPort: 9205
319+
name: snapshotter-m
320+
protocol: TCP
321+
resources:
322+
requests:
323+
cpu: 10m
324+
memory: 20Mi
325+
terminationMessagePolicy: FallbackToLogsOnError
326+
volumeMounts:
327+
- mountPath: /etc/tls/private
328+
name: metrics-serving-cert
329+
- args:
330+
- --csi-address=/csi/csi.sock
331+
- --health-port=10306
332+
- --v=${LOG_LEVEL}
333+
- --probe-timeout=10s
334+
env: []
335+
image: ${LIVENESS_PROBE_IMAGE}
336+
imagePullPolicy: IfNotPresent
337+
name: csi-liveness-probe
338+
resources:
339+
requests:
340+
cpu: 10m
341+
memory: 50Mi
342+
terminationMessagePolicy: FallbackToLogsOnError
343+
volumeMounts:
344+
- mountPath: /csi
345+
name: socket-dir
346+
nodeSelector:
347+
node-role.kubernetes.io/master: ""
348+
priorityClassName: hypershift-control-plane
349+
serviceAccount: manila-csi-driver-controller-sa
350+
tolerations:
351+
- effect: NoSchedule
352+
key: hypershift.openshift.io/control-plane
353+
operator: Equal
354+
value: "true"
355+
- effect: NoSchedule
356+
key: hypershift.openshift.io/cluster
357+
operator: Equal
358+
value: ${NAMESPACE}
359+
volumes:
360+
- emptyDir: {}
361+
name: socket-dir
362+
- name: metrics-serving-cert
363+
secret:
364+
secretName: manila-csi-driver-controller-metrics-serving-cert
365+
- configMap:
366+
items:
367+
- key: ca-bundle.pem
368+
path: ca-bundle.pem
369+
name: openstack-cloud-config
370+
optional: true
371+
name: cacert
372+
- name: hosted-kubeconfig
373+
secret:
374+
defaultMode: 420
375+
secretName: service-network-admin-kubeconfig

0 commit comments

Comments
 (0)