Skip to content

Commit 8927e93

Browse files
authored
Merge branch 'docker-mailserver:master' into fix/probes
2 parents a91243d + 43e1b93 commit 8927e93

14 files changed

Lines changed: 369 additions & 50 deletions

File tree

.ci/ct-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# This file defines the config for "ct" (chart tester) used by the helm linting GitHub workflow
22

33
lint-conf: .ci/lint-config.yaml
4-
validate-maintainers: false
4+
target-branch: master
5+
validate-maintainers: false
6+
check-version-increment: false

.github/workflows/on-push-lint-charts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
strategy:
6565
matrix:
6666
# Choose from https://hub.docker.com/r/kindest/node/tags
67-
KubeVersion: [ 1.27.3, 1.28.0, 1.29.0 ]
67+
KubeVersion: [ 1.30.10, 1.31.6, 1.32.2]
6868

6969
steps:
7070
- name: Checkout
@@ -78,7 +78,7 @@ jobs:
7878
python-version: 3.11
7979

8080
- name: Set up chart-testing
81-
uses: helm/chart-testing-action@v2.6.0
81+
uses: helm/chart-testing-action@v2.7.0
8282

8383
- name: Run chart-testing (list-changed)
8484
id: list-changed

.github/workflows/on-push-master-publish-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
2828
2929
- name: Run chart-releaser
30-
uses: helm/chart-releaser-action@v1.6.0
30+
uses: helm/chart-releaser-action@v1.7.0
3131
env:
3232
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3333

charts/docker-mailserver/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "14.0.0"
33
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
44
name: docker-mailserver
5-
version: 4.1.0
5+
version: 4.1.4
66
sources:
77
- https://github.com/docker-mailserver/docker-mailserver-helm
88
maintainers:

charts/docker-mailserver/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ Configuration files are stored on a Kubernetes [volume](#persistence) mounted at
9898

9999
### ConfigMaps
100100

101-
Its is also possible to use ConfigMaps to mount configuration files in the container. This is done by adding to the `configFiles` key in a custom `values.yaml` file. For more information please see the [documentation](./values.yaml#L425) in values.yaml
101+
Its is also possible to use ConfigMaps to mount configuration files in the container. This is done by adding to the `configFiles` key in a custom `values.yaml` file. For more information please see the [documentation](./values.yaml#L453) in values.yaml
102102

103103
### Secrets
104104

105-
Secrets can also be used to mount configuration files in the container. For example, dkim keys could be stored in a secret as opposed to a file in the `mail-config` volume. Once again, for more information please see the [documentation](./values.yaml#L600) in values.yaml
105+
Secrets can also be used to mount configuration files in the container. For example, dkim keys could be stored in a secret as opposed to a file in the `mail-config` volume. Once again, for more information please see the [documentation](./values.yaml#L610) in values.yaml
106106

107107
## Values YAML
108108

@@ -179,7 +179,7 @@ If you do not enable the PROXY protocol and your mail server is not exposed usin
179179

180180
## Persistence
181181

182-
By default, the Chart creates four PersistentVolumeClaims. These are defined under the `persistence` key:
182+
By default, the Chart assumes there are for Persistent volumes. Thus it requests four PersistentVolumeClaims which are defined using the `persistent_volume_claims` key. Each PVC can be set to an existing claim by settin the `persistent_volume_claims.<volume_name>.existing_claim` key or a new cliams. To disable creation of a PVC, set `persistent_volume_claims.<volume_name>.enabled` to false. The default PVCs have the following characteristics:
183183

184184
| PVC Name | Default Size | Mount | Description |
185185
| ---------- | ------- | ----------------------- | -------------------------------------|
@@ -188,6 +188,25 @@ By default, the Chart creates four PersistentVolumeClaims. These are defined und
188188
| mail-state | 1Gi | /var/mail-state | Stores [state](https://docker-mailserver.github.io/docker-mailserver/latest/faq/#what-about-the-docker-datadmsmail-state-directory) for mail services |
189189
| mail-log | 1Gi | /var/log/mail | Stores log files |
190190

191+
The PVCs are then mounted to `volumeMounts` via the `persistence` key. Each `volumeMount` must specify a volume name and mount path. It is also possbile to set a subpath via the `subPath` key.
192+
193+
Extra volumes and volume mounts may be added using the `extraVolumes` and `extraVolumeMounts` keys.
194+
195+
## Upgrading to Version 5
196+
Version 5.0 upgrades docker-mailserver to version 15. This version of the chart *does* include backwards incompatible changes
197+
198+
### PersistentVolumeClaims
199+
200+
Previously by default the Chart created four persistent volume claims and then mounted them to the container. This made it difficult for users that want to use just one Volume. Therefore the `persistence` key was spit into two keys:
201+
202+
* `persistent_volume_claims`
203+
* `persistence`
204+
205+
This separate the creation of PVCs from mounting their associated volumes. If you previously overrode the creation of PVCs or their mount paths you will need to update your custom `values.yaml` file.
206+
207+
## Upgrading to Version 4
208+
Version 4.0 upgrades docker-mailserver to version 14. There are no backwards incompatible changes in the chart.
209+
191210
## Upgrading to Version 3
192211

193212
Version 3.0 is not backwards compatible with previous versions. The biggest changes include:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
service:
2-
type: ClusterIP
2+
type: ClusterIP

charts/docker-mailserver/templates/deployment.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ spec:
7171
{{- end }}
7272

7373
# PVCs
74-
{{- range $name, $persistence := .Values.persistence }}
75-
{{- if $persistence.enabled }}
74+
{{- range $name, $pvc := .Values.persistent_volume_claims }}
75+
{{- if $pvc.enabled }}
7676
- name: {{ $name }}
7777
persistentVolumeClaim:
78-
{{- if $persistence.existingClaim}}
79-
claimName: {{ $persistence.existingClaim }}
78+
{{- if $pvc.existingClaim}}
79+
claimName: {{ $pvc.existingClaim }}
8080
{{ else }}
8181
claimName: {{ template "dockermailserver.fullname" $ }}-{{ $name }}
8282
{{ end }}
@@ -168,10 +168,11 @@ spec:
168168

169169
# Mount Volumes
170170
{{- range $name, $persistence := .Values.persistence }}
171-
{{- if $persistence.enabled }}
172-
- name: {{ $name }}
171+
- name: {{ $persistence.volumeName }}
173172
mountPath: {{ $persistence.mountPath }}
174-
{{- end }}
173+
{{- if $persistence.subPath }}
174+
subPath: {{ $persistence.subPath }}
175+
{{- end }}
175176
{{- end }}
176177

177178
# Mount Extra Volumes

charts/docker-mailserver/templates/pvc.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
{{- range $name, $persistence := .Values.persistence -}}
2-
{{- if and (not $persistence.existingClaim) ($persistence.enabled) }}
1+
{{- range $name, $pvc := .Values.persistent_volume_claims -}}
2+
{{- if and (not $pvc.existingClaim) ($pvc.enabled) }}
33
kind: PersistentVolumeClaim
44
apiVersion: v1
55
metadata:
66
name: {{ template "dockermailserver.fullname" $ }}-{{ $name }}
7-
{{- if $persistence.annotations }}
7+
{{- if $pvc.annotations }}
88
annotations:
9-
{{ toYaml $persistence.annotations | indent 2 }}
9+
{{ toYaml $pvc.annotations }}
1010
{{ end }}
1111
spec:
1212
accessModes:
13-
{{ toYaml $persistence.accessModes | indent 2 }}
13+
{{ toYaml $pvc.accessModes | indent 2 }}
1414

15-
{{- if $persistence.storageClass }}
16-
storageClassName: {{ $persistence.storageClass | quote }}
15+
{{- if $pvc.storageClass }}
16+
storageClassName: {{ $pvc.storageClass | quote }}
1717
{{- end }}
1818
resources:
1919
requests:
20-
storage: {{ $persistence.size | quote }}
21-
{{- if $persistence.selector }}
20+
storage: {{ $pvc.size | quote }}
21+
{{- if $pvc.selector }}
2222
selector:
23-
{{ toYaml $persistence.selector | indent 4 }}
23+
{{ toYaml $pvc.selector | indent 4 }}
2424
{{ end }}
2525
---
2626
{{- end }}

charts/docker-mailserver/templates/service.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ metadata:
2626
spec:
2727
## If a load balancer is being used, ensure that the newer type of LB that passes along IP information is used
2828
## rather than the legacy one.
29-
{{- if eq .Values.service.type "LoadBalancer" }}
29+
{{- if or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer") }}
30+
{{- if .Values.service.externalTrafficPolicy }}
31+
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
32+
{{- end }}
33+
{{- if and (not .Values.service.externalTrafficPolicy) (eq .Values.service.type "LoadBalancer") }}
3034
externalTrafficPolicy: Local
31-
{{- else if eq .Values.service.type "NodePort" }}
35+
{{- end }}
36+
{{- if and (not .Values.service.externalTrafficPolicy) (eq .Values.service.type "NodePort") }}
3237
externalTrafficPolicy: Cluster
33-
{{ end }}
38+
{{- end }}
39+
{{- end }}
3440
selector:
3541
app.kubernetes.io/name: {{ template "dockermailserver.fullname" . }}
3642
release: "{{ .Release.Name }}"

charts/docker-mailserver/tests/__snapshot__/pvc_test.yaml.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ manifest should match snapshot:
4343
resources:
4444
requests:
4545
storage: 1Gi
46-
should apply annotations from persistence.annotations:
46+
should apply annotations from persistent_volume_claims.annotations:
4747
1: |
4848
apiVersion: v1
4949
kind: PersistentVolumeClaim

0 commit comments

Comments
 (0)