add workflow controller cluster role and binding
This commit is contained in:
parent
4558255d67
commit
cca1646631
2 changed files with 65 additions and 0 deletions
42
charts/argo/templates/workflow-controller-clusterrole.yaml
Normal file
42
charts/argo/templates/workflow-controller-clusterrole.yaml
Normal file
|
@ -0,0 +1,42 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Release.name }}-{{ .Values.controllerName}}-cluster-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- workflows
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
23
charts/argo/templates/workflow-controller-crb.yaml
Normal file
23
charts/argo/templates/workflow-controller-crb.yaml
Normal file
|
@ -0,0 +1,23 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ .Release.name }}-{{ .Values.controllerName}}-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ .Release.name }}-{{ .Values.controllerName}}-cluster-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.workflowServiceAccount }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- if .Values.workflowNamespaces }}
|
||||
{{- $uiServiceAccount := .Values.workflowServiceAccount }}
|
||||
{{- $namespace := .Release.Namespace }}
|
||||
{{- range $key := .Values.workflowNamespaces }}
|
||||
{{- if not (eq $key $namespace) }}
|
||||
- kind: ServiceAccount
|
||||
name: {{ $uiServiceAccount }}
|
||||
namespace: {{ $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
Loading…
Reference in a new issue