argocd-helm/charts/argo-workflows/templates/controller/workflow-sa.yaml
Vlad Losev c1e7213cdc
fix(argo-workflows): Restore RBAC permission and clarify namespace settings. (#989)
Signed-off-by: Vlad Losev <vladimir.losev@sage.com>
2021-11-01 21:12:45 +03:00

16 lines
558 B
YAML

{{- if .Values.workflow.serviceAccount.create -}}
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ $.Values.workflow.serviceAccount.name }}
{{- with $namespace }}
namespace: {{ . }}
{{- end }}
{{- with $.Values.workflow.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}