1818 spec :
1919 # hostPID is required for autofs to work.
2020 hostPID : {{ .Values.nodeplugin.hostPID }}
21+ # hostUsers is required for autofs to work.
22+ hostUsers : {{ .Values.nodeplugin.hostUsers }}
2123 {{- with .Values.nodeplugin.podSecurityContext }}
2224 securityContext : {{ toYaml . | nindent 8 }}
2325 {{- end }}
@@ -44,13 +46,21 @@ spec:
4446 - name : KUBELET_CSI_REGISTRATION_PATH
4547 value : {{ .Values.kubeletDirectory }}/plugins/{{ .Values.csiDriverName }}/{{ .Values.cvmfsCSIPluginSocketFile }}
4648 volumeMounts :
49+ - name : tmp
50+ mountPath : /tmp
4751 - name : socket-dir
4852 mountPath : /csi
4953 - name : registration-dir
5054 mountPath : /registration
5155 {{- with .Values.nodeplugin.registrar.resources }}
5256 resources : {{ toYaml . | nindent 12 }}
5357 {{- end }}
58+ securityContext :
59+ privileged : false
60+ capabilities :
61+ drop : ["ALL"]
62+ allowPrivilegeEscalation : false
63+ runAsNonRoot : false
5464 - name : nodeplugin
5565 image : {{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag | default .Chart.AppVersion }}
5666 command : [/csi-cvmfsplugin]
6777 privileged : true
6878 capabilities :
6979 add : ["SYS_ADMIN"]
80+ drop : ["ALL"]
7081 allowPrivilegeEscalation : true
82+ runAsNonRoot : false
7183 env :
7284 - name : NODE_ID
7385 valueFrom :
7890 - name : CSI_DRIVERNAME
7991 value : {{ .Values.csiDriverName }}
8092 volumeMounts :
93+ - name : tmp
94+ mountPath : /tmp
8195 - name : plugins-dir
8296 mountPath : {{ .Values.kubeletDirectory }}/plugins
8397 mountPropagation : Bidirectional
@@ -114,8 +128,12 @@ spec:
114128 privileged : true
115129 capabilities :
116130 add : ["SYS_ADMIN"]
131+ drop : ["ALL"]
117132 allowPrivilegeEscalation : true
133+ runAsNonRoot : false
118134 volumeMounts :
135+ - name : tmp
136+ mountPath : /tmp
119137 - mountPath : /sys
120138 name : host-sys
121139 - name : lib-modules
@@ -149,8 +167,12 @@ spec:
149167 privileged : true
150168 capabilities :
151169 add : ["SYS_ADMIN"]
170+ drop : ["ALL"]
152171 allowPrivilegeEscalation : true
172+ runAsNonRoot : false
153173 volumeMounts :
174+ - name : tmp
175+ mountPath : /tmp
154176 - name : autofs-root
155177 mountPath : /cvmfs
156178 mountPropagation : Bidirectional
@@ -173,8 +195,12 @@ spec:
173195 privileged : true
174196 capabilities :
175197 add : ["SYS_ADMIN"]
198+ drop : ["ALL"]
176199 allowPrivilegeEscalation : true
200+ runAsNonRoot : false
177201 volumeMounts :
202+ - name : tmp
203+ mountPath : /tmp
178204 - name : plugins-dir
179205 mountPath : {{ .Values.kubeletDirectory }}/plugins
180206 mountPropagation : Bidirectional
@@ -204,7 +230,14 @@ spec:
204230 command : ["/usr/sbin/crond", "-n", "-s", "-m", "off", "-x", "load,proc,sch"]
205231 securityContext :
206232 privileged : true
233+ capabilities :
234+ add : ["SYS_ADMIN"]
235+ drop : ["ALL"]
236+ allowPrivilegeEscalation : true
237+ runAsNonRoot : false
207238 volumeMounts :
239+ - name : tmp
240+ mountPath : /tmp
208241 - name : autofs-root
209242 mountPath : /cvmfs
210243 mountPropagation : Bidirectional
@@ -222,6 +255,9 @@ spec:
222255 {{- toYaml . | nindent 8 }}
223256 {{- end }}
224257 volumes :
258+ - name : tmp
259+ emptyDir :
260+ sizeLimit : 265Mi
225261 - name : socket-dir
226262 hostPath :
227263 path : {{ .Values.kubeletDirectory }}/plugins/{{ .Values.csiDriverName }}
@@ -247,7 +283,8 @@ spec:
247283 hostPath :
248284 path : /dev
249285 - name : runtime-metadata
250- emptyDir : {}
286+ emptyDir :
287+ sizeLimit : 1Gi
251288 - name : autofs-root
252289 hostPath :
253290 path : {{ .Values.automountHostPath }}
0 commit comments