-
Notifications
You must be signed in to change notification settings - Fork 981
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
create namespaced role instead of using cluster role #786
base: master
Are you sure you want to change the base?
Conversation
9ddddee
to
7af2556
Compare
Please tell, if the default name EDIT: |
9b3dcc8
to
e40f714
Compare
changed the default name, updated helm chart and docs allow role to use privileged podsecurtitypolicies
d30092c
to
cb96454
Compare
We're really interested in this feature. Can I help somehow? |
@machine424 thanks for your interest. I've rebased the branch now, so that you can continue working on it. The big open TODO here is the syncing part. What if you want to change the role? How are the existing roles updated then? That's why we went with another clusterrole instead, because it's one edit there and you are done. At some point we should also revisit the hard coded definitions for service account, role bindings (and roles what this PR adds). |
Ok, I'll give it a try, thanks. |
I really need this, it won't happen any time soon, right? However, I am guessing that it is not possible to use the |
I would be interested in a namespaced deployment way too. I do have some use-cases where I do not have permission to create clusterroles due to policy. Roles and RoleBindings however would work to at least deploy the clusters into the same cluster or the namespace. |
In each namespace operator currently creates an additional ServiceAccount and binds it to the
postgres-pod
ClusterRole. This PR adds code to create a Role instead and let the RoleBinding reference it.Next to
pod_service_account_definition
andpod_service_account_role_binding_definition
, a third configuration parameter is added to allow users to configure the role definition as well.Yet, this PR has now sync strategy for roles. What if you want to change the role's privileges? With one ClusterRole it's easy. Just edit it. But how to sync all roles the operator would create?