argocd-helm/charts/argo-workflows/templates/controller/workflow-rb.yaml
Tadayuki Onishi e01c613046
feat(argo-workflows): Assign common labels to some resources (#1369)
* feat(argo-workflows): Assign common labels to controller resources

Signed-off-by: kenchan0130 <tt.tanishi100@gmail.com>

* feat(argo-workflows): Assign common labels to the server sa resource

Signed-off-by: kenchan0130 <tt.tanishi100@gmail.com>

* Update argo-workflows Chart.yaml

Signed-off-by: kenchan0130 <tt.tanishi100@gmail.com>
2022-07-13 09:10:34 +09:00

24 lines
881 B
YAML

{{- if .Values.workflow.rbac.create -}}
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "argo-workflows.fullname" $ }}-workflow
labels:
{{- include "argo-workflows.labels" (dict "context" $ "component" $.Values.controller.name "name" $.Values.controller.name) | nindent 4 }}
{{- with $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 $namespace }}
namespace: {{ . }}
{{- end }}
{{- end }}
{{- end }}