Skip to content

SLT-1193: Drupal chart: Remove deprecated mailhog service from the chart #748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ workflows:
command: |
helm repo add elastic https://helm.elastic.co
helm repo add jouve https://jouve.github.io/charts/
helm repo add codecentric https://codecentric.github.io/helm-charts
helm repo add percona https://percona.github.io/percona-helm-charts/
helm dependency build ./charts/drupal
- run:
Expand Down
7 changes: 2 additions & 5 deletions charts/drupal/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 16.13.2
- name: mailhog
repository: https://storage.googleapis.com/charts.wdr.io
version: 5.1.0
- name: mailpit
repository: https://jouve.github.io/charts/
version: 0.24.0
Expand All @@ -23,5 +20,5 @@ dependencies:
- name: silta-release
repository: file://../silta-release
version: 1.0.1
digest: sha256:e3ea21b74deadb01861e37b2296391e1f0a25f62dc6b3da226d28cb95245342d
generated: "2025-04-08T22:42:49.491746+03:00"
digest: sha256:20370a0bbae03a6b4d1f036f343afc1cef7dccb89d2307219fd21424828a6335
generated: "2025-05-19T14:02:41.227718+03:00"
4 changes: 0 additions & 4 deletions charts/drupal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ dependencies:
version: 16.13.x
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
- name: mailhog
version: 5.1.x
repository: https://storage.googleapis.com/charts.wdr.io
condition: mailhog.enabled
- name: mailpit
version: 0.24.x
repository: https://jouve.github.io/charts/
Expand Down
10 changes: 0 additions & 10 deletions charts/drupal/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ Your site is available at:
{{- end }}
{{- end }}

{{- if .Values.mailhog.enabled }}

Mailhog available at:

http://{{- template "drupal.domain" . }}/mailhog
{{- range $index, $domain := .Values.exposeDomains }}
http://{{ $domain.hostname }}/mailhog
{{- end }}
{{- end }}

{{- if .Values.mailpit.enabled }}

Mailpit available at:
Expand Down
11 changes: 1 addition & 10 deletions charts/drupal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ imagePullSecrets:
- name: SMTP_ADDRESS
{{- if .Values.mailpit.enabled }}
value: "{{ .Release.Name }}-mailpit-smtp:25"
{{ else if .Values.mailhog.enabled }}
value: "{{ .Release.Name }}-mailhog:1025"
{{ else }}
value: {{ .Values.smtp.address | quote }}
{{- end }}
Expand All @@ -118,8 +116,6 @@ imagePullSecrets:
- name: SSMTP_MAILHUB
{{- if .Values.mailpit.enabled }}
value: "{{ .Release.Name }}-mailpit-smtp:25"
{{ else if .Values.mailhog.enabled }}
value: "{{ .Release.Name }}-mailhog:1025"
{{ else }}
value: {{ .Values.smtp.address | quote }}
{{- end }}
Expand Down Expand Up @@ -244,12 +240,7 @@ imagePullSecrets:
- name: ELASTICSEARCH_HOST
value: {{ .Release.Name }}-es
{{- end }}
{{- if or .Values.mailhog.enabled .Values.mailpit.enabled .Values.smtp.enabled }}
{{- if .Values.mailhog.enabled }}
{{- if contains "mailhog" .Release.Name -}}
{{- fail "Do not use 'mailhog' in release name or deployment will fail" -}}
{{- end }}
{{- end }}
{{- if or .Values.mailpit.enabled .Values.smtp.enabled }}
{{- if .Values.mailpit.enabled }}
{{- if contains "mailpit" .Release.Name -}}
{{- fail "Do not use 'mailpit' in release name or deployment will fail" -}}
Expand Down
6 changes: 0 additions & 6 deletions charts/drupal/templates/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{{- if and .Values.mailhog.enabled .Values.mailpit.enabled }}
{{- fail "Mailhog and mailpit can't be enabled at the same time as those are overlapping services. Use mailpit only as mailhog is deprecated." -}}
{{- end }}
{{- if index (index .Values "silta-release") "branchName" }}
{{- if eq (index (index .Values "silta-release") "branchName") "production" }}
{{- if .Values.mailhog.enabled }}
{{- fail "Mailhog should not be enabled in production" -}}
{{- end }}
{{- if .Values.mailpit.enabled }}
{{- fail "Mailpit should not be enabled in production" -}}
{{- end }}
Expand Down
34 changes: 0 additions & 34 deletions charts/drupal/templates/drupal-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,40 +395,6 @@ data:
}
{{- end }}

{{- if .Values.mailhog.enabled }}
location /mailhog {

# Auth / whitelist always enabled
satisfy any;
allow 127.0.0.1;
{{- range .Values.nginx.noauthips }}
allow {{ . }};
{{- end }}
deny all;

{{- if gt (len .Values.nginx.noauthips) 1 -}}
# Basic auth only offered when at least one extra ip is whitelisted. Prevents using default credentials.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htaccess;
{{- end}}

rewrite ^/mailhog$ /mailhog/ permanent;

# Proxy to mailhog container
rewrite /mailhog(.*) $1 break;
proxy_pass http://{{ .Release.Name }}-mailhog:8025/;

# Websock connection
chunked_transfer_encoding on;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_redirect off;
proxy_buffering off;
}
{{- end}}

{{- if .Values.mailpit.enabled }}
# Redirect the legacy mailhog service to mailpit.
location /mailhog {
Expand Down
2 changes: 1 addition & 1 deletion charts/drupal/templates/smtp-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.mailpit.enabled .Values.mailhog.enabled .Values.smtp.enabled }}
{{- if or .Values.mailpit.enabled .Values.smtp.enabled }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
7 changes: 0 additions & 7 deletions charts/drupal/templates/varnish-configmap-vcl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,6 @@ data:
}
{{- end }}

{{- if .Values.mailhog.enabled }}
// No varnish for mailhog
if (req.url ~ "^/mailhog$") {
return (pass);
}
{{- end }}

{{- if .Values.mailpit.enabled }}
// No varnish for mailpit
if (req.url ~ "^/mailpit(/|$)") {
Expand Down
15 changes: 0 additions & 15 deletions charts/drupal/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -634,21 +634,6 @@
"enabled": { "type": "boolean" }
}
},
"mailhog": {
"type": "object",
"properties": {
"enabled": { "type": "boolean" },
"image": {
"type": "object",
"additionalProperties": false,
"properties": {
"repository": { "type": "string" },
"tag": { "type": "string" },
"pullPolicy": { "type": "string" }
}
}
}
},
"smtp": {
"type": "object",
"properties": {
Expand Down
16 changes: 0 additions & 16 deletions charts/drupal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -769,22 +769,6 @@ mailpit:
webroot: /mailpit
enableServiceLinks: false

# Important! This service is deprecated and will be removed from future releases. Please use "mailpit" instead.
# Mailhog service overrides
# see: https://github.com/codecentric/helm-charts/blob/master/charts/mailhog/values.yaml
mailhog:
enabled: false
enableServiceLinks: false
image:
# Set image repository to "mailhog/mailhog" to reenable logging.
repository: wunderio/silta-mailhog
# Set image tag to "" to reenable logging.
tag: v1
resources:
requests:
cpu: 1m
memory: 10M

# Email via SMTP. Configuration is passed to containers as environment variables (SMTP_ADDRESS, SMTP_PORT, ..)
# see: https://github.com/wunderio/silta/blob/master/docs/silta-examples.md#sending-e-mail
smtp:
Expand Down