fix(forte-drop-pg-backup): set MC_CONFIG_DIR so backups can upload #23

Open
jorgen.stensrud wants to merge 2 commits from fix/pg-backup-mc-config into main
Member

The nightly Postgres backup CronJob has been failing every run — no backups exist in s3://drops/_pgbackups/.

Cause: the upload container runs as uid 65532 (runAsNonRoot). mc defaults its config to $HOME/.mc = /.mc and dies with mkdir /.mc: permission denied on the non-writable root fs — before any upload.

Fix: set MC_CONFIG_DIR=/work/.mc (the shared emptyDir, writable via fsGroup: 65532). The pg_dump initContainer already succeeds; this lets the upload step actually run.

Validated: kubectl kustomize renders clean; env present on the upload container.

🤖 Generated with Claude Code

The nightly Postgres backup CronJob has been **failing every run** — no backups exist in `s3://drops/_pgbackups/`. **Cause:** the upload container runs as uid 65532 (`runAsNonRoot`). `mc` defaults its config to `$HOME/.mc` = `/.mc` and dies with `mkdir /.mc: permission denied` on the non-writable root fs — before any upload. **Fix:** set `MC_CONFIG_DIR=/work/.mc` (the shared emptyDir, writable via `fsGroup: 65532`). The `pg_dump` initContainer already succeeds; this lets the upload step actually run. Validated: `kubectl kustomize` renders clean; env present on the upload container. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jorgen.stensrud added 1 commit 2026-06-11 11:18:21 +00:00
The backup CronJob runs as uid 65532 (runAsNonRoot). mc defaulted its
config dir to $HOME/.mc = /.mc and failed with "mkdir /.mc: permission
denied" on the non-writable root fs — every nightly run died before
uploading, so there are currently no backups in s3://drops/_pgbackups/.
Point MC_CONFIG_DIR at the shared /work emptyDir (writable via fsGroup).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jorgen.stensrud marked the pull request as work in progress 2026-06-11 11:18:42 +00:00
jorgen.stensrud marked the pull request as ready for review 2026-06-12 10:27:25 +00:00
jorgen.stensrud requested review from danijel.simeunovic 2026-06-12 10:27:30 +00:00
danijel.simeunovic added 1 commit 2026-07-02 12:43:05 +00:00
Merge branch 'main' into fix/pg-backup-mc-config
AI Code Review / ai-review (pull_request) Has been skipped
/ test (pull_request) Successful in 9s
ff2b8fc0f5
danijel.simeunovic approved these changes 2026-07-02 12:43:18 +00:00
Some checks are pending
AI Code Review / ai-review (pull_request) Has been skipped
/ test (pull_request) Successful in 9s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/pg-backup-mc-config:fix/pg-backup-mc-config
git checkout fix/pg-backup-mc-config
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Forte/launchpad#23