---
id: w4/m7/t002
title: "Mailpit in the local overlay (Argo app, mail catcher; control-plane pin + PSA per local quirks)"
worker: worker4
status: done
estimate: 30m
depends_on: [w4/m7/t001]
---

## Objective

Deploy Mailpit (SMTP catcher with an HTTP API) on the mock cluster as a **local-overlay-only** Argo Application so recovery/verification mail is observable and scriptable locally. It must not appear in prod.

## Context

- **Precondition (2026-07-11):** recreate the mock cluster first — CAPD rots across host restarts and post-rebuild kubeconfigs are stale. Note also that post-m19 the base values pin the auth substrate (kratos/hydra, CNPG auth DBs) to `bex.co/pool=platform`, a label no mock node carries — Mailpit itself is unaffected (local-overlay-only, control-plane pin), but t003/t004 are blocked on the `w1` inbox note on mock pool-labels.
- Local-CAPD quirks (memory: local-capd-cluster-quirks): control-plane nodeSelector + toleration; PSA label if it needs privileged; no persistent storage needed (ephemeral is fine for a catcher).
- Overlay layout: `deploy/gitops/overlays/local/` — follow how other local-only resources are layered over `base/`.
- Mailpit exposes SMTP :1025 and HTTP API/UI :8025; cluster-internal only, reached via port-forward in scripts.

## Steps

1. Add the Mailpit Application/manifests under the local overlay (pinned image, node pin).
2. Apply on the mock cluster and record the mechanism — the recreated local mock runs no in-cluster Argo (2026-07-05 recreation), so either `kubectl apply` the rendered local overlay or stand Argo up from the local bootstrap first; pod Running.
3. Smoke: `swaks`/`curl`-style test message lands and is readable via the HTTP API through a port-forward.

## Files

- `deploy/gitops/overlays/local/` (new Mailpit manifests/Application)

## Acceptance criteria

- [ ] Mailpit Running on the mock cluster; a test SMTP message is retrievable via its HTTP API.
- [ ] Nothing Mailpit-related renders in the prod/base output.

## Out of scope

- Pointing Kratos at it (t003).
