31
31
{{- end }}
32
32
spec :
33
33
serviceAccount : csi-cinder-controller-sa
34
+ securityContext :
35
+ {{- toYaml .Values.csi.plugin.controllerPlugin.podSecurityContext | nindent 8 }}
34
36
containers :
35
37
- name : csi-attacher
38
+ securityContext :
39
+ {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }}
36
40
image : " {{ .Values.csi.attacher.image.repository }}:{{ .Values.csi.attacher.image.tag }}"
37
41
imagePullPolicy : {{ .Values.csi.attacher.image.pullPolicy }}
38
42
args :
54
58
mountPath : /var/lib/csi/sockets/pluginproxy/
55
59
resources : {{ toYaml .Values.csi.attacher.resources | nindent 12 }}
56
60
- name : csi-provisioner
61
+ securityContext :
62
+ {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }}
57
63
image : " {{ .Values.csi.provisioner.image.repository }}:{{ .Values.csi.provisioner.image.tag }}"
58
64
imagePullPolicy : {{ .Values.csi.provisioner.image.pullPolicy }}
59
65
args :
77
83
mountPath : /var/lib/csi/sockets/pluginproxy/
78
84
resources : {{ toYaml .Values.csi.provisioner.resources | nindent 12 }}
79
85
- name : csi-snapshotter
86
+ securityContext :
87
+ {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }}
80
88
image : " {{ .Values.csi.snapshotter.image.repository }}:{{ .Values.csi.snapshotter.image.tag }}"
81
89
imagePullPolicy : {{ .Values.csi.snapshotter.image.pullPolicy }}
82
90
args :
97
105
name : socket-dir
98
106
resources : {{ toYaml .Values.csi.snapshotter.resources | nindent 12 }}
99
107
- name : csi-resizer
108
+ securityContext :
109
+ {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }}
100
110
image : " {{ .Values.csi.resizer.image.repository }}:{{ .Values.csi.resizer.image.tag }}"
101
111
imagePullPolicy : {{ .Values.csi.resizer.image.pullPolicy }}
102
112
args :
@@ -118,6 +128,8 @@ spec:
118
128
mountPath : /var/lib/csi/sockets/pluginproxy/
119
129
resources : {{ toYaml .Values.csi.resizer.resources | nindent 12 }}
120
130
- name : liveness-probe
131
+ securityContext :
132
+ {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }}
121
133
image : " {{ .Values.csi.livenessprobe.image.repository }}:{{ .Values.csi.livenessprobe.image.tag }}"
122
134
imagePullPolicy : {{ .Values.csi.livenessprobe.image.pullPolicy }}
123
135
args :
@@ -136,6 +148,8 @@ spec:
136
148
name : socket-dir
137
149
resources : {{ toYaml .Values.csi.livenessprobe.resources | nindent 12 }}
138
150
- name : cinder-csi-plugin
151
+ securityContext :
152
+ {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }}
139
153
image : " {{ .Values.csi.plugin.image.repository }}:{{ .Values.csi.plugin.image.tag | default .Chart.AppVersion }}"
140
154
imagePullPolicy : {{ .Values.csi.plugin.image.pullPolicy }}
141
155
args :
@@ -172,7 +186,9 @@ spec:
172
186
volumeMounts :
173
187
- name : socket-dir
174
188
mountPath : /csi
175
- {{- .Values.csi.plugin.volumeMounts | toYaml | trimSuffix "\n" | nindent 12 }}
189
+ {{- with .Values.csi.plugin.volumeMounts }}
190
+ {{- toYaml . | nindent 12 }}
191
+ {{- end }}
176
192
resources : {{ toYaml .Values.csi.plugin.resources | nindent 12 }}
177
193
volumes :
178
194
- name : socket-dir
@@ -181,13 +197,14 @@ spec:
181
197
- name : cloud-config
182
198
secret :
183
199
secretName : {{ .Values.secret.name }}
184
- {{- end }}
185
- {{- if .Values.secret.hostMount }}
200
+ {{- else if .Values.secret.hostMount }}
186
201
- name : cloud-config
187
202
hostPath :
188
203
path : /etc/kubernetes
189
204
{{- end }}
190
- {{ .Values.csi.plugin.volumes | toYaml | trimSuffix "\n" | nindent 8 }}
205
+ {{- with .Values.csi.plugin.volumes }}
206
+ {{- toYaml . | nindent 8 }}
207
+ {{- end }}
191
208
affinity : {{ toYaml .Values.csi.plugin.controllerPlugin.affinity | nindent 8 }}
192
209
nodeSelector : {{ toYaml .Values.csi.plugin.controllerPlugin.nodeSelector | nindent 8 }}
193
210
tolerations : {{ toYaml .Values.csi.plugin.controllerPlugin.tolerations | nindent 8 }}
0 commit comments