postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Configure Crunchy operator to use namespace level RBAC rules

Open NiharDudam opened this issue 7 years ago • 5 comments

What is the motivation or use case for the change?

Our clients require that we ship with the most restrictive RBAC rules possible. Since our product does not deploy across namespaces, we need to ship RBAC rules that do not request any cluster-level permissions.

Describe the solution you'd like We need a way to configure crunchy operator (disable any cross namespace features) so that it can run with namespace scoped Roles and RoleBindings

NiharDudam avatar Aug 01 '19 18:08 NiharDudam

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 30 '19 18:09 stale[bot]

This is also a requirement at my site, all rolebindings should be at namespace rather than cluster level.

This is required for running multiple operators in a multi-tenant deployment.

ghost avatar Dec 03 '19 01:12 ghost

@leigh-j With Operator 4.1, everything can be done within a namespaced scope. You can disable using the dynamic namespaces, or set a "read-only" ClusterRole permission if you want to have the Operator see the permissions it needs across namespaces: https://github.com/CrunchyData/postgres-operator/blob/master/deploy/cluster-roles-readonly.yaml

jkatz avatar Dec 03 '19 19:12 jkatz

@jkatz Hi, Is there any documentation about installing the operator on a restricted namespace? I can only see documentation about using readonly, and the readonly clusterroles you mentioned, but the kubectl installer config file installers/kubectl/postgres-operator.yml contains rw clusterroles. It'd be fine if the documentation explains what the kuberentes cluster admins must do beforehand, and what the namespace users must do to install the operator on their namespaces.

juanramb avatar Jul 23 '20 10:07 juanramb