Allow OCM addons to setup metrics collection with Prometheus (#262)

Related:
https://github.com/stolostron/backlog/issues/23547

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
This commit is contained in:
Matt Prahl
2022-07-12 13:54:11 +00:00
committed by GitHub
parent c1fb03baf1
commit 291f465601
@@ -20,3 +20,9 @@ rules:
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterroles", "roles"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "escalate", "bind"]
# Allow OCM addons to setup metrics collection with Prometheus
# TODO: Move this permission to the open-cluster-management:{{ .KlusterletName }}-work:execution Role (not ClusterRole)
# when it is created.
- apiGroups: ["monitoring.coreos.com"]
resources: ["servicemonitors"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]