-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support granular users #19
Support granular users #19
Conversation
@hitman99 The postgres package and the reconcile functions are becoming kind of a mess. I'd like to refactor them a little bit after this pull request. I want to split The reconcile functions are already split into sections ( Would that be ok? |
@arnarg yeah, refactoring is a welcome change! Good call with not mutating the |
@arnarg I'd like to thank you for your contributions and I'm going to make you a maintainer of postgres-operator 😉 But we'll still need to review each other's pull requests before merging 😄 |
I'm kind of swamped at the moment, but I'll try to review this PR as soon as I can |
Oh wow! Thanks!
Of course! 😉 I also really like discussions in issues and pull requests, it makes solving the problems much easier.
No problem |
This used to be the default in Operator-sdk as far as I know.
Closes #10 and #18
I decided to pull the
DropOnDelete
changes into this one as I needed to change it a little bit with this one.This pull request changes so that
Postgres
can now create schemas in a database. It will maintain reader and writer roles for the schemas it is responsible for that we can grant toPostgresUser
chosen by theprivileges
property (OWNER|READ|WRITE
).SELECT
on all tables in all schemas specified inPostgres
.SELECT,INSERT,UPDATE,DELETE
on all tables in all schemas specified inPostgres
.You can still skip specifying any schemas in
Postgres
but then you just have to manage readers and writers on your own (or just be owner) as the ones created by the operator will not be aware of the schemas.I also made sure we don't mutate the spec. I use ArgoCD to maintain our Helm charts and it will be unhappy with any differences in spec.