Skip to content

Conversation

spatterIight
Copy link

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".

@spatterIight spatterIight changed the title Adds support for configuring instancesAccessMode Adds support for configuring instanceAccessMode Jun 30, 2025
@spatterIight
Copy link
Author

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...

@spatterIight
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant