fix: mount Keycloak PostgreSQL data at official postgres path - #296
Conversation
The volume was mounted at /var/lib/pgsql/data (RHEL/SCL) while PGDATA and library/postgres use /var/lib/postgresql/data/pgdata, so the PVC was never used and Keycloak DB data was not persisted. Align mountPath with the Helm chart and PGDATA. Fixes microcks#295 Signed-off-by: Eric Nichols <linuxfreakus@gmail.com>
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
lbroudoux
left a comment
There was a problem hiding this comment.
Thanks a lot for the catch and for pushing the fix!
|
You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
Summary
Fixes a data-loss bug where the Keycloak PostgreSQL volume was mounted at the wrong path and never used by the official
library/postgresimage.library/postgresPGDATA/var/lib/postgresql/data/pgdatavolumeMounts.mountPath/var/lib/pgsql/data(RHEL/SCL)/var/lib/postgresql/dataWith the old mount path, Postgres wrote under
PGDATAon the container filesystem. The PVC/emptyDir at/var/lib/pgsql/datastayed empty, sokeycloak.persistent: truedid not persist Keycloak DB data across pod restarts.This matches the already-correct Helm chart layout in
microcks/microcks(mountPath: /var/lib/postgresql/data+subPath: pgdata+ samePGDATA).Related
PGDATA+subPathfor OpenShift permissions but left the RHELmountPathin placeTest plan
MicrocksCR withkeycloak.install: trueandkeycloak.persistent: truekubectl exec … -- df -h /var/lib/postgresql/data(or inspect Deployment volumeMounts)