Skip to content

Conversation

@k4lv15
Copy link
Contributor

@k4lv15 k4lv15 commented Apr 2, 2025

Motivation:
Mailhog is an email service we’re using in our development environments (local & Silta non-production) to test out if email functionalities are working properly. Mailhog mailhog/MailHog#442 (comment) and is causing issues for developers. Therefore, we need to replace it with some alternative. Our current pick is Mailpit.

Changes proposed:

  • Add mailpit dependency, enable it, add default value overrides
  • Update chart templates with needed changes for mailpit to work
  • Keep mailhog in chart but add deprecation notices

How to test:

  1. Install the updated chart and see that mailpit works (helm install frontend-release charts/frontend --set mailpit.enabled=true or test here: https://app.circleci.com/pipelines/github/wunderio/frontend-project-k8s/1544/workflows/1c038599-e79c-4987-8fd3-b3b47340c4c3). Test the following:
  • validation goes through
  • mailpit URL is listed in the release notes and it works
  • the legacy /mailhog path redirects to /mailpit
  • try sending an email from front-end, i.e., ssh into either hello or world pods run printf "EHLO localhost\r\nMAIL FROM:<test@example.com>\r\nRCPT TO:<recipient@example.com>\r\nDATA\r\nSubject: Test Email\r\n\r\nThis is a test email.\r\n.\r\nQUIT\r\n" | nc $MAILPIT_ADDRESS 25, see that the command is successful and there is a new e-mail in mailpit.
  • Test that mailpit's UI works, i.e, you can mark emails as read, delete them, download etc.
  1. See that updated installation checks work, i.e., try to install chart with both mailpit and mailhog enabled (i.e., run helm install frontend-release charts/frontend --set mailpit.enabled=true --set mailhog.enabled=true --dry-run), see that the installation fails.

@k4lv15 k4lv15 marked this pull request as ready for review April 2, 2025 13:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for Mailpit while deprecating Mailhog as the email testing service in non-production environments. Key changes include:

  • Adding Mailpit configuration and dependency in silta.yml and Chart.yaml.
  • Updating charts/frontend values and template files to redirect legacy Mailhog paths to Mailpit.
  • Updating tests and CI configuration to accommodate the Mailpit integration.

Reviewed Changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
silta/silta.yml Added Mailpit service enabled flag.
charts/frontend/values.yaml Added Mailpit configuration including environment variables and resources; nested key naming may be confusing.
charts/frontend/test.values.yaml Updated test values changing Mailhog to Mailpit.
charts/frontend/templates/varnish-configmap-vcl.yaml Introduced conditional block to bypass varnish for Mailpit paths.
charts/frontend/templates/configmap.yaml Redirect legacy /mailhog to /mailpit with proxy configuration.
charts/frontend/templates/checks.yaml Added failure checks for scenarios where both Mailpit and Mailhog or Mailpit in production are enabled.
charts/frontend/Chart.yaml Added Mailpit dependency with corresponding configuration condition.
.circleci/config.yml Updated CI to include the Mailpit helm repository.
Files not reviewed (3)
  • charts/frontend/templates/NOTES.txt: Language not supported
  • charts/frontend/templates/_helpers.tpl: Language not supported
  • charts/frontend/values.schema.json: Language not supported
Comments suppressed due to low confidence (1)

charts/frontend/values.yaml:595

  • [nitpick] The nested 'mailpit' block within the Mailpit configuration may be confusing. Consider renaming it to something more descriptive, like 'web' or 'proxy', to clarify its purpose.
mailpit:

@Rade333 Rade333 changed the base branch from master to release/2025-05-05 May 5, 2025 08:21
@Rade333 Rade333 merged commit 6fdbb06 into release/2025-05-05 May 5, 2025
4 checks passed
@Rade333 Rade333 deleted the feature/SLT-1103-mail branch May 5, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants