-
Notifications
You must be signed in to change notification settings - Fork 6k
Adds support for configuring instanceAccessMode #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hmm.. this doesn't work for me the way I thought it would. When I change the mode to ReadWriteMany instead of ReadWriteOnce postgres fails to initialize:
Initializing ...
::postgres-operator: uid::26
::postgres-operator: gid::26
::postgres-operator: postgres path::/usr/pgsql-17/bin/postgres
::postgres-operator: postgres version::postgres (PostgreSQL) 17.4
::postgres-operator: config directory::/pgdata/pg17
::postgres-operator: data directory::/pgdata/pg17
install: cannot change permissions of ‘/pgdata/pg17’: No such file or directory
stat: cannot statx '/pgdata/pg17': No such file or directory
drwxr-xr-x 0 0 /pgdata
I am using Openstack Cinder as my CSI, no clue as to why simply changing the access mode would cause this...
Ended up solving this a different way. Ended up using Ansible to inject a sidecar into the statefulset as a seperate role independent from this helm chart. The sidecar harvests and sends the logs to stdout.
Adds support for configuring instanceAccessMode.
This is useful for implementing logging similar to as described here: https://www.crunchydata.com/blog/log-export-examples-using-crunchy-postgres-for-kubernetes
To implement logging as described in the official article one solution is a logging pod that can mount the PVC's as read-only. To do this effectively instanceAccessMode must be "ReadWriteMany" instead of the hard-coded setting of "ReadWriteOnly".