mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
OpenShift enforces securityContext.fsGroups for block devices and sets group stickybits for volumeMounts. This leads to patroni pods failing to start after the first restart: > 2020-01-13 14:46:13.695 UTC [143] FATAL: data directory "/home/postgres/pgdata/pgroot/data" has invalid permissions 2020-01-13 14:46:13.695 UTC [143] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750). A initContainer which fixes the OpenShift tampering solves the issue. I stole the solution from the stable postgres helm chart: https://github.com/helm/charts/pull/14540/files Tested on OpenShift v3.11 Note: This error does not occur when using shared filesystems (like NFS)