diff --git a/charts/argo/templates/server-cluster-roles.yaml b/charts/argo/templates/server-cluster-roles.yaml index b6d47c09..f08720ba 100644 --- a/charts/argo/templates/server-cluster-roles.yaml +++ b/charts/argo/templates/server-cluster-roles.yaml @@ -111,6 +111,8 @@ rules: - update - patch - delete + +{{- if not .Values.singleNamespace }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -132,3 +134,4 @@ rules: - delete {{- end }} {{- end }} +{{- end }} diff --git a/charts/argo/templates/server-crb.yaml b/charts/argo/templates/server-crb.yaml index ad4cfeda..bc4886d9 100644 --- a/charts/argo/templates/server-crb.yaml +++ b/charts/argo/templates/server-crb.yaml @@ -19,6 +19,8 @@ subjects: - kind: ServiceAccount name: {{ .Values.server.serviceAccount }} namespace: {{ .Release.Namespace }} + +{{- if not .Values.singleNamespace }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -32,4 +34,5 @@ subjects: - kind: ServiceAccount name: {{ .Values.server.serviceAccount }} namespace: {{ .Release.Namespace }} +{{- end }} {{- end -}} diff --git a/charts/argo/templates/workflow-controller-cluster-roles.yaml b/charts/argo/templates/workflow-controller-cluster-roles.yaml index 4d596b1c..7ce39aa8 100644 --- a/charts/argo/templates/workflow-controller-cluster-roles.yaml +++ b/charts/argo/templates/workflow-controller-cluster-roles.yaml @@ -129,6 +129,8 @@ rules: - update - patch - delete + +{{- if not .Values.singleNamespace }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -144,3 +146,4 @@ rules: - get - list - watch +{{- end }} diff --git a/charts/argo/templates/workflow-controller-crb.yaml b/charts/argo/templates/workflow-controller-crb.yaml index 66cca4d0..b534af48 100644 --- a/charts/argo/templates/workflow-controller-crb.yaml +++ b/charts/argo/templates/workflow-controller-crb.yaml @@ -29,6 +29,8 @@ subjects: {{- end }} {{- end }} {{- end }} + +{{- if not .Values.singleNamespace }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -42,3 +44,4 @@ subjects: - kind: ServiceAccount name: {{ .Values.controller.serviceAccount }} namespace: {{ .Release.Namespace }} +{{- end }}