chore(pod-delete): Adding engine & rbac for getstarted guide (#315)
Signed-off-by: shubhamchaudhary <shubham.chaudhary@mayadata.io>
This commit is contained in:
committed by
GitHub
parent
cbfb84fb04
commit
3dfbecaed7
36
charts/generic/pod-delete/engine_nginx_getstarted.yaml
Normal file
36
charts/generic/pod-delete/engine_nginx_getstarted.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: nginx
|
||||||
|
spec:
|
||||||
|
appinfo:
|
||||||
|
appns: 'nginx'
|
||||||
|
applabel: 'app=nginx'
|
||||||
|
appkind: 'deployment'
|
||||||
|
# It can be true/false
|
||||||
|
annotationCheck: 'true'
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
chaosServiceAccount: pod-delete-sa
|
||||||
|
monitoring: false
|
||||||
|
# It can be delete/retain
|
||||||
|
jobCleanUpPolicy: 'delete'
|
||||||
|
experiments:
|
||||||
|
- name: pod-delete
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
# set chaos interval (in sec) as desired
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
# pod failures without '--force' & default terminationGracePeriodSeconds
|
||||||
|
- name: FORCE
|
||||||
|
value: 'false'
|
36
charts/generic/pod-delete/rbac_nginx_getstarted.yaml
Normal file
36
charts/generic/pod-delete/rbac_nginx_getstarted.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: pod-delete-sa
|
||||||
|
namespace: nginx
|
||||||
|
labels:
|
||||||
|
name: pod-delete-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: pod-delete-sa
|
||||||
|
namespace: nginx
|
||||||
|
labels:
|
||||||
|
name: pod-delete-sa
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
||||||
|
resources: ["pods","deployments","pods/log","events","jobs","chaosengines","chaosexperiments","chaosresults"]
|
||||||
|
verbs: ["create","list","get","patch","update","delete"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: pod-delete-sa
|
||||||
|
namespace: nginx
|
||||||
|
labels:
|
||||||
|
name: pod-delete-sa
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: pod-delete-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: pod-delete-sa
|
||||||
|
namespace: nginx
|
Reference in New Issue
Block a user