chore(workflow): Updating the http schema and few minor fixes (#429)

* updating the probe schema

Signed-off-by: Oum Kale <oumkale@chaosnative.com>
This commit is contained in:
OUM NIVRATHI KALE
2021-03-23 16:10:56 +05:30
committed by GitHub
parent ea6e7b427e
commit bf44a78565
6 changed files with 150 additions and 143 deletions

View File

@@ -233,5 +233,5 @@ spec:
image: alpine/k8s:1.18.2 image: alpine/k8s:1.18.2
command: [sh, -c] command: [sh, -c]
args: args:
- "kubectl delete chaosengines --all -n - "kubectl delete chaosengines kube-proxy-node-cpu-hog kube-proxy-pod-memory-hog-chaos kube-proxy-pod-cpu-hog-chaos kube-proxy-node-memory-hog-chaos kube-proxy-pod-delete-chaos -n
{{workflow.parameters.adminModeNamespace}}" {{workflow.parameters.adminModeNamespace}}"

View File

@@ -236,5 +236,5 @@ spec:
image: alpine/k8s:1.18.2 image: alpine/k8s:1.18.2
command: [sh, -c] command: [sh, -c]
args: args:
- "kubectl delete chaosengines --all -n - "kubectl delete chaosengines kube-proxy-node-cpu-hog kube-proxy-pod-memory-hog-chaos kube-proxy-pod-cpu-hog-chaos kube-proxy-node-memory-hog-chaos kube-proxy-pod-delete-chaos -n
{{workflow.parameters.adminModeNamespace}}" {{workflow.parameters.adminModeNamespace}}"

View File

@@ -50,7 +50,7 @@ spec:
command: [sh, -c] command: [sh, -c]
args: args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n - "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} | sleep 30" {{workflow.parameters.adminModeNamespace}} ; sleep 30"
- name: pod-cpu-hog - name: pod-cpu-hog
inputs: inputs:
@@ -83,6 +83,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -100,13 +101,13 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 10 initialDelaySeconds: 10
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
@@ -155,6 +156,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -172,13 +174,13 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 10 initialDelaySeconds: 10
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
@@ -228,15 +230,16 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue" url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 12
interval: 2 interval: 12
retry: 2 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-benchmark" - name: "check-benchmark"
type: "cmdProbe" type: "cmdProbe"
@@ -245,23 +248,22 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 2 initialDelaySeconds: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
# set chaos interval (in sec) as desired # set chaos interval (in sec) as desired
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
value: '10' value: '10'
# pod failures without '--force' & default terminationGracePeriodSeconds # pod failures without '--force' & default terminationGracePeriodSeconds
- name: FORCE - name: FORCE
value: 'false' value: 'false'
@@ -303,15 +305,16 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/cards" url: "http://front-end.sock-shop.svc.cluster.local:80/cards"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 12
interval: 1 interval: 12
retry: 1 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-benchmark" - name: "check-benchmark"
type: "cmdProbe" type: "cmdProbe"
@@ -320,22 +323,21 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 2 initialDelaySeconds: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
- name: NETWORK_INTERFACE - name: NETWORK_INTERFACE
value: 'eth0' value: 'eth0'
- name: NETWORK_PACKET_LOSS_PERCENTAGE - name: NETWORK_PACKET_LOSS_PERCENTAGE
value: '100' value: '100'
- name: CONTAINER_RUNTIME - name: CONTAINER_RUNTIME
@@ -398,23 +400,23 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 1 initialDelaySeconds: 1
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: FILL_PERCENTAGE - name: FILL_PERCENTAGE
value: '100' value: '100'
- name: TARGET_CONTAINER - name: TARGET_CONTAINER
value: '' value: ''
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '60' value: '30'
container: container:
image: litmuschaos/litmus-checker:latest image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"] args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]

View File

@@ -54,7 +54,7 @@ spec:
command: [sh, -c] command: [sh, -c]
args: args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n - "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} | sleep 30" {{workflow.parameters.adminModeNamespace}} ; sleep 30"
- name: pod-cpu-hog - name: pod-cpu-hog
inputs: inputs:
@@ -87,6 +87,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -95,7 +96,7 @@ spec:
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 1 interval: 1
retry: 1 retry: 2
probePollingInterval: 1 probePollingInterval: 1
- name: "check-benchmark" - name: "check-benchmark"
type: "cmdProbe" type: "cmdProbe"
@@ -104,13 +105,13 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 10 initialDelaySeconds: 10
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
@@ -159,6 +160,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -167,7 +169,7 @@ spec:
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 1 interval: 1
retry: 1 retry: 2
probePollingInterval: 1 probePollingInterval: 1
- name: "check-benchmark" - name: "check-benchmark"
type: "cmdProbe" type: "cmdProbe"
@@ -176,13 +178,13 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 10 initialDelaySeconds: 10
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
@@ -232,15 +234,16 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue" url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 12
interval: 1 interval: 12
retry: 1 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-benchmark" - name: "check-benchmark"
type: "cmdProbe" type: "cmdProbe"
@@ -249,23 +252,22 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 2 initialDelaySeconds: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
# set chaos interval (in sec) as desired # set chaos interval (in sec) as desired
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
value: '10' value: '10'
# pod failures without '--force' & default terminationGracePeriodSeconds # pod failures without '--force' & default terminationGracePeriodSeconds
- name: FORCE - name: FORCE
value: 'false' value: 'false'
@@ -307,15 +309,16 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/cards" url: "http://front-end.sock-shop.svc.cluster.local:80/cards"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 12
interval: 1 interval: 12
retry: 2 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-benchmark" - name: "check-benchmark"
type: "cmdProbe" type: "cmdProbe"
@@ -324,22 +327,21 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 2 initialDelaySeconds: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
- name: NETWORK_INTERFACE - name: NETWORK_INTERFACE
value: 'eth0' value: 'eth0'
- name: NETWORK_PACKET_LOSS_PERCENTAGE - name: NETWORK_PACKET_LOSS_PERCENTAGE
value: '100' value: '100'
- name: CONTAINER_RUNTIME - name: CONTAINER_RUNTIME
@@ -402,23 +404,23 @@ spec:
comparator: comparator:
type: "int" # supports: string, int, float type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500" value: "100"
source: "inline" # it can be “inline” or any image source: "inline" # it can be “inline” or any image
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 2
interval: 2 interval: 1
retry: 1 retry: 2
initialDelaySeconds: 1 initialDelaySeconds: 1
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: FILL_PERCENTAGE - name: FILL_PERCENTAGE
value: '100' value: '100'
- name: TARGET_CONTAINER - name: TARGET_CONTAINER
value: '' value: ''
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '60' value: '30'
container: container:
image: litmuschaos/litmus-checker:latest image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"] args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]

View File

@@ -50,7 +50,7 @@ spec:
command: [sh, -c] command: [sh, -c]
args: args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n - "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} | sleep 30" {{workflow.parameters.adminModeNamespace}} ; sleep 30"
- name: pod-cpu-hog - name: pod-cpu-hog
inputs: inputs:
@@ -83,6 +83,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -96,16 +97,16 @@ spec:
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
env: env:
@@ -153,6 +154,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -166,16 +168,16 @@ spec:
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
env: env:
@@ -183,7 +185,6 @@ spec:
value: '500' value: '500'
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' # in seconds value: '30' # in seconds
- name: CHAOS_KILL_COMMAND - name: CHAOS_KILL_COMMAND
value: "kill -9 $(ps afx | grep \"[dd] if /dev/zero\" | awk '{print $1}' | tr '\n' ' ')" value: "kill -9 $(ps afx | grep \"[dd] if /dev/zero\" | awk '{print $1}' | tr '\n' ' ')"
@@ -225,38 +226,38 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue" url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 3 probeTimeout: 12
interval: 1 interval: 12
retry: 2 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
# set chaos interval (in sec) as desired # set chaos interval (in sec) as desired
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
value: '10' value: '10'
# pod failures without '--force' & default terminationGracePeriodSeconds # pod failures without '--force' & default terminationGracePeriodSeconds
- name: FORCE - name: FORCE
value: 'false' value: 'false'
@@ -299,37 +300,37 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/cards" url: "http://front-end.sock-shop.svc.cluster.local:80/cards"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 12
interval: 1 interval: 12
retry: 2 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
- name: NETWORK_INTERFACE - name: NETWORK_INTERFACE
value: 'eth0' value: 'eth0'
- name: NETWORK_PACKET_LOSS_PERCENTAGE - name: NETWORK_PACKET_LOSS_PERCENTAGE
value: '100' value: '100'
- name: CONTAINER_RUNTIME - name: CONTAINER_RUNTIME
@@ -388,25 +389,25 @@ spec:
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: FILL_PERCENTAGE - name: FILL_PERCENTAGE
value: '100' value: '100'
- name: TARGET_CONTAINER - name: TARGET_CONTAINER
value: '' value: ''
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '60' value: '30'
container: container:
image: litmuschaos/litmus-checker:latest image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"] args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]

View File

@@ -56,7 +56,7 @@ spec:
command: [sh, -c] command: [sh, -c]
args: args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n - "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} | sleep 30" {{workflow.parameters.adminModeNamespace}} ; sleep 30"
- name: pod-cpu-hog - name: pod-cpu-hog
inputs: inputs:
@@ -89,6 +89,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -102,16 +103,16 @@ spec:
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
env: env:
@@ -159,6 +160,7 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80" url: "http://front-end.sock-shop.svc.cluster.local:80"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
@@ -172,16 +174,16 @@ spec:
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
env: env:
@@ -230,38 +232,38 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue" url: "http://front-end.sock-shop.svc.cluster.local:80/catalogue"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 12
interval: 1 interval: 12
retry: 2 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
# set chaos interval (in sec) as desired # set chaos interval (in sec) as desired
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
value: '10' value: '10'
# pod failures without '--force' & default terminationGracePeriodSeconds # pod failures without '--force' & default terminationGracePeriodSeconds
- name: FORCE - name: FORCE
value: 'false' value: 'false'
@@ -304,37 +306,37 @@ spec:
httpProbe/inputs: httpProbe/inputs:
url: "http://front-end.sock-shop.svc.cluster.local:80/cards" url: "http://front-end.sock-shop.svc.cluster.local:80/cards"
insecureSkipVerify: false insecureSkipVerify: false
responseTimeout: 100
method: method:
get: get:
criteria: "==" criteria: "=="
responseCode: "200" responseCode: "200"
mode: "Continuous" mode: "Continuous"
runProperties: runProperties:
probeTimeout: 2 probeTimeout: 12
interval: 1 interval: 12
retry: 2 retry: 3
probePollingInterval: 1 probePollingInterval: 1
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'
- name: NETWORK_INTERFACE - name: NETWORK_INTERFACE
value: 'eth0' value: 'eth0'
- name: NETWORK_PACKET_LOSS_PERCENTAGE - name: NETWORK_PACKET_LOSS_PERCENTAGE
value: '100' value: '100'
- name: CONTAINER_RUNTIME - name: CONTAINER_RUNTIME
@@ -393,25 +395,25 @@ spec:
- name: "check-probe-success" - name: "check-probe-success"
type: "promProbe" type: "promProbe"
promProbe/inputs: promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090" endpoint: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100" query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator: comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500" value: "100"
mode: "Edge" mode: "Edge"
runProperties: runProperties:
probeTimeout: 5 probeTimeout: 2
interval: 5 interval: 1
retry: 1 retry: 2
components: components:
experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: FILL_PERCENTAGE - name: FILL_PERCENTAGE
value: '100' value: '100'
- name: TARGET_CONTAINER - name: TARGET_CONTAINER
value: '' value: ''
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '60' value: '30'
container: container:
image: litmuschaos/litmus-checker:latest image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"] args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]