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.88k stars 586 forks source link

It appears that there is no way to grant a role to a user/role? #3983

Open jmcdonagh opened 1 week ago

jmcdonagh commented 1 week ago

In some cases we will GRANT a role to another role that has the INHERIT option. I'm not seeing in the docs how to do this. So if this isn't possible, I want this to be a feature request. If it is possible, I'd like to know how. Thanks!

andrewlecuyer commented 1 week ago

Hi @jmcdonagh!

You can define roles and other options for any users defined via spec.users (e.g. INHERIT or NOINHERIT) by adjusting the options for the user, as shown in the following docs:

https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/basic-setup/user-management#adjusting-privileges

Hope this helps!