Skip to content
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

Feature Request: create a superuser per default #3736

Open
mzwettler2 opened this issue Oct 2, 2023 · 2 comments
Open

Feature Request: create a superuser per default #3736

mzwettler2 opened this issue Oct 2, 2023 · 2 comments

Comments

@mzwettler2
Copy link

When you create a Postgres cluster with PGO and do not specify any additional users or databases, PGO will do the following:
° Create a database that matches the name of the Postgres cluster.
° Create an unprivileged Postgres user with the name of the cluster. This user has access to the database created in the previous step.
° Create a Secret with the login credentials and connection details for the Postgres user in relation to the database.

https://access.crunchydata.com/documentation/postgres-operator/5.3.0/architecture/user-management/

Only an unprivileged user is created by default.
A superuser is usually also required.
I would appreciate it if you would also create a superuser by default.
Otherwise you have to specify the full spec.users clause to also get a superuser.

In other words, I want to get this by default when I do not specify the spec.users clause:
° Create a database that matches the name of the Postgres cluster.
° Create an unprivileged Postgres user with the name of the cluster. This user has access to the database created in the previous step.
° Create a superuser (eg. <name of the cluster>_admin)

@dsessler7
Copy link
Contributor

@mzwettler2, I will add a feature request to the backlog. However, I'm curious if you could provide details on your use case that make adding to the spec.users undesirable.

I will also note that the postgres superuser is created by default, you just need to add it to the spec to gain access to a Secret that contains its credentials:

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

@mzwettler2
Copy link
Author

mzwettler2 commented Oct 9, 2023

@dsessler7

I'm not saying it wouldn't be desirable to add users to spec.users. I'm just saying it would be super convenient and comfortable to get all required users by default without adding anything.

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

No branches or pull requests

2 participants