Skip to content

Commit 45a6748

Browse files
authored
Merge pull request #155 from MediaMarktSaturn/fix-mount-defaultmode
[Application] Fix secret and configmap volume mount defaultMode
2 parents 36567c4 + 98ac7c5 commit 45a6748

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

charts/application/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ maintainers:
77
- name: MediaMarktSaturn
88
url: https://github.com/MediaMarktSaturn
99
appVersion: 1.0.0
10-
version: 1.26.0
10+
version: 1.26.1

charts/application/templates/_podTemplate.tpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,11 @@ spec:
303303
{{- range .Values.secretVolumes }}
304304
- name: {{ .secretName }}
305305
mountPath: {{ .mountPath }}
306-
{{- if .defaultMode }}
307-
defaultMode: {{ .defaultMode }}
308-
{{- end }}
309306
readOnly: true
310307
{{- end }}
311308
{{- range .Values.configVolumes }}
312309
- name: {{ .configMapName }}
313310
mountPath: {{ .mountPath }}
314-
{{- if .defaultMode }}
315-
defaultMode: {{ .defaultMode }}
316-
{{- end }}
317311
readOnly: true
318312
{{- end }}
319313
{{- if .Values.serviceAccount.secretName }}
@@ -350,11 +344,17 @@ spec:
350344
- name: {{ .secretName }}
351345
secret:
352346
secretName: {{ .secretName }}
347+
{{- if .defaultMode }}
348+
defaultMode: {{ .defaultMode }}
349+
{{- end }}
353350
{{- end }}
354351
{{- range .Values.configVolumes }}
355352
- name: {{ .configMapName }}
356353
configMap:
357354
name: {{ .configMapName }}
355+
{{- if .defaultMode }}
356+
defaultMode: {{ .defaultMode }}
357+
{{- end }}
358358
{{- end }}
359359
{{- if .Values.serviceAccount.secretName }}
360360
- name: service-account

charts/application/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ disruptionBudget:
128128
secretVolumes: []
129129
# - secretName: mysecret
130130
# mountPath: /mypath
131-
# defaultMode: 420
131+
# defaultMode: 0420
132132

133133
# list of configmaps to be mounted to app pod
134134
configVolumes: []
135135
# - configMapName: myconfigmap
136136
# mountPath: /mypath
137-
# defaultMode: 420
137+
# defaultMode: 0420
138138

139139
# list of secret names to be used as envFrom entries
140140
secretEnvFrom: []

0 commit comments

Comments
 (0)