Certificates for the mail ports: TLS Secrets, cert-manager, ACME routes (K-C8) #26

Merged
jcoffey-dev merged 1 commits from feat/certificates into main 2026-11-19 18:38:25 +00:00
Owner

Closes #8.

Two ways to get certificates for SMTP, submissions, IMAPS, POP3S and ManageSieve. HTTPS from outside stays with the Gateway or Ingress.

  • The server's own ACME (the default; set up in the seed or the console). DNS-01 needs nothing from the chart. For HTTP-01, server.certificates.acmeHosts gets one more route, the -acme HTTPRoute or extra Ingress rules: those names' /.well-known/acme-challenge/ go to the server, which answers on any pod. The chart refuses a host that's the webmail's or the console's, and refuses acmeHosts with no routes turned on. The server's own publicUrl host is skipped, because its route already covers it.
  • TLS Secrets. secrets lists existing ones, and certManager (an issuer plus the mail names) has the chart make a cert-manager Certificate, kept in <release>-mail-tls. Each is mounted whole (never by subPath, so a renewal reaches the pod) at /etc/inbuxa/tls/<name>, and named in INBUXA_TLS_CERTIFICATE_DIRS (inbuxa/inbuxa-server#477). Pods reread a renewal in about two minutes, with no restart.

Needs server 27.1-rc.33: an older server ignores the variable and serves no certificate from the Secret. Everything is off by default.

Tested:

  • Lab (cert-test.sh, inbuxa/inbuxa-k8s-lab): a TLS Secret replaced in place reaches every connection in 115 s, with no pod restarted.
  • Unit tests only, not on kind: the cert-manager Certificate and the ACME routes. The lab has neither cert-manager nor a Gateway, and adding cert-manager means pulling its images.
  • 77 chart tests pass, and check.sh passes (kubeconform validates the cert-manager Certificate against its CRD schema).
Closes #8. Two ways to get certificates for SMTP, submissions, IMAPS, POP3S and ManageSieve. HTTPS from outside stays with the Gateway or Ingress. - **The server's own ACME** (the default; set up in the seed or the console). DNS-01 needs nothing from the chart. For HTTP-01, `server.certificates.acmeHosts` gets one more route, the `-acme` HTTPRoute or extra Ingress rules: those names' `/.well-known/acme-challenge/` go to the server, which answers on any pod. The chart refuses a host that's the webmail's or the console's, and refuses `acmeHosts` with no routes turned on. The server's own `publicUrl` host is skipped, because its route already covers it. - **TLS Secrets.** `secrets` lists existing ones, and `certManager` (an issuer plus the mail names) has the chart make a cert-manager `Certificate`, kept in `<release>-mail-tls`. Each is mounted whole (never by `subPath`, so a renewal reaches the pod) at `/etc/inbuxa/tls/<name>`, and named in `INBUXA_TLS_CERTIFICATE_DIRS` (inbuxa/inbuxa-server#477). Pods reread a renewal in about two minutes, with no restart. **Needs server 27.1-rc.33:** an older server ignores the variable and serves no certificate from the Secret. Everything is off by default. Tested: - **Lab** (`cert-test.sh`, inbuxa/inbuxa-k8s-lab): a TLS Secret replaced in place reaches every connection in 115 s, with no pod restarted. - **Unit tests only, not on kind:** the cert-manager Certificate and the ACME routes. The lab has neither cert-manager nor a Gateway, and adding cert-manager means pulling its images. - 77 chart tests pass, and `check.sh` passes (kubeconform validates the cert-manager Certificate against its CRD schema).
jcoffey-dev added 1 commit 2026-11-19 18:37:52 +00:00
server.certificates.secrets mounts TLS Secrets in every server pod, whole
directories so a renewal reaches the pod, and names them in
INBUXA_TLS_CERTIFICATE_DIRS. certManager has the chart make a cert-manager
Certificate for the mail names and mount its Secret. acmeHosts routes the
server's own ACME HTTP-01 challenges for those names to it, through the
Gateway or the Ingress. Needs server 27.1-rc.33.
jcoffey-dev force-pushed feat/certificates from 9b35213a03 to ee70b036cd 2026-11-19 18:37:52 +00:00 Compare
jcoffey-dev merged commit eb565c1e3f into main 2026-11-19 18:38:25 +00:00
jcoffey-dev deleted branch feat/certificates 2026-11-19 18:38:25 +00:00
Sign in to join this conversation.