forked from UrielCohen456/argocd-executor-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rbac.yaml
74 lines (74 loc) · 1.45 KB
/
rbac.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
apiVersion: v1
kind: ServiceAccount
metadata:
name: workflow
---
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: workflow.service-account-token
annotations:
kubernetes.io/service-account.name: "workflow"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: workflow-role
rules:
# pod get/watch is used to identify the container IDs of the current pod
# pod patch is used to annotate the step's outputs back to controller (e.g. artifact location)
- apiGroups:
- ''
resources:
- pods
verbs:
- list
- get
- watch
- patch
# logs get/watch are used to get the pods logs for script outputs, and for log archival
- apiGroups:
- ''
resources:
- pods/log
verbs:
- get
- watch
- apiGroups:
- argoproj.io
resources:
- workflowtasksets
- workflowtasksets/status
verbs:
- '*'
- apiGroups:
- argoproj.io
resources:
- workfloweventbindings
verbs:
- list
- apiGroups:
- argoproj.io
resources:
- workflowtemplates
verbs:
- get
- apiGroups:
- argoproj.io
resources:
- workflows
verbs:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: workflow-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: workflow-role
subjects:
- kind: ServiceAccount
name: workflow