Skip to content

Commit 7813755

Browse files
authored
Allow configuring additional containers in Helm chart (#167)
* Add extraContainers option for controllerplugin and nodeplugin * Add extraInitContainers option for controllerplugin and nodeplugin --------- Signed-off-by: Steven I. <commits@imsteven.xyz>
1 parent 3158bf7 commit 7813755

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

deployments/helm/cvmfs-csi/templates/controllerplugin-deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ spec:
1919
securityContext: {{ toYaml . | nindent 8 }}
2020
{{- end }}
2121
serviceAccountName: {{ include "cvmfs-csi.serviceAccountName.controllerplugin" . }}
22+
{{- if .Values.controllerplugin.extraInitContainers }}
23+
initContainers:
24+
{{- with .Values.controllerplugin.extraInitContainers }}
25+
{{- toYaml . | nindent 8 }}
26+
{{- end }}
27+
{{- end }}
2228
containers:
2329
- name: provisioner
2430
image: {{ .Values.controllerplugin.provisioner.image.repository }}:{{ .Values.controllerplugin.provisioner.image.tag }}
@@ -57,6 +63,9 @@ spec:
5763
{{- with .Values.controllerplugin.plugin.resources }}
5864
resources: {{ toYaml . | nindent 12 }}
5965
{{- end }}
66+
{{- with .Values.controllerplugin.extraContainers }}
67+
{{- toYaml . | nindent 8 }}
68+
{{- end }}
6069
volumes:
6170
- name: socket-dir
6271
emptyDir: {}

deployments/helm/cvmfs-csi/templates/nodeplugin-daemonset.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ spec:
2424
{{- if .Values.nodeplugin.serviceAccount.use }}
2525
serviceAccountName: {{ include "cvmfs-csi.serviceAccountName.nodeplugin" . }}
2626
{{- end }}
27+
{{- if .Values.nodeplugin.extraInitContainers }}
28+
initContainers:
29+
{{- with .Values.nodeplugin.extraInitContainers }}
30+
{{- toYaml . | nindent 8 }}
31+
{{- end }}
32+
{{- end }}
2733
containers:
2834
- name: registrar
2935
image: {{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}
@@ -212,6 +218,9 @@ spec:
212218
readOnly: true
213219
{{- end }}
214220
{{- end }}
221+
{{- with .Values.nodeplugin.extraContainers }}
222+
{{- toYaml . | nindent 8 }}
223+
{{- end }}
215224
volumes:
216225
- name: socket-dir
217226
hostPath:

deployments/helm/cvmfs-csi/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ nodeplugin:
8484
configMap:
8585
name: cvmfs-csi-default-d
8686

87+
# Extra containers to be appended to nodeplugin's Pod.spec.containers.
88+
extraContainers: []
89+
90+
# Extra containers to be appended to nodeplugin's Pod.spec.initContainers.
91+
extraInitContainers: []
92+
8793
# CVMFS CSI image and container resources specs.
8894
plugin:
8995
image:
@@ -256,6 +262,12 @@ controllerplugin:
256262

257263
extraVolumes: []
258264

265+
# Extra containers to be appended to controllerPlugin's Pod.spec.containers.
266+
extraContainers: []
267+
268+
# Extra containers to be appended to controllerPlugin's Pod.spec.initContainers.
269+
extraInitContainers: []
270+
259271
# CVMFS CSI image and container resources specs.
260272
plugin:
261273
image:

0 commit comments

Comments
 (0)