Skip to content

Commit f488924

Browse files
committed
Add extraConfigMapMounts to chart
1 parent a7e2b51 commit f488924

3 files changed

Lines changed: 26 additions & 28 deletions

File tree

.vscode/settings.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

chart/templates/statefulset.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ spec:
8282
subPath: {{ . | quote }}
8383
{{- end }}
8484
{{- end }}
85+
{{- range .Values.extraConfigMapMounts }}
86+
- name: {{ .name | quote }}
87+
mountPath: {{ .mountPath | quote }}
88+
readOnly: true
89+
{{- with .subPath }}
90+
subPath: {{ . | quote }}
91+
{{- end }}
92+
{{- end }}
8593
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds | default 30 }}
8694
volumes:
8795
- name: config
@@ -101,6 +109,17 @@ spec:
101109
defaultMode: {{ . }}
102110
{{- end }}
103111
{{- end }}
112+
{{- range .Values.extraConfigMapMounts }}
113+
- name: {{ .name | quote }}
114+
configMap:
115+
name: {{ .configMapName | quote }}
116+
{{- with .optional }}
117+
optional: {{ . }}
118+
{{- end }}
119+
{{- with .defaultMode }}
120+
defaultMode: {{ . }}
121+
{{- end }}
122+
{{- end }}
104123
{{- if not .Values.persistence.enabled }}
105124
- name: "{{ .Chart.Name }}-database"
106125
emptyDir: {}

chart/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ extraSecretMounts: []
108108
# mountPath: /var/run/secrets/example
109109
# optional: false
110110

111+
# Additional read-only ConfigMap mounts on the output StatefulSet definition.
112+
extraConfigMapMounts: []
113+
# - name: example-config
114+
# configMapName: example-config
115+
# mountPath: /etc/example
116+
# optional: false
117+
111118
tolerations: []
112119

113120
affinity: {}

0 commit comments

Comments
 (0)