Skip to content

Persist /etc/frepple in the Kubernetes manifest so runtime config survives pod restarts#749

Open
pimzand wants to merge 1 commit into
frePPLe:masterfrom
macroscoop:fix/persist-etc-frepple-k8s
Open

Persist /etc/frepple in the Kubernetes manifest so runtime config survives pod restarts#749
pimzand wants to merge 1 commit into
frePPLe:masterfrom
macroscoop:fix/persist-etc-frepple-k8s

Conversation

@pimzand
Copy link
Copy Markdown

@pimzand pimzand commented May 29, 2026

The Kubernetes manifest persists only the log directories, so /etc/frepple resets to the image defaults on every pod restart. That regenerates the Django secret key (invalidating sessions, and rotating SECRET_WEBTOKEN_KEY where it's left equal to SECRET_KEY) and also drops anything the app writes to djangosettings.py at runtime — installed apps, scenario count, date/display settings.

This mounts /etc/frepple on a small PVC, seeded from the image on first start by an init container (mounted at /mnt/config so the image's own copy stays visible to copy from; the copy is skipped on later starts, preserving runtime changes). It's the same persistence the docker-compose deployment already gets from its named volume. The install guide is updated, including the seed-once / reconcile-on-upgrade caveat.

Refs #747.

…vives pod restarts

The manifest persisted only the log directories, so /etc/frepple reset to the
image defaults on every pod restart — regenerating the secret key (logging users
out) and dropping anything the app writes to djangosettings.py at runtime
(installed apps, scenario count, display settings).

Mount /etc/frepple on a PVC, seeded from the image on first start by an init
container. The init container mounts the volume at /mnt/config (so the image's
own copy stays visible) and runs as root, since the freshly provisioned volume
root is root-owned and cp -a must preserve the image's ownership; the copy is
skipped on later starts, preserving runtime changes. This matches how
docker-compose already persists the directory on a named volume. Document it,
including the seed-once / reconcile-on-upgrade caveat.

Refs frePPLe#747.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pimzand pimzand force-pushed the fix/persist-etc-frepple-k8s branch from 9aad820 to 9ec09e2 Compare May 29, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant