From f46de7f9ecaa21f72f8c88bde323bfda0393b827 Mon Sep 17 00:00:00 2001 From: zehweh Date: Tue, 2 Mar 2021 16:07:45 +0100 Subject: [PATCH] fix RBAC issue with namespaced deployment fixes #72 --- charts/redis-cluster-operator/templates/role_binding.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/redis-cluster-operator/templates/role_binding.yaml b/charts/redis-cluster-operator/templates/role_binding.yaml index c00500608..2856493b8 100644 --- a/charts/redis-cluster-operator/templates/role_binding.yaml +++ b/charts/redis-cluster-operator/templates/role_binding.yaml @@ -11,6 +11,10 @@ subjects: name: redis-cluster-operator namespace: {{.Release.Namespace}} roleRef: +{{- if eq (len .Values.operator.namespace) 0 }} kind: ClusterRole +{{- else }} + kind: Role +{{- end }} name: redis-cluster-operator apiGroup: rbac.authorization.k8s.io