Skip to content

Commit

Permalink
Point PGDATA to the root of the volume mount (#1203)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jandubois authored and Irfan Habib committed Aug 1, 2017
1 parent ea81d09 commit c41568e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/kubernetes/console/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit c41568e

Please sign in to comment.