Skip to content

Commit f763a75

Browse files
committed
feat: support mta-sts configuration with overrides
Signed-off-by: ffais <[email protected]>
1 parent 25a565b commit f763a75

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{- if and .Values.front.overrides }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ printf "%s-front-override" (include "mailu.fullname" .) }}
6+
namespace: {{ include "common.names.namespace" . | quote }}
7+
labels: {{- include "common.labels.standard" . | nindent 4 }}
8+
app.kubernetes.io/component: front
9+
{{- if .Values.commonLabels }}
10+
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
11+
{{- end }}
12+
{{- if .Values.commonAnnotations }}
13+
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
14+
{{- end }}
15+
{{- with .Values.front.overrides }}
16+
data:
17+
{{- .|toYaml|nindent 2 }}
18+
{{ end }}
19+
{{ end }}

charts/mailu/templates/front/deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ spec:
7878
volumeMounts:
7979
- name: certs
8080
mountPath: /certs
81+
{{- if .Values.front.overrides }}
82+
- name: overrides
83+
mountPath: /overrides
84+
{{- end }}
8185
{{- if .Values.front.extraVolumeMounts }}
8286
{{- include "common.tplvalues.render" (dict "value" .Values.front.extraVolumeMounts "context" $) | nindent 12 }}
8387
{{- end }}
@@ -201,6 +205,11 @@ spec:
201205
- key: tls.key
202206
path: key.pem
203207
secretName: {{ include "mailu.certificatesSecretName" . }}
208+
{{- if .Values.front.overrides }}
209+
- name: overrides
210+
configMap:
211+
name: {{ printf "%s-front-override" (include "mailu.fullname" .) }}
212+
{{- end }}
204213
{{- if .Values.front.extraVolumes }}
205214
{{- include "common.tplvalues.render" (dict "value" .Values.front.extraVolumes "context" $) | nindent 8 }}
206215
{{- end }}

charts/mailu/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,16 @@ front:
900900
## @param front.extraContainers Add additional containers to the pod
901901
extraContainers: []
902902

903+
## @param front.overrides Enable front overrides
904+
## Example:
905+
## overrides:
906+
## mta-sts.conf: |
907+
## # More info here: https://mailu.io/master/faq.html#how-do-i-setup-a-mta-sts-policy
908+
## location ^~ /.well-known/mta-sts.txt {
909+
## return 200 "version: STSv1\nmode: enforce\nmax_age: 1296000\nmx: mailu.example.com\n";
910+
## }
911+
overrides: {}
912+
903913
## @section Admin parameters
904914
admin:
905915
## @param admin.enabled Enable access to the admin interface

0 commit comments

Comments
 (0)