diff --git a/charts/argo/templates/server-cluster-role.yaml b/charts/argo/templates/server-cluster-role.yaml index c99a94c9..19ee7503 100644 --- a/charts/argo/templates/server-cluster-role.yaml +++ b/charts/argo/templates/server-cluster-role.yaml @@ -2,11 +2,13 @@ apiVersion: rbac.authorization.k8s.io/v1 {{- if .Values.singleNamespace }} kind: Role +metadata: + name: {{ .Release.Name }}-{{ .Values.server.name }}-role {{ else }} kind: ClusterRole -{{- end }} metadata: - name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-role + name: {{ .Release.Name }}-{{ .Values.server.name }}-cluster-role +{{- end }} rules: - apiGroups: - "" diff --git a/charts/argo/templates/server-crb.yaml b/charts/argo/templates/server-crb.yaml index 1fe5c974..ed7d7982 100644 --- a/charts/argo/templates/server-crb.yaml +++ b/charts/argo/templates/server-crb.yaml @@ -2,19 +2,22 @@ apiVersion: rbac.authorization.k8s.io/v1 {{- if .Values.singleNamespace }} kind: RoleBinding +metadata: + name: {{ .Release.Name }}-{{ .Values.server.name}}-rb {{ else }} kind: ClusterRoleBinding -{{- end }} metadata: name: {{ .Release.Name }}-{{ .Values.server.name}}-crb +{{- end }} roleRef: apiGroup: rbac.authorization.k8s.io {{- if .Values.singleNamespace }} kind: Role + name: {{ .Release.Name }}-{{ .Values.server.name}}-role {{ else }} kind: ClusterRole - {{- end }} name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-role + {{- end }} subjects: - kind: ServiceAccount name: {{ .Values.server.serviceAccount }} diff --git a/charts/argo/templates/workflow-aggregate-roles.yaml b/charts/argo/templates/workflow-aggregate-roles.yaml index 4957f9c8..d817ead7 100644 --- a/charts/argo/templates/workflow-aggregate-roles.yaml +++ b/charts/argo/templates/workflow-aggregate-roles.yaml @@ -1,10 +1,6 @@ {{- if .Values.createAggregateRoles }} apiVersion: rbac.authorization.k8s.io/v1 -{{- if .Values.singleNamespace }} -kind: Role -{{ else }} kind: ClusterRole -{{- end }} metadata: annotations: helm.sh/hook: pre-install @@ -28,11 +24,7 @@ rules: - watch --- apiVersion: rbac.authorization.k8s.io/v1 - {{- if .Values.singleNamespace }} -kind: Role - {{ else }} kind: ClusterRole - {{- end }} metadata: annotations: helm.sh/hook: pre-install @@ -61,11 +53,7 @@ rules: - watch --- apiVersion: rbac.authorization.k8s.io/v1 - {{- if .Values.singleNamespace }} -kind: Role - {{ else }} kind: ClusterRole - {{- end }} metadata: annotations: helm.sh/hook: pre-install diff --git a/charts/argo/templates/workflow-controller-clusterrole.yaml b/charts/argo/templates/workflow-controller-clusterrole.yaml index 909a6388..20515321 100644 --- a/charts/argo/templates/workflow-controller-clusterrole.yaml +++ b/charts/argo/templates/workflow-controller-clusterrole.yaml @@ -1,11 +1,13 @@ apiVersion: rbac.authorization.k8s.io/v1 - {{- if .Values.singleNamespace }} +{{- if .Values.singleNamespace }} kind: Role - {{ else }} -kind: ClusterRole - {{- end }} metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name}}-cluster-role + name: {{ .Release.Name }}-{{ .Values.controller.name }}-role +{{ else }} +kind: ClusterRole +metadata: + name: {{ .Release.Name }}-{{ .Values.controller.name }}-cluster-role +{{- end }} rules: - apiGroups: - "" diff --git a/charts/argo/templates/workflow-controller-crb.yaml b/charts/argo/templates/workflow-controller-crb.yaml index 1214bc94..3eba3cf2 100644 --- a/charts/argo/templates/workflow-controller-crb.yaml +++ b/charts/argo/templates/workflow-controller-crb.yaml @@ -5,15 +5,16 @@ kind: RoleBinding kind: ClusterRoleBinding {{- end }} metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name}}-binding + name: {{ .Release.Name }}-{{ .Values.controller.name }}-binding roleRef: apiGroup: rbac.authorization.k8s.io {{- if .Values.singleNamespace }} kind: Role + name: {{ .Release.Name }}-{{ .Values.controller.name }}-role {{ else }} kind: ClusterRole + name: {{ .Release.Name }}-{{ .Values.controller.name }}-cluster-role {{- end }} - name: {{ .Release.Name }}-{{ .Values.controller.name}}-cluster-role subjects: - kind: ServiceAccount name: {{ .Values.controller.serviceAccount }}