Skip to content

Fix chart for maildev 2.x and repair chart publishing - #9

Merged
djfarrelly merged 3 commits into
mainfrom
fix/publish-chart-maildev-2x
Jul 7, 2026
Merged

Fix chart for maildev 2.x and repair chart publishing#9
djfarrelly merged 3 commits into
mainfrom
fix/publish-chart-maildev-2x

Conversation

@djfarrelly

Copy link
Copy Markdown
Member

Fixes #5 and #6.

Problem

The published Helm chart is broken on two independent axes:

  1. Stale/dead download URLs (Not working: all pointing at private urls #5). https://maildev.github.io/helm/index.yaml points every chart's urls: at https://github.com/splitt3r/helm/releases/download/.... That repo is now 404, so helm install cannot fetch the .tgz. The index was originally generated from a personal fork back in 2021.
  2. Chart targets the maildev 1.x interface (Actual Helm not working #6). The chart hardcoded flags and set MAILDEV_DISABLE_WEB, which no longer works as an env var in maildev 2.x — installs came out misconfigured. The only working path today is a local helm install ./charts/maildev.

Root cause of #1 is that the release workflows use deprecated actions that no longer run on current GitHub runners (and modern GITHUB_TOKEN is read-only by default), so no working release under maildev/helm was ever published.

Chart changes

Adapted from community PR #7 (by @pando85 / @thibveni), reconciled with the fixes already on main:

  • Bump appVersion 1.1.0 → 2.2.1 (latest stable), chart version 0.1.3 → 0.2.0.
  • Rename outgoing_relayoutgoingRelay; image tag now follows appVersion.
  • Replace hardcoded args with conditional flags: --verbose, --auto-relay, --outgoing-secure, --disable-web.
  • Drop the broken MAILDEV_DISABLE_WEB env var (use --disable-web).
  • Only emit outgoing-relay env vars when set; gate HTTPS key/cert on https.enabled.
  • Add an outgoingRelay.autoRelay toggle; render relay rules from values and gate the ConfigMap/volume/mount on it; roll pods on rule change via a checksum/ annotation.
  • Kept the fullname-templated relay ConfigMap name (PR Fork branch #7 regressed this to a hardcoded name that breaks on non-maildev release names).
  • Stopped shipping the smtp.gmail.com / XXX / admin sample defaults.

Workflow changes

  • release.yaml: checkout@v4 (fetch-depth: 0), setup-helm@v4, chart-releaser-action@v1.6.0, and permissions: contents: write so the default token can create releases.
  • lint-test.yaml: modern chart-testing-action@v2 invocation (ct lint / ct install), checkout@v4, kind-action@v1.10.0.

Verification

  • helm lint charts/maildev → 0 failures.
  • helm template with defaults: image maildev/maildev:2.2.1, no ConfigMap, no relay env, empty args.
  • helm template --set outgoingRelay.autoRelay.enabled=true (+ relay creds): ConfigMap renders [{"allow":"*"}], all conditional args/env/volume wired correctly.

Note

Merging this to main triggers chart-releaser-action, which publishes a fresh release under maildev/helm and rewrites gh-pages index.yaml with working URLs — that is what actually closes #5. The stale splitt3r-pointing entries in the existing index.yaml can be pruned separately.

🤖 Generated with Claude Code

djfarrelly and others added 3 commits July 6, 2026 17:28
Fixes #5 and #6. The published chart was broken on two axes:

1. The chart still targeted the maildev 1.x interface (hardcoded flags,
   MAILDEV_DISABLE_WEB env var that no longer works in 2.x), so installs
   were misconfigured.
2. The release workflows used deprecated actions that no longer run on
   current GitHub runners, so no working chart release was ever published
   (gh-pages index.yaml still points at the dead splitt3r/helm assets).

Chart changes (adapted from community PR #7 by @pando85 / @thibveni):
- Bump appVersion 1.1.0 -> 2.2.1, chart version 0.1.3 -> 0.2.0
- Rename outgoing_relay -> outgoingRelay; image tag now follows appVersion
- Replace hardcoded args with conditional flags (--verbose, --auto-relay,
  --outgoing-secure, --disable-web)
- Drop the broken MAILDEV_DISABLE_WEB env var (use --disable-web)
- Only emit outgoing-relay env vars when values are set; gate HTTPS
  key/cert on https.enabled
- Add outgoingRelay.autoRelay toggle; render relay rules from values and
  gate the ConfigMap/volume on it; roll pods via checksum annotation
- Keep the fullname-templated relay ConfigMap name (do not regress to the
  hardcoded name from PR #7)

Workflow changes:
- release.yaml: checkout@v4 (fetch-depth 0), setup-helm@v4,
  chart-releaser-action@v1.6.0, add contents:write permission so the
  default GITHUB_TOKEN can create releases
- lint-test.yaml: modern chart-testing-action@v2 invocation (ct lint /
  ct install), checkout@v4, kind-action@v1.10.0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maildev parses env vars as `process.env[VAR] || default`, so the string
"false" is truthy and enables HTTPS. With HTTPS on but no cert, web.js
(lib/web.js:80) logs an error and returns before starting the web
server, so /healthz is refused, the liveness probe kills the pod, and
maildev crashes on shutdown (io.close on an uninitialized io) — the
chart-testing install failure on CI.

Emit MAILDEV_HTTPS (as "true") only when https.enabled is set, alongside
the key/cert, so the default HTTP path works. Verified against
maildev/maildev:2.2.1: with the var omitted /healthz returns 200; with
MAILDEV_HTTPS=false the web server never starts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adopt the flexibility idea from #8 (thanks @LordGaav) without giving up
the structured, documented values. extraArgs are appended after the
chart-generated flags and extraEnv is passed through verbatim, so users
can set any maildev option the chart does not model — including env from
Secrets via valueFrom, which a plain env map cannot express.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@djfarrelly djfarrelly mentioned this pull request Jul 6, 2026
@djfarrelly
djfarrelly merged commit bfb4b7a into main Jul 7, 2026
1 check passed
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.

Not working: all pointing at private urls

1 participant