Refactoring of charts for byoc (#488)
* refactoring charts for byoc Signed-off-by: Oum Kale <oumkale@chaosnative.com>
@@ -1,7 +1,7 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-service-kill
|
||||
name: byoc-pod-delete
|
||||
version: 0.0.4
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
@@ -9,9 +9,9 @@ metadata:
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-service-kill
|
||||
displayName: byoc-pod-delete
|
||||
categoryDescription: |
|
||||
K8 service kill contains chaos to kill a micro service running on the k8 cluster. It uses chaostoolkit to inject micro service kill against specified applications
|
||||
Byoc Pod delete contains chaos to disrupt state of kubernetes resources. It uses chaostoolkit to inject random pod delete failures against specified applications
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
@@ -29,8 +29,8 @@ spec:
|
||||
app.kubernetes.io/version: latest
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/byoc/chaostest
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/k8-service-kill/experiment.yaml
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/byoc-pod-delete/experiment.yaml
|
@@ -41,10 +41,10 @@ spec:
|
||||
verbs :
|
||||
- "get"
|
||||
- "list"
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
image: "litmuschaos/py-runner:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py; exit 0
|
||||
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
@@ -692,7 +692,6 @@ spec:
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
|
||||
---
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
@@ -985,7 +984,6 @@ spec:
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
|
||||
---
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
@@ -1076,88 +1074,6 @@ spec:
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-service-kill
|
||||
labels:
|
||||
name: k8-service-kill
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "apps"
|
||||
- "batch"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "deployments"
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "configmaps"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "nodes"
|
||||
verbs :
|
||||
- "get"
|
||||
- "list"
|
||||
labels:
|
||||
name: k8-service-kill
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'service-app-kill-health.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
@@ -1293,10 +1209,10 @@ spec:
|
||||
verbs :
|
||||
- "get"
|
||||
- "list"
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
image: "litmuschaos/py-runner:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py; exit 0
|
||||
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
@@ -1440,7 +1356,6 @@ spec:
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
|
||||
---
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
@@ -2469,7 +2384,6 @@ spec:
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
|
||||
---
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
|
@@ -30,8 +30,7 @@ spec:
|
||||
- node-taint
|
||||
- docker-service-kill
|
||||
- pod-autoscaler
|
||||
- k8-pod-delete
|
||||
- k8-service-kill
|
||||
- byoc-pod-delete
|
||||
- node-io-stress
|
||||
- pod-io-stress
|
||||
- node-restart
|
||||
|
@@ -51,12 +51,9 @@ experiments:
|
||||
- name: pod-autoscaler
|
||||
CSV: pod-autoscaler.chartserviceversion.yaml
|
||||
desc: "pod-autoscaler"
|
||||
- name: k8-pod-delete
|
||||
CSV: k8-pod-delete.chartserviceversion.yaml
|
||||
desc: "k8-pod-delete"
|
||||
- name: k8-service-kill
|
||||
CSV: k8-service-kill.chartserviceversion.yaml
|
||||
desc: "k8-service-kill"
|
||||
- name: byoc-pod-delete
|
||||
CSV: byoc-pod-delete.chartserviceversion.yaml
|
||||
desc: "byoc-pod-delete"
|
||||
- name: node-io-stress
|
||||
CSV: node-io-stress.chartserviceversion.yaml
|
||||
desc: "node-io-stress"
|
||||
|
Before Width: | Height: | Size: 959 B After Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 12 KiB |
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
version: 0.0.4
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-pod-delete
|
||||
categoryDescription: |
|
||||
K8 Pod delete contains chaos to disrupt state of kubernetes resources. It uses chaostoolkit to inject random pod delete failures against specified applications
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: sumit
|
||||
email: sumit_nagal@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: latest
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/k8-pod-delete/experiment.yaml
|
@@ -1,10 +0,0 @@
|
||||
# Remote namespace
|
||||
# This experiment help you to kill a micro service running on the k8 cluster
|
||||
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine-kiam.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac -`kubectl delete -f rbac.yaml`
|
@@ -1,35 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-service-kill-health
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: 'app=nginx'
|
||||
appkind: 'deployment'
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-service-kill
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace
|
||||
- name: NAME_SPACE
|
||||
value: 'default'
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: 'nginx'
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'service-app-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
@@ -1,80 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-service-kill
|
||||
labels:
|
||||
name: k8-service-kill
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "apps"
|
||||
- "batch"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "deployments"
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "configmaps"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "nodes"
|
||||
verbs :
|
||||
- "get"
|
||||
- "list"
|
||||
labels:
|
||||
name: k8-service-kill
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'service-app-kill-health.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
33
charts/generic/pod-delete/python/engine.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: nginx-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: 'app=nginx'
|
||||
appkind: 'deployment'
|
||||
# It can be active/stop
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: pod-delete-sa
|
||||
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'
|
||||
|
||||
## percentage of total pods to target
|
||||
- name: PODS_AFFECTED_PERC
|
||||
value: ''
|
90
charts/generic/pod-delete/python/experiment.yaml
Normal file
@@ -0,0 +1,90 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-delete
|
||||
labels:
|
||||
name: pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "apps"
|
||||
- "apps.openshift.io"
|
||||
- "argoproj.io"
|
||||
- "batch"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "deployments"
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "pods/log"
|
||||
- "replicationcontrollers"
|
||||
- "deployments"
|
||||
- "statefulsets"
|
||||
- "daemonsets"
|
||||
- "replicasets"
|
||||
- "deploymentconfigs"
|
||||
- "rollouts"
|
||||
- "pods/exec"
|
||||
- "events"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
- "deletecollection"
|
||||
image: "litmuschaos/py-runner:latest"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- python3 -u experiments
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '15'
|
||||
|
||||
# Period to wait before and after injection of chaos in sec
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
|
||||
- name: FORCE
|
||||
value: 'true'
|
||||
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '5'
|
||||
|
||||
## percentage of total pods to target
|
||||
- name: PODS_AFFECTED_PERC
|
||||
value: ''
|
||||
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
|
||||
- name: TARGET_PODS
|
||||
value: ''
|
||||
|
||||
## it defines the sequence of chaos execution for multiple target pods
|
||||
## supported values: serial, parallel
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
labels:
|
||||
name: pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
58
charts/generic/pod-delete/python/rbac.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods","events"]
|
||||
verbs: ["create","list","get","patch","update","delete","deletecollection"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/exec","pods/log","replicationcontrollers"]
|
||||
verbs: ["create","list","get"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["create","list","get","delete","deletecollection"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments","statefulsets","daemonsets","replicasets"]
|
||||
verbs: ["list","get"]
|
||||
- apiGroups: ["apps.openshift.io"]
|
||||
resources: ["deploymentconfigs"]
|
||||
verbs: ["list","get"]
|
||||
- apiGroups: ["argoproj.io"]
|
||||
resources: ["rollouts"]
|
||||
verbs: ["list","get"]
|
||||
- apiGroups: ["litmuschaos.io"]
|
||||
resources: ["chaosengines","chaosexperiments","chaosresults"]
|
||||
verbs: ["create","list","get","patch","update"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -344,119 +344,4 @@ spec:
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
||||
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes an aws instance belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-aws-ec2-terminate
|
||||
labels:
|
||||
name: k8-aws-ec2-terminate
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "apps"
|
||||
- "batch"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "deployments"
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "configmaps"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "nodes"
|
||||
verbs :
|
||||
- "get"
|
||||
- "list"
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/aws/aws_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'ec2-delete.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: 'default'
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: 'app=nginx'
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
|
||||
# Period to wait before injection of chaos in sec
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
# Variable to set for custom report upload
|
||||
- name: REPORT
|
||||
value: 'false'
|
||||
|
||||
# Variable to set for report upload endpoint
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
# Variable to set for AWS account
|
||||
- name: AWS_ACCOUNT
|
||||
value: '000000000000'
|
||||
|
||||
# Variable to set for AWS role, Make sure you have created this role and have give access
|
||||
- name: AWS_ROLE
|
||||
value: 'chaosec2access'
|
||||
|
||||
# Variable to set for AWS region
|
||||
- name: AWS_REGION
|
||||
value: 'us-west-2'
|
||||
|
||||
# Variable to set for AWS AZ
|
||||
- name: AWS_AZ
|
||||
value: 'us-west-2c'
|
||||
|
||||
# Variable to set for AWS RESOURCE
|
||||
- name: AWS_RESOURCE
|
||||
value: 'ec2-iks'
|
||||
|
||||
# Variable to set for AWS SSL
|
||||
- name: AWS_SSL
|
||||
value: 'false'
|
||||
|
||||
# Variable which indicates where the test results CRs will be persisted
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
labels:
|
||||
name: k8-aws-ec2-terminate
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
|
||||
|
||||
---
|
||||
|
@@ -1,20 +0,0 @@
|
||||
# Pre-requisite
|
||||
|
||||
_In Namespace Changes_
|
||||
- This experiment assume that you are using AWS with kubernetes
|
||||
- This experiment assume your namespace has right role for aws to make aws api calls
|
||||
- This experiment also assume you are using Instance group for your name space or aware that if you are using share node group, it will impact other pods running on this ec2 instance
|
||||
|
||||
# Procedure
|
||||
|
||||
- Apply experiments for k8 - `kubectl apply -f experiments.yaml`
|
||||
- Validate the experiments for k8 - `kubectl get chaosexperiment`
|
||||
- Setup RBAC - for pod delete RBAC - `kubectl apply -f rbac.yaml`
|
||||
- Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
- Validate experiment - `kubectl get pods -o wide`
|
||||
- Validate logs - `kubectl logs -f <delete pod>`
|
||||
- Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
- Clean up rbac -`kubectl delete -f rbac.yaml`
|
||||
|
||||
|
||||
|
@@ -1,49 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-aws-ec2-terminate
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: 'app=nginx'
|
||||
appkind: 'deployment'
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
components:
|
||||
runner:
|
||||
runnerannotation:
|
||||
iam.amazonaws.com/role: "k8s-chaosec2access"
|
||||
experiments:
|
||||
- name: k8-aws-ec2-terminate
|
||||
spec:
|
||||
components:
|
||||
experimentannotation:
|
||||
iam.amazonaws.com/role: "k8s-chaosec2access"
|
||||
env:
|
||||
- name: NAME_SPACE
|
||||
value: default
|
||||
- name: LABEL_NAME
|
||||
value: app=nginx
|
||||
- name: APP_ENDPOINT
|
||||
value: localhost
|
||||
- name: FILE
|
||||
value: 'ec2-delete.json'
|
||||
- name: AWS_ROLE
|
||||
value: 'chaosec2access'
|
||||
- name: AWS_ACCOUNT
|
||||
value: '0000000000'
|
||||
- name: AWS_REGION
|
||||
value: 'us-west-2'
|
||||
- name: AWS_AZ
|
||||
value: 'us-west-2c'
|
||||
- name: AWS_RESOURCE
|
||||
value: 'ec2-iks'
|
||||
- name: AWS_SSL
|
||||
value: 'false'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,112 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes an aws instance belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-aws-ec2-terminate
|
||||
labels:
|
||||
name: k8-aws-ec2-terminate
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "apps"
|
||||
- "batch"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "deployments"
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "configmaps"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "nodes"
|
||||
verbs :
|
||||
- "get"
|
||||
- "list"
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/aws/aws_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'ec2-delete.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: 'default'
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: 'app=nginx'
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
|
||||
# Period to wait before injection of chaos in sec
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
# Variable to set for custom report upload
|
||||
- name: REPORT
|
||||
value: 'false'
|
||||
|
||||
# Variable to set for report upload endpoint
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
# Variable to set for AWS account
|
||||
- name: AWS_ACCOUNT
|
||||
value: '000000000000'
|
||||
|
||||
# Variable to set for AWS role, Make sure you have created this role and have give access
|
||||
- name: AWS_ROLE
|
||||
value: 'chaosec2access'
|
||||
|
||||
# Variable to set for AWS region
|
||||
- name: AWS_REGION
|
||||
value: 'us-west-2'
|
||||
|
||||
# Variable to set for AWS AZ
|
||||
- name: AWS_AZ
|
||||
value: 'us-west-2c'
|
||||
|
||||
# Variable to set for AWS RESOURCE
|
||||
- name: AWS_RESOURCE
|
||||
value: 'ec2-iks'
|
||||
|
||||
# Variable to set for AWS SSL
|
||||
- name: AWS_SSL
|
||||
value: 'false'
|
||||
|
||||
# Variable which indicates where the test results CRs will be persisted
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
labels:
|
||||
name: k8-aws-ec2-terminate
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-aws-ec2-terminate
|
||||
version: 0.0.1
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-aws-ec2-terminate
|
||||
categoryDescription: |
|
||||
AWS EC2 terminate contains chaos to disrupt state of aws resources running part of kuberntes cluster workload. It uses chaostoolkit to inject ec2 instance termination against a specified applications
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- AWS
|
||||
- EC2
|
||||
- State
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: sumit
|
||||
email: sumit_nagal@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: latest
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/k8-aws-ec2-terminate/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
labels:
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
labels:
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch","extensions","litmuschaos.io","openebs.io","storage.k8s.io"]
|
||||
resources: ["chaosengines","chaosexperiments","chaosresults","configmaps","cstorpools","cstorvolumereplicas","events","jobs","persistentvolumeclaims","persistentvolumes","pods","pods/exec","pods/log","secrets","storageclasses","chaosengines","chaosexperiments","chaosresults","configmaps","cstorpools","cstorvolumereplicas","daemonsets","deployments","events","jobs","persistentvolumeclaims","persistentvolumes","pods","pods/eviction","pods/exec","pods/log","replicasets","secrets","services","statefulsets","storageclasses"]
|
||||
verbs: ["create","delete","get","list","patch","update"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get","list","patch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
labels:
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-aws-ec2-terminate-sa
|
||||
namespace: default
|
@@ -12,7 +12,6 @@ spec:
|
||||
categoryDescription: >
|
||||
kube-aws contains chaos to disrupt state of aws resources running part of kubernetes cluster
|
||||
experiments:
|
||||
- k8-aws-ec2-terminate
|
||||
- ec2-terminate-by-id
|
||||
- ec2-terminate-by-tag
|
||||
- ebs-loss-by-id
|
||||
@@ -22,8 +21,8 @@ spec:
|
||||
- EC2
|
||||
- State
|
||||
maintainers:
|
||||
- name: sumit
|
||||
email: sumit_nagal@intuit.com
|
||||
- name: ksatchit
|
||||
email: karthik.s@mayadata.io
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
|
@@ -1,8 +1,5 @@
|
||||
packageName: kube-aws
|
||||
experiments:
|
||||
- name: k8-aws-ec2-terminate
|
||||
CSV: k8-aws-ec2-terminate.chartserviceversion.yaml
|
||||
desc: "k8-aws-ec2-terminate"
|
||||
- name: ec2-terminate-by-id
|
||||
CSV: ec2-terminate-by-id.chartserviceversion.yaml
|
||||
desc: "ec2-terminate-by-id"
|
||||
|
@@ -1,60 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
---
|
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 44 KiB |
@@ -1,10 +0,0 @@
|
||||
# Remote namespace
|
||||
* navigate to current directory `charts/generic/k8-alb-ingress-controller/`
|
||||
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-alb-ingress-controller
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "app=alb-ingress-controller"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace
|
||||
- name: NAME_SPACE
|
||||
value: addon-alb-ingress-controller-ns
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: app=alb-ingress-controller
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,34 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-alb-ingress-controller
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-alb-ingress-controller
|
||||
categoryDescription: |
|
||||
k8-alb-ingress-controller contains chaos to disrupt state of ingress controller. It uses chaostoolkit to inject random pod delete failures against ingress controller
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
- Ingress
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: Navin
|
||||
email: navin_kumarj@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-components/k8-alb-ingress-controller/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,46 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: k8-pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -1,9 +0,0 @@
|
||||
# Remote namespace
|
||||
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-calico-node
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "k8s-app=calico-node"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: k8s-app=calico-node
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,34 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-calico-node
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-calico-node
|
||||
categoryDescription: |
|
||||
k8-calico-node contains chaos to disrupt state of calico pod. It uses chaostoolkit to inject random pod delete failures against calico node pod.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
- Calico
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: sumit
|
||||
email: sumit_nagal@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-components/k8-calico-node/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,46 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: k8-pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -1,36 +0,0 @@
|
||||
# chaosengine.yaml
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-kiam-count
|
||||
namespace: default
|
||||
spec:
|
||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||
appinfo:
|
||||
appns: kube-system
|
||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
||||
#applabel: "app=nginx"
|
||||
applabel: "app=kiam"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
- name: LABEL_NAME
|
||||
value: kiam
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
@@ -1,36 +0,0 @@
|
||||
# chaosengine.yaml
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-kiam-custom-count
|
||||
namespace: default
|
||||
spec:
|
||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||
appinfo:
|
||||
appns: kube-system
|
||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
||||
#applabel: "app=nginx"
|
||||
applabel: "app=kiam"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
- name: LABEL_NAME
|
||||
value: app=kiam
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-count.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
@@ -1,36 +0,0 @@
|
||||
# chaosengine.yaml
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-kiam-custom-health
|
||||
namespace: default
|
||||
spec:
|
||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||
appinfo:
|
||||
appns: kube-system
|
||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
||||
#applabel: "app=nginx"
|
||||
applabel: "app=kiam"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
- name: LABEL_NAME
|
||||
value: app=kiam
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
@@ -1,36 +0,0 @@
|
||||
# chaosengine.yaml
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-kiam-health
|
||||
namespace: default
|
||||
spec:
|
||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||
appinfo:
|
||||
appns: kube-system
|
||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
||||
#applabel: "app=nginx"
|
||||
applabel: "app=kiam"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
- name: LABEL_NAME
|
||||
value: kiam
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,9 +0,0 @@
|
||||
# Remote namespace
|
||||
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,37 +0,0 @@
|
||||
# Generic Chaos engine for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-calico-node
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "app=kiam"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: kiam
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,34 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-kiam
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-kiam
|
||||
categoryDescription: |
|
||||
k8-kiam contains chaos to disrupt state of kiam. It uses chaostoolkit to inject random pod delete failures against kiam pod.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
- Kiam
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: sumit
|
||||
email: sumit_nagal@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-components/k8-kiam/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,46 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: k8-pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -1,10 +0,0 @@
|
||||
# Remote namespace
|
||||
* navigate to current directory `charts/generic/k8-kube-proxy/`
|
||||
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-kube-proxy
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "k8s-app=kube-proxy"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: k8s-app=kube-proxy
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,34 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-kube-proxy
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-kube-proxy
|
||||
categoryDescription: |
|
||||
k8-kube-proxy contains chaos to disrupt state of kube-proxy. It uses chaostoolkit to inject random pod delete failures against kube-proxy.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
- Kube-proxy
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: Navin
|
||||
email: navin_kumarj@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-components/k8-kube-proxy/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,46 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: k8-pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -1,10 +0,0 @@
|
||||
# Remote namespace
|
||||
* navigate to current directory `charts/generic/k8-prometheus-k8s-prometheus/`
|
||||
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-prometheus-k8s-prometheus
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "app=prometheus"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace, we assume you are using the addon-metricset-ns if not modify the below namespace
|
||||
- name: NAME_SPACE
|
||||
value: addon-metricset-ns
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: prometheus
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'false'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,34 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-prometheus-k8s-prometheus
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-prometheus-k8s-prometheus
|
||||
categoryDescription: |
|
||||
k8-prometheus-k8s-prometheus contains chaos to disrupt state of prometheus. It uses chaostoolkit to inject random pod delete failures against prometheus application.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
- Prometheus
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: Anushya
|
||||
email: anushya_dharmarajan@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-components/k8-prometheus-k8s-prometheus/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,46 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: k8-pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -1,10 +0,0 @@
|
||||
# Remote namespace
|
||||
* navigate to current directory `charts/generic/k8-prometheus-operator/`
|
||||
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-prometheus-operator
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "k8s-app=prometheus-operator"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace, we assume you are using the addon-metricset-ns if not modify the below namespace
|
||||
- name: NAME_SPACE
|
||||
value: addon-metricset-ns
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: k8s-app=prometheus-operator
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'false'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,34 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-prometheus-operator
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-prometheus-operator
|
||||
categoryDescription: |
|
||||
k8-prometheus-operator contains chaos to disrupt state of prometheus operator. It uses chaostoolkit to inject random pod delete failures against prometheus operator.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
- Prometheus
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: Anushya
|
||||
email: anushya_dharmarajan@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-components/k8-prometheus-operator/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,46 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: k8-pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -1,10 +0,0 @@
|
||||
# Remote namespace
|
||||
* navigate to current directory `charts/generic/k8-prometheus-pushgateway/`
|
||||
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-prometheus-pushgateway
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "k8s-app=prometheus-pushgateway"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace, we assume you are using the addon-metricset-ns if not modify the below namespace
|
||||
- name: NAME_SPACE
|
||||
value: addon-metricset-ns
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: k8s-app=prometheus-pushgateway
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'false'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
@@ -1,34 +0,0 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: k8-prometheus-pushgateway
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
createdAt: 2020-02-24T10:28:08Z
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: k8-prometheus-pushgateway
|
||||
categoryDescription: |
|
||||
k8-prometheus-pushgateway contains chaos to disrupt state of prometheus pushgateway. It uses chaostoolkit to inject random pod delete failures against prometheus pushgateway.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- State
|
||||
- Prometheus
|
||||
platforms:
|
||||
- Minikube
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: Anushya
|
||||
email: anushya_dharmarajan@intuit.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Intuit
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-components/k8-prometheus-pushgateway/experiment.yaml
|
@@ -1,38 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: chaos-admin
|
||||
labels:
|
||||
name: chaos-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: chaos-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: chaos-admin
|
||||
namespace: default
|
@@ -1,46 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: k8-pod-delete-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: k8-pod-delete-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8-pod-delete-sa
|
||||
namespace: default
|
||||
|
@@ -1,10 +0,0 @@
|
||||
# Remote namespace
|
||||
# wavefront collector information - https://github.com/wavefrontHQ/wavefront-collector
|
||||
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
|
||||
* Validate the experiments for k8 - `kubectl get chaosexperiments`
|
||||
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
|
||||
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
|
||||
* Validate experiment - `kubectl get pods -w`
|
||||
* Validate logs - `kubectl logs -f <delete pod>`
|
||||
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
|
||||
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`
|
@@ -1,36 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: k8-calico-node
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
applabel: "k8s-app=wavefront-collector"
|
||||
appkind: deployment
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: chaos-admin
|
||||
experiments:
|
||||
- name: k8-pod-delete
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos namespace, we assume you are using the kube-system if not modify the below namespace
|
||||
- name: NAME_SPACE
|
||||
value: kube-system
|
||||
# set chaos label name
|
||||
- name: LABEL_NAME
|
||||
value: k8s-app=wavefront-collector
|
||||
# pod endpoint
|
||||
- name: APP_ENDPOINT
|
||||
value: 'localhost'
|
||||
- name: FILE
|
||||
value: 'pod-custom-kill-health.json'
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# Generic Chaos experiment for Application team, who want to participate in Game Day
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: k8-pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups: ["","apps","batch"]
|
||||
resources: ["jobs","deployments","daemonsets"]
|
||||
verbs: ["create","list","get","patch","delete"]
|
||||
- apiGroups: ["","litmuschaos.io"]
|
||||
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
|
||||
verbs: ["get","create","update","patch","delete","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs : ["get","list"]
|
||||
labels:
|
||||
name: k8-pod-delete
|
||||
app.kubernetes.io/part-of: litmus
|
||||
image: "litmuschaos/chaostoolkit:latest"
|
||||
args:
|
||||
- -c
|
||||
- python /app/chaos/chaostest/kubernetes/k8_wrapper.py ; exit 0
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: CHAOSTOOLKIT_IN_POD
|
||||
value: 'true'
|
||||
|
||||
- name: FILE
|
||||
value: 'pod-app-kill-count.json'
|
||||
|
||||
- name: NAME_SPACE
|
||||
value: ''
|
||||
|
||||
- name: LABEL_NAME
|
||||
value: ''
|
||||
|
||||
- name: APP_ENDPOINT
|
||||
value: ''
|
||||
|
||||
- name: PERCENTAGE
|
||||
value: '50'
|
||||
|
||||
- name: REPORT
|
||||
value: 'true'
|
||||
|
||||
- name: REPORT_ENDPOINT
|
||||
value: 'none'
|
||||
|
||||
- name: TEST_NAMESPACE
|
||||
value: 'default'
|