-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from MichaelSp/unittests
restore helm unittests
- Loading branch information
Showing
15 changed files
with
696 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
charts/docker-mailserver/tests/__snapshot__/configmap_test.yaml.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
manifest should match snapshot: | ||
1: | | ||
apiVersion: v1 | ||
data: | ||
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" | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver | ||
chart: docker-mailserver-0.1.0 | ||
heritage: Helm | ||
release: RELEASE-NAME | ||
name: dovecot-cf | ||
2: | | ||
apiVersion: v1 | ||
data: | ||
fts-xapian-plugin.conf: "" | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver | ||
chart: docker-mailserver-0.1.0 | ||
heritage: Helm | ||
release: RELEASE-NAME | ||
name: fts-xapian-plugin-conf | ||
3: | | ||
apiVersion: v1 | ||
data: | ||
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\n\n# Smtp with proxy\n12525 inet n - n - 1 postscreen\n -o syslog_name=postfix/smtp-proxy\n -o postscreen_upstream_proxy_protocol=haproxy\n -o postscreen_cache_map=btree:$data_directory/postscreen_10025_cache\nEOS\n" | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver | ||
chart: docker-mailserver-0.1.0 | ||
heritage: Helm | ||
release: RELEASE-NAME | ||
name: user-patches-sh |
237 changes: 237 additions & 0 deletions
237
charts/docker-mailserver/tests/__snapshot__/deployment_test.yaml.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,237 @@ | ||
manifest should match snapshot: | ||
1: | | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver | ||
chart: docker-mailserver-0.1.0 | ||
heritage: Helm | ||
release: RELEASE-NAME | ||
name: RELEASE-NAME-docker-mailserver | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver | ||
release: RELEASE-NAME | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: RELEASE-NAME-docker-mailserver | ||
release: RELEASE-NAME | ||
spec: | ||
containers: | ||
- env: | ||
- name: AMAVIS_LOGLEVEL | ||
value: "0" | ||
- name: DOVECOT_INET_PROTOCOLS | ||
value: all | ||
- name: DOVECOT_MAILBOX_FORMAT | ||
value: maildir | ||
- name: ENABLE_AMAVIS | ||
value: "0" | ||
- name: ENABLE_CLAMAV | ||
value: "0" | ||
- name: ENABLE_DNSBL | ||
value: "0" | ||
- name: ENABLE_FAIL2BAN | ||
value: "0" | ||
- name: ENABLE_FETCHMAIL | ||
value: "0" | ||
- name: ENABLE_GETMAIL | ||
value: "0" | ||
- name: ENABLE_IMAP | ||
value: "1" | ||
- name: ENABLE_OPENDKIM | ||
value: "0" | ||
- name: ENABLE_OPENDMARC | ||
value: "0" | ||
- name: ENABLE_POLICYD_SPF | ||
value: "0" | ||
- name: ENABLE_POSTGREY | ||
value: "0" | ||
- name: ENABLE_QUOTAS | ||
value: "1" | ||
- name: ENABLE_RSPAMD | ||
value: "1" | ||
- name: ENABLE_RSPAMD_REDIS | ||
value: "1" | ||
- name: ENABLE_SASLAUTHD | ||
value: "0" | ||
- name: ENABLE_SPAMASSASSIN | ||
value: "0" | ||
- name: ENABLE_SPAMASSASSIN_KAM | ||
value: "0" | ||
- name: ENABLE_SRS | ||
value: "0" | ||
- name: ENABLE_UPDATE_CHECK | ||
value: "1" | ||
- name: FAIL2BAN_BLOCKTYPE | ||
value: drop | ||
- name: FETCHMAIL_PARALLEL | ||
value: "0" | ||
- name: FETCHMAIL_POLL | ||
value: "300" | ||
- name: GETMAIL_POLL | ||
value: "5" | ||
- name: LOGROTATE_COUNT | ||
value: "4" | ||
- name: LOGROTATE_INTERVAL | ||
value: weekly | ||
- name: LOG_LEVEL | ||
value: info | ||
- name: MARK_SPAM_AS_READ | ||
value: "0" | ||
- name: MOVE_SPAM_TO_JUNK | ||
value: "1" | ||
- name: OVERRIDE_HOSTNAME | ||
value: mail.example.com | ||
- name: PERMIT_DOCKER | ||
value: none | ||
- name: POSTFIX_INET_PROTOCOLS | ||
value: all | ||
- name: POSTFIX_REJECT_UNKNOWN_CLIENT_HOSTNAME | ||
value: "0" | ||
- name: POSTGREY_AUTO_WHITELIST_CLIENTS | ||
value: "5" | ||
- name: POSTGREY_DELAY | ||
value: "300" | ||
- name: POSTGREY_MAX_AGE | ||
value: "35" | ||
- name: POSTGREY_TEXT | ||
value: Delayed by Postgrey | ||
- name: POSTSCREEN_ACTION | ||
value: enforce | ||
- name: RELAY_PORT | ||
value: "25" | ||
- name: RSPAMD_CHECK_AUTHENTICATED | ||
value: "0" | ||
- name: RSPAMD_GREYLISTING | ||
value: "0" | ||
- name: RSPAMD_HFILTER | ||
value: "1" | ||
- name: RSPAMD_HFILTER_HOSTNAME_UNKNOWN_SCORE | ||
value: "6" | ||
- name: RSPAMD_LEARN | ||
value: "0" | ||
- name: RSPAMD_NEURAL | ||
value: "0" | ||
- name: SA_KILL | ||
value: "10" | ||
- name: SA_TAG | ||
value: "2" | ||
- name: SA_TAG2 | ||
value: "6.31" | ||
- name: SPAMASSASSIN_SPAM_TO_INBOX | ||
value: "1" | ||
- name: SPAM_SUBJECT | ||
value: '***SPAM*** ' | ||
- name: SRS_SENDER_CLASSES | ||
value: envelope_sender | ||
- name: UPDATE_CHECK_INTERVAL | ||
value: 1d | ||
image: mailserver/docker-mailserver:0.1.0 | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
exec: | ||
command: | ||
- /bin/bash | ||
- -c | ||
- supervisorctl status | grep -E "amavis|clamav|cron|dovecot|mailserver|opendkim|opendmarc|postfix|rsyslog" | grep RUNNING | ||
failureThreshold: 3 | ||
initialDelaySeconds: 10 | ||
timeoutSeconds: 5 | ||
name: docker-mailserver | ||
ports: | ||
- containerPort: 25 | ||
name: smtp | ||
- containerPort: 465 | ||
name: submissions | ||
- containerPort: 587 | ||
name: submission | ||
- containerPort: 12525 | ||
name: smtp-proxy | ||
- containerPort: 10465 | ||
name: subs-proxy | ||
- containerPort: 10587 | ||
name: sub-proxy | ||
- containerPort: 143 | ||
name: imap | ||
- containerPort: 993 | ||
name: imaps | ||
- containerPort: 10143 | ||
name: imap-proxy | ||
- containerPort: 10993 | ||
name: imaps-proxy | ||
- containerPort: 11334 | ||
name: rspamd | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/bash | ||
- -c | ||
- supervisorctl status | grep -E "mailserver|postfix" | grep RUNNING | ||
failureThreshold: 3 | ||
initialDelaySeconds: 10 | ||
timeoutSeconds: 5 | ||
resources: | ||
limits: | ||
cpu: "2" | ||
ephemeral-storage: 500Mi | ||
memory: 2048Mi | ||
requests: | ||
cpu: "1" | ||
ephemeral-storage: 100Mi | ||
memory: 1536Mi | ||
securityContext: | ||
privileged: false | ||
readOnlyRootFilesystem: false | ||
volumeMounts: | ||
- mountPath: /tmp/docker-mailserver/dovecot.cf | ||
name: dovecot-cf | ||
subPath: dovecot.cf | ||
- mountPath: /etc/dovecot/conf.d/10-plugin.conf | ||
name: fts-xapian-plugin-conf | ||
subPath: fts-xapian-plugin.conf | ||
- mountPath: /tmp/docker-mailserver/user-patches.sh | ||
name: user-patches-sh | ||
subPath: user-patches.sh | ||
- mountPath: /tmp/docker-mailserver | ||
name: mail-config | ||
- mountPath: /var/mail | ||
name: mail-data | ||
- mountPath: /var/log/mail | ||
name: mail-log | ||
- mountPath: /var/mail-state | ||
name: mail-state | ||
nodeSelector: {} | ||
priorityClassName: null | ||
restartPolicy: Always | ||
runtimeClassName: null | ||
securityContext: null | ||
serviceAccountName: RELEASE-NAME-docker-mailserver | ||
volumes: | ||
- configMap: | ||
name: dovecot-cf | ||
name: dovecot-cf | ||
- configMap: | ||
name: fts-xapian-plugin-conf | ||
name: fts-xapian-plugin-conf | ||
- configMap: | ||
name: user-patches-sh | ||
name: user-patches-sh | ||
- name: mail-config | ||
persistentVolumeClaim: | ||
claimName: RELEASE-NAME-docker-mailserver-mail-config | ||
- name: mail-data | ||
persistentVolumeClaim: | ||
claimName: RELEASE-NAME-docker-mailserver-mail-data | ||
- name: mail-log | ||
persistentVolumeClaim: | ||
claimName: RELEASE-NAME-docker-mailserver-mail-log | ||
- name: mail-state | ||
persistentVolumeClaim: | ||
claimName: RELEASE-NAME-docker-mailserver-mail-state |
Oops, something went wrong.