/
1b_argo_rbac.yaml
54 lines (51 loc) · 1.69 KB
/
1b_argo_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
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-chaos
namespace: #{INFRA_NAMESPACE}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-cluster-role
rules:
# for managing the pods created by workflow controller to implement individual steps in the workflow
- apiGroups: ['']
resources: ['pods', 'services']
verbs: ['create', 'get', 'watch', 'patch', 'delete', 'list']
- apiGroups: ['']
resources: ['namespaces']
verbs: ['get', 'watch', 'patch', 'list']
# for tracking & getting logs of the pods created by workflow controller to implement individual steps in the workflow
- apiGroups: ['']
resources: ['pods/log', 'pods/exec']
verbs: ['get', 'watch', 'create', 'delete', 'patch']
- apiGroups: ['']
resources: ['secrets', 'configmaps']
verbs: ['get', 'watch', 'create', 'patch']
# for creation & deletion of application in predefined workflows
- apiGroups: ['apps']
resources: ['deployments']
verbs: ['delete']
- apiGroups: ['apps']
resources: ['deployments', 'statefulsets']
verbs: ['get', 'watch', 'patch' , 'create']
# for creation, status polling and deletion of litmus chaos resources used within a chaos workflow
- apiGroups: ["litmuschaos.io"]
resources:
["chaosengines", "chaosexperiments", "chaosresults", "chaosschedules"]
verbs: ["create", "list", "get", "patch", "delete", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-cluster-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-cluster-role
subjects:
- kind: ServiceAccount
name: argo-chaos
namespace: #{INFRA_NAMESPACE}