diff --git a/charts/community-operator/templates/user_roles.yaml b/charts/community-operator/templates/user_roles.yaml new file mode 100644 index 00000000..9239b8cc --- /dev/null +++ b/charts/community-operator/templates/user_roles.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: mongo-edit + labels: + rbac.authorization.k8s.io/aggregate-to-edit: "true" + rbac.authorization.k8s.io/aggregate-to-admin: "true" +rules: + - apiGroups: + - mongodbcommunity.mongodb.com + resources: ["*"] + verbs: + - create + - delete + - deletecollection + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: mongo-view + labels: + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" + rbac.authorization.k8s.io/aggregate-to-view: "true" +rules: + - apiGroups: + - mongodbcommunity.mongodb.com + resources: ["*"] + verbs: + - get + - list + - watch \ No newline at end of file