CrunchyData / postgres-operator

Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.
https://access.crunchydata.com/documentation/postgres-operator/v5/
Apache License 2.0
3.87k stars 585 forks source link

Documention on Using NFS Mounts #3948

Open ranchodeluxe opened 2 months ago

ranchodeluxe commented 2 months ago

Overview

I'm struggling to get PGO working with an NFS mount. I see lots of old links showing that there used to be documentation and examples. Maybe there is more documentation that I'm not seeing? I guess I'd love to see more docs around this type of thing with examples

Use Case

PGO working with NFS mount for instances and backups

Desired Behavior

PGO working with NFS mount for instances and backups

Environment

Additional Information

Most of my questions and problems seem to be around whether or not I'd need some kind of init container to set the correct permissions on the NFS mount. Seems like I'd have to do that

2024-07-02 15:08:36.355 UTC [53054] FATAL:  data directory "/pgdata/pg16" has wrong ownership
2024-07-02 15:08:36.355 UTC [53054] HINT:  The server must be started by the user that owns the data directory.
child process exited with exit code 1
initdb: removing data directory "/pgdata/pg16"
initdb: removing WAL directory "/pgdata/pg16_wal"
ranchodeluxe commented 2 months ago

Now that I've looked through much of the documentation online I see value examples in this section and warnings about NFS and setting permissions in this section

Still think it would valuable to have all this information about NFS located in one place with a simple example of how to change permissions given there doesn't seem to be any init container option for instances or backups.