From 1254562583af4609a253b0113c5dcc28f4943fec Mon Sep 17 00:00:00 2001 From: Kalvis Kazoks Date: Mon, 19 May 2025 14:06:07 +0300 Subject: [PATCH 1/4] SLT-1193: Drupal chart: Remove mailhog dependency --- charts/drupal/Chart.lock | 7 ++----- charts/drupal/Chart.yaml | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/charts/drupal/Chart.lock b/charts/drupal/Chart.lock index f79ce52e..a0546a6d 100644 --- a/charts/drupal/Chart.lock +++ b/charts/drupal/Chart.lock @@ -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 @@ -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" diff --git a/charts/drupal/Chart.yaml b/charts/drupal/Chart.yaml index f097eda5..dda03c6b 100644 --- a/charts/drupal/Chart.yaml +++ b/charts/drupal/Chart.yaml @@ -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/ From e29cfd7406457e2ed5690db4c9bdc74771c3d4e6 Mon Sep 17 00:00:00 2001 From: Kalvis Kazoks Date: Mon, 19 May 2025 14:07:46 +0300 Subject: [PATCH 2/4] SLT-1193: Drupal chart: Remove mailhog from values.yaml and values.schema.json --- charts/drupal/values.schema.json | 15 --------------- charts/drupal/values.yaml | 16 ---------------- 2 files changed, 31 deletions(-) diff --git a/charts/drupal/values.schema.json b/charts/drupal/values.schema.json index 16d8ff72..9acb57d9 100644 --- a/charts/drupal/values.schema.json +++ b/charts/drupal/values.schema.json @@ -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": { diff --git a/charts/drupal/values.yaml b/charts/drupal/values.yaml index 03e8c253..f1cf12e8 100644 --- a/charts/drupal/values.yaml +++ b/charts/drupal/values.yaml @@ -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: From 80001c59f92465c007884a2ceaa9823d8ada1743 Mon Sep 17 00:00:00 2001 From: Kalvis Kazoks Date: Mon, 19 May 2025 14:16:30 +0300 Subject: [PATCH 3/4] SLT-1193: Drupal chart: Clean up mailhog configuration from chart templates. --- charts/drupal/templates/NOTES.txt | 10 ------ charts/drupal/templates/_helpers.tpl | 11 +----- charts/drupal/templates/checks.yaml | 6 ---- charts/drupal/templates/drupal-configmap.yaml | 34 ------------------- charts/drupal/templates/smtp-secret.yaml | 2 +- .../templates/varnish-configmap-vcl.yaml | 7 ---- 6 files changed, 2 insertions(+), 68 deletions(-) diff --git a/charts/drupal/templates/NOTES.txt b/charts/drupal/templates/NOTES.txt index f694f1fc..e858fed9 100644 --- a/charts/drupal/templates/NOTES.txt +++ b/charts/drupal/templates/NOTES.txt @@ -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: diff --git a/charts/drupal/templates/_helpers.tpl b/charts/drupal/templates/_helpers.tpl index 46bc14ac..6c2018ec 100644 --- a/charts/drupal/templates/_helpers.tpl +++ b/charts/drupal/templates/_helpers.tpl @@ -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 }} @@ -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 }} @@ -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" -}} diff --git a/charts/drupal/templates/checks.yaml b/charts/drupal/templates/checks.yaml index f056dcba..7f70ed29 100644 --- a/charts/drupal/templates/checks.yaml +++ b/charts/drupal/templates/checks.yaml @@ -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 }} diff --git a/charts/drupal/templates/drupal-configmap.yaml b/charts/drupal/templates/drupal-configmap.yaml index fe722423..29d65645 100644 --- a/charts/drupal/templates/drupal-configmap.yaml +++ b/charts/drupal/templates/drupal-configmap.yaml @@ -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 { diff --git a/charts/drupal/templates/smtp-secret.yaml b/charts/drupal/templates/smtp-secret.yaml index d76dbd88..6a4b3f03 100644 --- a/charts/drupal/templates/smtp-secret.yaml +++ b/charts/drupal/templates/smtp-secret.yaml @@ -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: diff --git a/charts/drupal/templates/varnish-configmap-vcl.yaml b/charts/drupal/templates/varnish-configmap-vcl.yaml index bfdedd08..be2fd4b4 100644 --- a/charts/drupal/templates/varnish-configmap-vcl.yaml +++ b/charts/drupal/templates/varnish-configmap-vcl.yaml @@ -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(/|$)") { From 41136ae25b8ab331f94c2efcdbbd2d57a9f0ffdd Mon Sep 17 00:00:00 2001 From: Kalvis Kazoks Date: Mon, 19 May 2025 15:14:55 +0300 Subject: [PATCH 4/4] SLT-1193: Drupal chart: Remove codecentric helm repo reference from CCI config. --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ab1e3fa..d040d01d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: