From 291f465601a8c81e21d2e6bd8f15efd167d56ee1 Mon Sep 17 00:00:00 2001 From: Matt Prahl Date: Tue, 12 Jul 2022 09:54:11 -0400 Subject: [PATCH] Allow OCM addons to setup metrics collection with Prometheus (#262) Related: https://github.com/stolostron/backlog/issues/23547 Signed-off-by: mprahl --- .../managed/klusterlet-work-clusterrole-execution.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manifests/klusterlet/managed/klusterlet-work-clusterrole-execution.yaml b/manifests/klusterlet/managed/klusterlet-work-clusterrole-execution.yaml index a159c9557..4ea1939a9 100644 --- a/manifests/klusterlet/managed/klusterlet-work-clusterrole-execution.yaml +++ b/manifests/klusterlet/managed/klusterlet-work-clusterrole-execution.yaml @@ -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"]