Create service account for scheduler web service to enable workflow creation
This commit is contained in:
parent
f6fa0e22d2
commit
2738dd614c
@ -70,18 +70,4 @@ roleRef:
|
|||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: custom-argo-clusterrole
|
name: custom-argo-clusterrole
|
||||||
---
|
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Workflow
|
|
||||||
metadata:
|
|
||||||
name: hello-world
|
|
||||||
namespace: {{ .Release.Namespace }}
|
|
||||||
spec:
|
|
||||||
entrypoint: whalesay
|
|
||||||
templates:
|
|
||||||
- name: whalesay
|
|
||||||
container:
|
|
||||||
image: docker/whalesay
|
|
||||||
command: [ cowsay ]
|
|
||||||
args: [ "hello world" ]
|
|
||||||
{{- end }}
|
{{- end }}
|
@ -15,6 +15,7 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: oc-scheduler
|
app: oc-scheduler
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: scheduler-sa
|
||||||
containers:
|
containers:
|
||||||
- image: "{{ .Values.ocScheduler.image }}"
|
- image: "{{ .Values.ocScheduler.image }}"
|
||||||
name: oc-scheduler
|
name: oc-scheduler
|
||||||
|
41
opencloud/templates/oc-scheduler/sa.yaml
Normal file
41
opencloud/templates/oc-scheduler/sa.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{{- if index .Values.ocScheduler.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: scheduler-sa
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: scheduler-sa-clusterrole
|
||||||
|
rules:
|
||||||
|
# Permissions for Argo Workflow resources
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources:
|
||||||
|
- workflows
|
||||||
|
- workflowtemplates
|
||||||
|
- cronworkflows
|
||||||
|
- clusterworkflowtemplates
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: scheduler-sa-clusterrolebinding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: scheduler-sa
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: scheduler-sa-clusterrole
|
||||||
|
{{- end }}
|
Loading…
Reference in New Issue
Block a user