Skip to content

Instantly share code, notes, and snippets.

{
"apiVersion": "litmuschaos.io/v1alpha1",
"kind": "ChaosEngine",
"spec": {
"engineState": "active"
}
}
{
"apiVersion": "litmuschaos.io/v1alpha1",
"kind": "ChaosEngine",
"metadata": {
"name": "nginx-chaos",
"namespace": "default"
},
"spec": {
"appinfo": {
"appns": "default",
@ksatchit
ksatchit / gist:7071948187f296e54e6303549444da07
Last active November 2, 2020 15:23
moac-reconcile-chaos
# chaosengine.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: moac-reconcile-chaos
namespace: mayastor
spec:
jobCleanUpPolicy: 'delete'
annotationCheck: 'true'
engineState: 'active'
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosResult
metadata:
labels:
chaosUID: 340dd567-9a74-11ea-9a71-42010a80012e
type: ChaosResult
name: nginx-chaos-pod-delete-29-04-2020
namespace: default
spec:
engine: nginx-chaos
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: nginx-chaos
namespace: default
spec:
appinfo:
appns: 'default'
applabel: 'run=nginx'
appkind: 'deployment'
rahul@rahul-ThinkPad-E490:~$ kubectl apply -f chaos-engine.yaml
Error from server (BadRequest): error when creating "chaos-engine.yaml":
admission webhook "admission-controller.litmuschaos.io" denied the request:
unable to find deployment specified in ChaosEngine
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: pod-delete
version: 0.1.0
spec:
definition:
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosSchedule
metadata:
name: schedule-nginx
spec:
schedule:
type: "repeat"
executionTime: "2020-05-11T20:30:00Z" # type=once
startTime: "2020-05-12T05:47:00Z" # type=repeat (current UTC Time)
endTime: "2020-05-12T05:52:00Z" # type=repeat (desired UTC Time)
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
labels:
helm.sh/chart: k8sChaos-0.1.0
litmuschaos.io/instance: dealing-butterfly
litmuschaos.io/name: k8sChaos
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
appinfo:
appns: default
applabel: "app=nginx"
experiments:
- name: pod-delete