diff --git a/mirrord-operator/templates/cluster-role.yaml b/mirrord-operator/templates/cluster-role.yaml index 2a3fd67..1e881b8 100644 --- a/mirrord-operator/templates/cluster-role.yaml +++ b/mirrord-operator/templates/cluster-role.yaml @@ -156,8 +156,8 @@ metadata: name: mirrord-operator-user labels: {{- include "mirrord-operator.labels" . | nindent 4 }} - {{- if .Values.operator.podLabels }} - {{- toYaml .Values.clusterRole.mirrord-operator-user | nindent 4 }} + {{- if index .Values.clusterRole "mirrord-operator-user" }} + {{- toYaml (index .Values.clusterRole "mirrord-operator-user") | nindent 4 }} {{- end }} rules: {{- include "mirrord-operator.rules" . | nindent 0 }} @@ -169,8 +169,8 @@ metadata: name: mirrord-operator-user-basic labels: {{- include "mirrord-operator.labels" . | nindent 4 }} - {{- if .Values.operator.podLabels }} - {{- toYaml .Values.clusterRole.mirrord-operator-user-basic | nindent 4 }} + {{- if index .Values.clusterRole "mirrord-operator-user-basic" }} + {{- toYaml (index .Values.clusterRole "mirrord-operator-user-basic") | nindent 4 }} {{- end }} rules: {{- include "mirrord-operator.clusterRules" . | nindent 0 }} diff --git a/mirrord-operator/templates/namespaced-role.yaml b/mirrord-operator/templates/namespaced-role.yaml index 11f86f1..8817bc8 100644 --- a/mirrord-operator/templates/namespaced-role.yaml +++ b/mirrord-operator/templates/namespaced-role.yaml @@ -6,8 +6,8 @@ metadata: namespace: {{.}} labels: {{- include "mirrord-operator.labels" $ | nindent 4 }} - {{- if .Values.operator.podLabels }} - {{- toYaml .Values.role.mirrord-operator-user | nindent 4 }} + {{- if index .Values.role "mirrord-operator-user" }} + {{- toYaml (index .Values.role "mirrord-operator-user") | nindent 4 }} {{- end }} rules: {{- include "mirrord-operator.rules" . | nindent 0 }}