{{- if .Values.workflow.rbac.create -}} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "argo-workflows.fullname" . }}-workflow {{- with .Values.workflow.namespace }} namespace: {{ . }} {{- end }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ template "argo-workflows.fullname" . }}-workflow subjects: - kind: ServiceAccount name: {{ .Values.workflow.serviceAccount.name }} {{- with .Values.workflow.namespace }} namespace: {{ . }} {{- end }} {{- end }}