Persist /etc/frepple in the Kubernetes manifest so runtime config survives pod restarts#749
Open
pimzand wants to merge 1 commit into
Open
Persist /etc/frepple in the Kubernetes manifest so runtime config survives pod restarts#749pimzand wants to merge 1 commit into
pimzand wants to merge 1 commit into
Conversation
…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>
9aad820 to
9ec09e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Kubernetes manifest persists only the log directories, so
/etc/freppleresets to the image defaults on every pod restart. That regenerates the Django secret key (invalidating sessions, and rotatingSECRET_WEBTOKEN_KEYwhere it's left equal toSECRET_KEY) and also drops anything the app writes todjangosettings.pyat runtime — installed apps, scenario count, date/display settings.This mounts
/etc/freppleon a small PVC, seeded from the image on first start by an init container (mounted at/mnt/configso 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.