You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/gitops-runtime/templates/event-reporters/rollout-reporter/clusterrolebinding.yaml
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
{{/* Mapping of argo rollouts clusterrole if such is created (see https://github.com/codefresh-io/argo-helm/blob/argo-rollouts/charts/argo-rollouts/templates/controller/clusterrolebinding.yaml)
2
2
to the reporters ServiceAccount
3
3
*/}}
4
-
{{- if and (index (get .Values "argo-rollouts") "clusterInstall") (index (get .Values "argo-rollouts") "controller" "createClusterRole") }}
5
-
{{- $eventReporterContext := deepCopy . }}
6
-
{{- $_ := set $eventReporterContext "Values" (get .Values "event-reporters") }}
7
-
{{- $_ := set $eventReporterContext.Values "global" (get .Values "global") }}
4
+
{{- if index (get .Values "argo-rollouts") "enabled" }}
5
+
{{- if and (index (get .Values "argo-rollouts") "clusterInstall") (index (get .Values "argo-rollouts") "controller" "createClusterRole") }}
6
+
{{- $eventReporterContext := deepCopy . }}
7
+
{{- $_ := set $eventReporterContext "Values" (get .Values "event-reporters") }}
8
+
{{- $_ := set $eventReporterContext.Values "global" (get .Values "global") }}
8
9
apiVersion: rbac.authorization.k8s.io/v1
9
10
kind: ClusterRoleBinding
10
11
metadata:
@@ -17,4 +18,5 @@ subjects:
17
18
- kind: ServiceAccount
18
19
name: {{ include "event-reporters.rollout-reporter.serviceAccountName" $eventReporterContext }}
0 commit comments