Skip to content

Commit 5fd90a7

Browse files
committed
fix unittests
1 parent 16375fe commit 5fd90a7

14 files changed

Lines changed: 946 additions & 143 deletions

charts/docker-mailserver/templates/deployment.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ spec:
5454
{{- end }}
5555

5656
# Secrets
57-
{{- range $name, $secret := .Values.secrets }}
58-
- name: {{ regexReplaceAll "[.]" $name "-" }}
57+
{{- range .Values.secrets }}
58+
- name: {{ regexReplaceAll "[.]" .name "-" }}
5959
secret:
60-
secretName: {{ regexReplaceAll "[.]" $name "-" }}
60+
secretName: {{ regexReplaceAll "[.]" .name "-" }}
6161
{{- end }}
6262

6363
# Certificate
@@ -129,13 +129,13 @@ spec:
129129
{{- end }}
130130

131131
# Config via Secrets
132-
{{- range $name, $secret := .Values.secrets }}
133-
- name: {{ regexReplaceAll "[.]" $name "-" }}
134-
subPath: {{ $secret.key | default $name }}
135-
{{- if isAbs $secret.path }}
136-
mountPath: {{ $secret.path }}
132+
{{- range .Values.secrets }}
133+
- name: {{ regexReplaceAll "[.]" .name "-" }}
134+
subPath: {{ .key | default .name }}
135+
{{- if isAbs .path }}
136+
mountPath: {{ $.path }}
137137
{{- else }}
138-
mountPath: /tmp/docker-mailserver/{{ $secret.path }}
138+
mountPath: /tmp/docker-mailserver/{{ .path }}
139139
{{- end }}
140140
{{- end }}
141141

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
manifest should match snapshot:
2+
1: |
3+
apiVersion: v1
4+
data:
5+
dovecot.cf: "\nhaproxy_trusted_networks = 10.0.0.0/8 192.168.0.0/16 172.16.0.0/16\nservice imap-login {\n inet_listener imap {\n port = 143\n }\n \n inet_listener imaps {\n port = 993\n ssl = yes\n }\n \n inet_listener imap_proxy {\n haproxy = yes\n port = 10143\n ssl = no\n }\n\n inet_listener imaps_proxy {\n haproxy = yes\n port = 10993\n ssl = yes\n }\n}\n"
6+
kind: ConfigMap
7+
metadata:
8+
labels:
9+
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver
10+
chart: docker-mailserver-0.1.0
11+
heritage: Helm
12+
release: RELEASE-NAME
13+
name: dovecot-cf
14+
2: |
15+
apiVersion: v1
16+
data:
17+
fts-xapian-plugin.conf: ""
18+
kind: ConfigMap
19+
metadata:
20+
labels:
21+
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver
22+
chart: docker-mailserver-0.1.0
23+
heritage: Helm
24+
release: RELEASE-NAME
25+
name: fts-xapian-plugin-conf
26+
3: |
27+
apiVersion: v1
28+
data:
29+
user-patches.sh: "#!/bin/bash\n# Make sure to keep this file in sync with https://github.com/docker-mailserver/docker-mailserver/blob/master/target/postfix/master.cf!\ncat <<EOS >> /etc/postfix/master.cf\n\n# Submission with proxy\n10587 inet n - n - - smtpd\n -o syslog_name=postfix/submission\n -o smtpd_tls_security_level=encrypt\n -o smtpd_sasl_auth_enable=yes\n -o smtpd_sasl_type=dovecot\n -o smtpd_reject_unlisted_recipient=no\n -o smtpd_sasl_authenticated_header=yes\n -o smtpd_client_restrictions=permit_sasl_authenticated,reject\n -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\n -o smtpd_sender_restrictions=\\$mua_sender_restrictions\n -o smtpd_discard_ehlo_keywords=\n -o milter_macro_daemon_name=ORIGINATING\n -o cleanup_service_name=sender-cleanup\n -o smtpd_upstream_proxy_protocol=haproxy \n\n# Submissions with proxy\n10465 inet n - n - - smtpd\n -o syslog_name=postfix/submissions\n -o smtpd_tls_wrappermode=yes\n -o smtpd_sasl_auth_enable=yes\n -o smtpd_sasl_type=dovecot\n -o smtpd_reject_unlisted_recipient=no\n -o smtpd_sasl_authenticated_header=yes\n -o smtpd_client_restrictions=permit_sasl_authenticated,reject\n -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\n -o smtpd_sender_restrictions=\\$mua_sender_restrictions\n -o smtpd_discard_ehlo_keywords=\n -o milter_macro_daemon_name=ORIGINATING\n -o cleanup_service_name=sender-cleanup\n -o smtpd_upstream_proxy_protocol=haproxy\nEOS\n"
30+
kind: ConfigMap
31+
metadata:
32+
labels:
33+
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver
34+
chart: docker-mailserver-0.1.0
35+
heritage: Helm
36+
release: RELEASE-NAME
37+
name: user-patches-sh

0 commit comments

Comments
 (0)