Commit graph

5 commits

Author SHA1 Message Date
paperclip
8cd2829cd8 feat(stalwart): switch config/data store from RocksDB to PostgreSQL (DEV-476)
Following the DEV-473 rocksdb-to-postgres migration, point Stalwart's bootstrap
config at the PostgreSQL store and expose PGPASSWORD to the container so the
`authSecret: EnvironmentVariable` lookup resolves.

- stalwart-bootstrap-config.yaml: config.json switches @type RocksDb -> PostgreSql
  (host=stalwart-postgres, db=stalwart, authUsername=stalwart,
  authSecret=EnvironmentVariable/PGPASSWORD, useTls=false).
- stalwart-fresh-deployment.yaml: adds PGPASSWORD env from
  secret/stalwart-postgres-credentials.POSTGRES_PASSWORD on the stalwart container.
- stalwart-config.yaml: mirrors the switch in stalwart.toml as documentation
  (the running pod uses `--config /etc/stalwart/config.json`, not the toml).

Board (DEV-476) explicitly asked for the manifest-level switch after the web UI
save failed with a `Permission denied` on the read-only bootstrap emptyDir.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-15 14:46:29 +00:00
1e77e48e94 apps/stalwart/stalwart-config.yaml aktualisiert
Additional allowed IP settings for the smtp and imap listeners
2026-08-01 10:45:38 +00:00
CTO Agent
6640739af6 Complete Stalwart ConfigMap mount hardening: add stalwart.toml copy
Extends commit 291feb9 by adding stalwart-config (stalwart.toml) to the
copy-config initContainer. The previous fix only handled bootstrap-config
but missed stalwart-config, which was the root cause of CrashLoopBackOff
identified in DEV-426 stability testing.

Root cause: commit 693fcd3 introduced stalwart-config ConfigMap with
subPath mount. During pod restarts, Kubernetes subPath ConfigMap mounting
race leaves stalwart.toml empty/unparseable, causing:
  "Failed to parse data store settings at /etc/stalwart/stalwart.toml:
   expected value at line 1 column 1"

This completes the hardening by ensuring BOTH config files (config.json
and stalwart.toml) are atomically copied before Stalwart starts.

Fixes: DEV-433, DEV-431
Ref: stack.basicstack.de/apps/stalwart/STABILITY-VERIFICATION-2026-08-01.md

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-01 09:52:26 +00:00
CTO Agent
a1b723ac62 Revert "Fix Stalwart HTTP listener access for Traefik ingress"
This reverts commit c060c83. The TOML configuration approach caused
Stalwart to fail to start due to configuration parsing errors.

Will implement a different approach that doesn't require a full
configuration file rewrite.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-01 08:51:59 +00:00
CTO Agent
c060c83347 Fix Stalwart HTTP listener access for Traefik ingress
Stalwart was blocking the HTTP port (8080) from Traefik's internal IP
(10.244.2.227), causing 502 errors when accessing mail.basicstack.de.

Changes:
- Added complete Stalwart TOML configuration (stalwart-config.yaml)
- Configured HTTP listener security to allow internal pod network (10.244.0.0/16)
- Updated StatefulSet to use the new configuration file
- This allows Traefik ingress to reach the Stalwart web UI backend

The fix is non-destructive:
- PVC data is preserved
- Rolling update will restart the pod with new config
- Only security setting is changed (adding allowed IPs)

Fixes: DEV-422

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-01 08:48:32 +00:00