From 9a8d253c3266b01d90ee4ba826aff8d86e84d41a Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Sun, 22 Sep 2024 18:42:32 -0700 Subject: [PATCH] Change cluster role name Signed-off-by: Tamal Saha --- pkg/controllers/prometheus/prometheus_controller.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/controllers/prometheus/prometheus_controller.go b/pkg/controllers/prometheus/prometheus_controller.go index 4c129477..57e0c82e 100644 --- a/pkg/controllers/prometheus/prometheus_controller.go +++ b/pkg/controllers/prometheus/prometheus_controller.go @@ -56,6 +56,7 @@ import ( const ( portPrometheus = "http-web" saTrickster = "trickster" + crTrickster = "appscode:trickster:proxy" registeredKey = mona.GroupName + "/registered" tokenIDKey = mona.GroupName + "/token-id" @@ -246,7 +247,7 @@ func (r *PrometheusReconciler) SetupClusterForPrometheus(ctx context.Context, pr cr := rbac.ClusterRole{ ObjectMeta: metav1.ObjectMeta{ - Name: saTrickster, + Name: crTrickster, }, } crvt, err := cu.CreateOrPatch(context.TODO(), r.kc, &cr, func(in client.Object, createOp bool) client.Object { @@ -269,7 +270,7 @@ func (r *PrometheusReconciler) SetupClusterForPrometheus(ctx context.Context, pr rb := rbac.RoleBinding{ ObjectMeta: metav1.ObjectMeta{ - Name: saTrickster, + Name: crTrickster, Namespace: key.Namespace, }, }