From c41568e15b9921741e916d3c5a585e480def412f Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Tue, 1 Aug 2017 03:26:27 -0700 Subject: [PATCH] Point PGDATA to the root of the volume mount (#1203) At least with Kubernetes 1.6 a hostPath volume mount will be owned by root and have 750 permissions. The docker-entrypoint.sh script will try to assign ownership to the postgres user: mkdir -p "$PGDATA" chmod 700 "$PGDATA" chown -R postgres "$PGDATA" But this is insufficient if PGDATA points to a subdirectory of the mount directory since the postgres user doesn't have "execute" permission and therefore cannot reach the data directory. --- deploy/kubernetes/console/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/kubernetes/console/templates/deployment.yaml b/deploy/kubernetes/console/templates/deployment.yaml index 9e05559d3f..5005a5c049 100644 --- a/deploy/kubernetes/console/templates/deployment.yaml +++ b/deploy/kubernetes/console/templates/deployment.yaml @@ -226,7 +226,7 @@ spec: - name: POSTGRES_PASSWORD_FILE value: /etc/secrets/stolon - name: PGDATA - value: /stolon-data/postgres + value: /stolon-data - name: HTTP_PROXY {{- if .Values.httpProxy }} value: {{.Values.httpProxy}}