Skip to content

Commit 72b7beb

Browse files
author
Kalvis Kazoks
committed
SLT-1193: Clean up mailhog configuration from chart templates.
1 parent e29cfd7 commit 72b7beb

File tree

6 files changed

+2
-68
lines changed

6 files changed

+2
-68
lines changed

charts/drupal/templates/NOTES.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ Your site is available at:
1616
{{- end }}
1717
{{- end }}
1818

19-
{{- if .Values.mailhog.enabled }}
20-
21-
Mailhog available at:
22-
23-
http://{{- template "drupal.domain" . }}/mailhog
24-
{{- range $index, $domain := .Values.exposeDomains }}
25-
http://{{ $domain.hostname }}/mailhog
26-
{{- end }}
27-
{{- end }}
28-
2919
{{- if .Values.mailpit.enabled }}
3020

3121
Mailpit available at:

charts/drupal/templates/_helpers.tpl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ imagePullSecrets:
9898
- name: SMTP_ADDRESS
9999
{{- if .Values.mailpit.enabled }}
100100
value: "{{ .Release.Name }}-mailpit-smtp:25"
101-
{{ else if .Values.mailhog.enabled }}
102-
value: "{{ .Release.Name }}-mailhog:1025"
103101
{{ else }}
104102
value: {{ .Values.smtp.address | quote }}
105103
{{- end }}
@@ -118,8 +116,6 @@ imagePullSecrets:
118116
- name: SSMTP_MAILHUB
119117
{{- if .Values.mailpit.enabled }}
120118
value: "{{ .Release.Name }}-mailpit-smtp:25"
121-
{{ else if .Values.mailhog.enabled }}
122-
value: "{{ .Release.Name }}-mailhog:1025"
123119
{{ else }}
124120
value: {{ .Values.smtp.address | quote }}
125121
{{- end }}
@@ -244,12 +240,7 @@ imagePullSecrets:
244240
- name: ELASTICSEARCH_HOST
245241
value: {{ .Release.Name }}-es
246242
{{- end }}
247-
{{- if or .Values.mailhog.enabled .Values.mailpit.enabled .Values.smtp.enabled }}
248-
{{- if .Values.mailhog.enabled }}
249-
{{- if contains "mailhog" .Release.Name -}}
250-
{{- fail "Do not use 'mailhog' in release name or deployment will fail" -}}
251-
{{- end }}
252-
{{- end }}
243+
{{- if or .Values.mailpit.enabled .Values.smtp.enabled }}
253244
{{- if .Values.mailpit.enabled }}
254245
{{- if contains "mailpit" .Release.Name -}}
255246
{{- fail "Do not use 'mailpit' in release name or deployment will fail" -}}

charts/drupal/templates/checks.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
{{- if and .Values.mailhog.enabled .Values.mailpit.enabled }}
2-
{{- fail "Mailhog and mailpit can't be enabled at the same time as those are overlapping services. Use mailpit only as mailhog is deprecated." -}}
3-
{{- end }}
41
{{- if index (index .Values "silta-release") "branchName" }}
52
{{- if eq (index (index .Values "silta-release") "branchName") "production" }}
6-
{{- if .Values.mailhog.enabled }}
7-
{{- fail "Mailhog should not be enabled in production" -}}
8-
{{- end }}
93
{{- if .Values.mailpit.enabled }}
104
{{- fail "Mailpit should not be enabled in production" -}}
115
{{- end }}

charts/drupal/templates/drupal-configmap.yaml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -395,40 +395,6 @@ data:
395395
}
396396
{{- end }}
397397
398-
{{- if .Values.mailhog.enabled }}
399-
location /mailhog {
400-
401-
# Auth / whitelist always enabled
402-
satisfy any;
403-
allow 127.0.0.1;
404-
{{- range .Values.nginx.noauthips }}
405-
allow {{ . }};
406-
{{- end }}
407-
deny all;
408-
409-
{{- if gt (len .Values.nginx.noauthips) 1 -}}
410-
# Basic auth only offered when at least one extra ip is whitelisted. Prevents using default credentials.
411-
auth_basic "Restricted";
412-
auth_basic_user_file /etc/nginx/.htaccess;
413-
{{- end}}
414-
415-
rewrite ^/mailhog$ /mailhog/ permanent;
416-
417-
# Proxy to mailhog container
418-
rewrite /mailhog(.*) $1 break;
419-
proxy_pass http://{{ .Release.Name }}-mailhog:8025/;
420-
421-
# Websock connection
422-
chunked_transfer_encoding on;
423-
proxy_set_header X-NginX-Proxy true;
424-
proxy_set_header Upgrade $http_upgrade;
425-
proxy_set_header Connection "upgrade";
426-
proxy_http_version 1.1;
427-
proxy_redirect off;
428-
proxy_buffering off;
429-
}
430-
{{- end}}
431-
432398
{{- if .Values.mailpit.enabled }}
433399
# Redirect the legacy mailhog service to mailpit.
434400
location /mailhog {

charts/drupal/templates/smtp-secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if or .Values.mailpit.enabled .Values.mailhog.enabled .Values.smtp.enabled }}
1+
{{- if or .Values.mailpit.enabled .Values.smtp.enabled }}
22
apiVersion: v1
33
kind: Secret
44
metadata:

charts/drupal/templates/varnish-configmap-vcl.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,6 @@ data:
397397
}
398398
{{- end }}
399399
400-
{{- if .Values.mailhog.enabled }}
401-
// No varnish for mailhog
402-
if (req.url ~ "^/mailhog$") {
403-
return (pass);
404-
}
405-
{{- end }}
406-
407400
{{- if .Values.mailpit.enabled }}
408401
// No varnish for mailpit
409402
if (req.url ~ "^/mailpit(/|$)") {

0 commit comments

Comments
 (0)