feat(stalwart): deploy stalwart-postgres StatefulSet + backup (DEV-469) #3
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/DEV-469-stalwart-postgres"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 2 of DEV-467 — DEV-469.
Purely additive; does not touch
stalwart-0, its ConfigMap, PVC, or bootstrap.Files
apps/stalwart/stalwart-postgres.yaml— single-replica StatefulSet (postgres:16-alpine), ClusterIP Service, 10Gi hcloud-volumes-encrypted PVC (subPath pgdata), nodeAffinitycsi.hetzner.cloud/location=fsn1. Resources matchforgejo-postgres.apps/stalwart/stalwart-postgres-credentials-sealed.yaml— sealed secret withPOSTGRES_USER=stalwart,POSTGRES_DB=stalwart,POSTGRES_PASSWORD=<generated>, plus a copy understalwart-db-passwordfor the future[store.postgres]Stalwart config.apps/stalwart/stalwart-postgres-backup.yaml— daily 02:30 UTC CronJob:pg_dump | gzip | restic backup --stdininto the existingstalwart-s3-backuprestic repo, tagstalwart-postgres, independent retention (14d/8w/6m).activeDeadlineSeconds: 1800mirrors the DEV-464 fix.Verification (post-merge)
kubectl -n stalwart get pods -l app=stalwart-postgresshows Ready 1/1.psql -h stalwart-postgres.stalwart.svc -U stalwart -d stalwart -c \lfrom a debug pod succeeds.restic snapshots --tag stalwart-postgresshows the snapshot.stalwart-0pod age unchanged.Out of scope
stalwart-config,stalwart-bootstrap-config, or the Stalwart StatefulSet.[store.postgres]config lands in Phase 4 (cutover).