Skip to content

Commit eeef33b

Browse files
app: allow secrets as volume mounts (#91)
1 parent ee837fc commit eeef33b

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

charts/application-core/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 4.2.6
18+
version: 4.3.0
1919

2020

2121
maintainers:

charts/application-core/templates/deployment.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,18 @@ spec:
182182
subPath: "{{ .subPath }}"
183183
{{- end }}
184184
{{- end }}
185+
{{- range $volume := .Values.extraSecretVolumes }}
186+
- mountPath: "{{ .mountPath }}"
187+
name: "{{ .name }}"
188+
{{- if eq .readOnly false }}
189+
readOnly: false
190+
{{- else }}
191+
readOnly: true
192+
{{- end }}
193+
{{- if .subPath }}
194+
subPath: "{{ .subPath }}"
195+
{{- end }}
196+
{{- end }}
185197
{{- if .Values.emptyDir }}
186198
- mountPath: {{ .Values.emptyDir.mountPath }}
187199
name: emptydir-volume
@@ -223,6 +235,11 @@ spec:
223235
configMap:
224236
name: {{ .name }}
225237
{{- end }}
238+
{{- range $volume := .Values.extraSecretVolumes }}
239+
- name: {{ .name }}
240+
secret:
241+
secretName: {{ .name }}
242+
{{- end }}
226243
{{- if .Values.emptyDir }}
227244
- name: emptydir-volume
228245
emptyDir:

charts/application-core/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ extraSecrets: []
120120
# - name: ca-cert-configmap
121121
# mountPath: /etc/ssl/certs/
122122
extraConfigMapVolumes: []
123+
extraSecretVolumes: []
123124

124125
externalSecret:
125126
enabled: false

0 commit comments

Comments
 (0)