-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpod-memory-hog.yaml
64 lines (64 loc) · 2.18 KB
/
pod-memory-hog.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
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: pod-memory-hog-sa
namespace: default
labels:
name: pod-memory-hog-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: pod-memory-hog-sa
namespace: default
labels:
name: pod-memory-hog-sa
app.kubernetes.io/part-of: litmus
rules:
# For creating and monitoring the experiment pods which contains the fault injection logic
- apiGroups: [""]
resources: ["pods"]
verbs: ["create","delete","get","list","patch","update", "deletecollection"]
# For updating the events of the chaos progress in the chaosengine and chaosresult CR (litmus custom resources)
- apiGroups: [""]
resources: ["events"]
verbs: ["create","get","list","patch","update"]
# This is used to track the logs of the different expriment component pods
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get","list","watch"]
# It is used for steady state validation (probes) for running a command inside a container and managing it
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["get","list","create"]
# deriving the parent/owner details of the target application (if parent is anyof {deployment, statefulset, daemonsets})
- apiGroups: ["apps"]
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
verbs: ["list","get"]
# It is used for configuring and monitor the experiment job to manages its chaos life cycle
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["create","list","get","delete","deletecollection"]
# It is used for creation, status polling and deletion of litmus chaos resources used within a chaos workflow
- apiGroups: ["litmuschaos.io"]
resources: ["chaosengines","chaosexperiments","chaosresults"]
verbs: ["create","list","get","patch","update","delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pod-memory-hog-sa
namespace: default
labels:
name: pod-memory-hog-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: pod-memory-hog-sa
subjects:
- kind: ServiceAccount
name: pod-memory-hog-sa
namespace: default