From 0602da7fbb6074cf14b0f76742c2c9259eb20ac5 Mon Sep 17 00:00:00 2001 From: Arthur Vardevanyan Date: Wed, 14 Jun 2023 07:50:11 -0400 Subject: [PATCH] Update Operator Role for Monitoring Flag (#925) Signed-off-by: Arthur Signed-off-by: Yi Cai --- bundle/manifests/argocd-operator.clusterserviceversion.yaml | 1 + config/rbac/role.yaml | 1 + controllers/argocd/argocd_controller.go | 2 +- .../0.7.0/argocd-operator.v0.7.0.clusterserviceversion.yaml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bundle/manifests/argocd-operator.clusterserviceversion.yaml b/bundle/manifests/argocd-operator.clusterserviceversion.yaml index 166a5cee9..980787b9c 100644 --- a/bundle/manifests/argocd-operator.clusterserviceversion.yaml +++ b/bundle/manifests/argocd-operator.clusterserviceversion.yaml @@ -1004,6 +1004,7 @@ spec: - monitoring.coreos.com resources: - prometheuses + - prometheusrules - servicemonitors verbs: - '*' diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 3dab5fd13..b0e378d1c 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -99,6 +99,7 @@ rules: - monitoring.coreos.com resources: - prometheuses + - prometheusrules - servicemonitors verbs: - '*' diff --git a/controllers/argocd/argocd_controller.go b/controllers/argocd/argocd_controller.go index a8cadae70..e2e7abb00 100644 --- a/controllers/argocd/argocd_controller.go +++ b/controllers/argocd/argocd_controller.go @@ -57,7 +57,7 @@ var log = logr.Log.WithName("controller_argocd") //+kubebuilder:rbac:groups=batch,resources=cronjobs;jobs,verbs=* //+kubebuilder:rbac:groups=config.openshift.io,resources=clusterversions,verbs=get;list;watch //+kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=* -//+kubebuilder:rbac:groups=monitoring.coreos.com,resources=prometheuses;servicemonitors,verbs=* +//+kubebuilder:rbac:groups=monitoring.coreos.com,resources=prometheuses;prometheusrules;servicemonitors,verbs=* //+kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=* //+kubebuilder:rbac:groups=argoproj.io,resources=applications;appprojects,verbs=* //+kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=*,verbs=* diff --git a/deploy/olm-catalog/argocd-operator/0.7.0/argocd-operator.v0.7.0.clusterserviceversion.yaml b/deploy/olm-catalog/argocd-operator/0.7.0/argocd-operator.v0.7.0.clusterserviceversion.yaml index 166a5cee9..980787b9c 100644 --- a/deploy/olm-catalog/argocd-operator/0.7.0/argocd-operator.v0.7.0.clusterserviceversion.yaml +++ b/deploy/olm-catalog/argocd-operator/0.7.0/argocd-operator.v0.7.0.clusterserviceversion.yaml @@ -1004,6 +1004,7 @@ spec: - monitoring.coreos.com resources: - prometheuses + - prometheusrules - servicemonitors verbs: - '*'