Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/supabase/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.7.2
version: 0.7.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
16 changes: 9 additions & 7 deletions charts/supabase/templates/db/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ spec:
command: ["/bin/sh", "-c"]
args:
- |
echo "Initializing pgsodium persistent config directory..."
if [ -z "$(ls -A /mnt/pgsodium 2>/dev/null)" ]; then
echo "pgsodium volume is empty, copying default postgresql-custom files..."
cp -a /etc/postgresql-custom/. /mnt/pgsodium/
else
echo "pgsodium volume already initialized, skipping copy"
fi
echo "Ensuring default postgresql-custom files exist..."
# Idempotent, no-clobber copy: seeds any missing config files without
# overwriting existing ones (preserves runtime-generated pgsodium keys).
# An emptiness check ([ -z "$(ls -A)" ]) is unreliable here: block-storage
# volumes (EBS, GCE PD, Ceph RBD, OpenEBS LVM, ...) are formatted ext4/xfs
# and ship a lost+found directory, so the volume is never truly empty on
# first use, the copy was skipped, and postgres could not open its
# included /etc/postgresql-custom/*.conf files (CrashLoopBackOff).
cp -an /etc/postgresql-custom/. /mnt/pgsodium/ 2>/dev/null || true
volumeMounts:
- mountPath: /mnt/pgsodium
name: pgsodium
Expand Down
Loading