From 8c8dd2aba788fcbcbc7902b4481544af1e29da16 Mon Sep 17 00:00:00 2001 From: Mascarenhas12 Date: Sun, 21 Jul 2024 12:30:00 +0200 Subject: [PATCH] [community-operator Hem chart]: User Role Aggregation Closes #335 --- .../templates/user_roles.yaml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 charts/community-operator/templates/user_roles.yaml 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