mirror of
https://github.com/bitnami/charts.git
synced 2026-02-25 07:38:03 +08:00
69 lines
2.6 KiB
YAML
69 lines
2.6 KiB
YAML
{{- if .Values.controller.rbac.create }}
|
|
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
|
{{- if .Values.rbac.singleNamespace }}
|
|
kind: RoleBinding
|
|
{{ else }}
|
|
kind: ClusterRoleBinding
|
|
{{- end }}
|
|
metadata:
|
|
name: {{ include "argo-workflows.controller.fullname.namespace" . }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/part-of: argo-workflows
|
|
app.kubernetes.io/component: controller
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
{{- if .Values.rbac.singleNamespace }}
|
|
kind: Role
|
|
{{ else }}
|
|
kind: ClusterRole
|
|
{{- end }}
|
|
name: {{ include "argo-workflows.controller.fullname.namespace" . }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "argo-workflows.controller.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
{{- if .Values.controller.workflowNamespaces }}
|
|
{{- $uiServiceAccount := (include "argo-workflows.controller.serviceAccountName" .) }}
|
|
{{- $namespace := .Release.Namespace }}
|
|
{{- range $key := .Values.controller.workflowNamespaces }}
|
|
{{- if not (eq $key $namespace) }}
|
|
- kind: ServiceAccount
|
|
name: {{ $uiServiceAccount }}
|
|
namespace: {{ $key }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- if .Values.controller.clusterWorkflowTemplates.enabled }}
|
|
---
|
|
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ include "argo-workflows.controller.fullname.namespace" . }}-cluster-template
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: controller
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ include "argo-workflows.controller.fullname.namespace" . }}-cluster-template
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "argo-workflows.controller.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
{{- end }}
|
|
{{- end }}
|