Skip to content

Commit f43f746

Browse files
authored
Merge branch 'master' into feature/externaltraffic-toggle
2 parents e63f80f + a475362 commit f43f746

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

charts/docker-mailserver/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ spec:
171171
{{- if $persistence.enabled }}
172172
- name: {{ $name }}
173173
mountPath: {{ $persistence.mountPath }}
174+
{{- if $persistence.subPath }}
175+
subPath: {{ $persistence.subPath }}
176+
{{- end }}
174177
{{- end }}
175178
{{- end }}
176179

charts/docker-mailserver/tests/deployment_test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ tests:
2121
path: spec.template.spec.containers[0].image
2222
value: bananas:in-pajamas
2323

24+
- it: should use subPath for volumes if defined
25+
set:
26+
persistence:
27+
mail-data:
28+
subPath: another-folder
29+
asserts:
30+
- equal:
31+
path: spec.template.spec.containers[0].volumeMounts[?(@.name=="mail-data")].subPath
32+
value: another-folder
33+
2434
- it: manifest should match snapshot
2535
asserts:
2636
- matchSnapshot: { }

charts/docker-mailserver/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,13 @@ deployment:
282282
# volumeMounts:
283283
# - name: extra-storage
284284
# mountPath: /mnt/extra-storage
285+
# subPath: another-folder
285286

286287
## Optionally specify a list of extra mounts to add (normally used with extraVolumes)
287288
extraVolumeMounts: []
288289
# - name: extra-storage
289290
# mountPath: /mnt/extra-storage
291+
# subPath: another-folder
290292

291293
## Optionally specify a list of extra volumes to add
292294
extraVolumes: []
@@ -334,6 +336,7 @@ persistence:
334336
enabled: true
335337
existingClaim: ""
336338
mountPath: /tmp/docker-mailserver
339+
subPath: ""
337340
size: "1Mi"
338341
annotations: {}
339342
accessModes:
@@ -345,6 +348,7 @@ persistence:
345348
mail-data:
346349
enabled: true
347350
existingClaim: ""
351+
subPath: ""
348352
size: 10Gi
349353
mountPath: /var/mail
350354
annotations: {}
@@ -359,6 +363,7 @@ persistence:
359363
enabled: true
360364
existingClaim: ""
361365
mountPath: /var/mail-state
366+
subPath: ""
362367
size: "1Gi"
363368
annotations: {}
364369
accessModes:
@@ -371,6 +376,7 @@ persistence:
371376
enabled: true
372377
existingClaim: ""
373378
mountPath: /var/log/mail
379+
subPath: ""
374380
size: "1Gi"
375381
annotations: {}
376382
accessModes:

0 commit comments

Comments
 (0)