disk-fill experiment has beem added for sock-shp workflow (#420)

Signed-off-by: oumkale <oum.kale@mayadata.io>
This commit is contained in:
OUM NIVRATHI KALE
2021-03-11 13:01:13 +05:30
committed by GitHub
parent cae35a7d1e
commit 443e010fd2
4 changed files with 301 additions and 1 deletions

View File

@@ -30,6 +30,8 @@ spec:
template: pod-delete template: pod-delete
- - name: pod-network-loss - - name: pod-network-loss
template: pod-network-loss template: pod-network-loss
- - name: disk-fill
template: disk-fill
- - name: revert-chaos - - name: revert-chaos
template: revert-chaos template: revert-chaos
# - name: delete-application # - name: delete-application
@@ -344,6 +346,80 @@ spec:
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"]
- name: disk-fill
inputs:
artifacts:
- name: disk-fill
path: /tmp/chaosengine.yaml
raw:
data: |
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: catalogue-disk-fill
namespace: {{workflow.parameters.adminModeNamespace}}
spec:
appinfo:
appns: 'sock-shop'
applabel: 'name=catalogue-db'
appkind: 'statefulset'
annotationCheck: 'false'
engineState: 'active'
chaosServiceAccount: litmus-admin
monitoring: false
jobCleanUpPolicy: 'retain'
components:
runner:
imagePullPolicy: Always
experiments:
- name: disk-fill
spec:
probe:
- name: "check-catalogue-db-cr-status"
type: "k8sProbe"
k8sProbe/inputs:
command:
group: ""
version: "v1"
resource: "pods"
namespace: "sock-shop"
fieldSelector: "status.phase=Running"
labelSelector: "name=catalogue-db"
operation: "present"
mode: "Continuous"
runProperties:
probeTimeout: 1
interval: 1
retry: 1
probePollingInterval: 1
- name: "check-benchmark"
type: "cmdProbe"
cmdProbe/inputs:
command: "curl http://qps-test.sock-shop.svc.cluster.local:80"
comparator:
type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500"
source: "inline" # it can be “inline” or any image
mode: "Edge"
runProperties:
probeTimeout: 2
interval: 2
retry: 1
initialDelaySeconds: 1
components:
env:
- name: FILL_PERCENTAGE
value: '100'
- name: TARGET_CONTAINER
value: ''
- name: TOTAL_CHAOS_DURATION
value: '60'
container:
image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
- name: delete-application - name: delete-application
container: container:
image: litmuschaos/litmus-app-deployer:latest image: litmuschaos/litmus-app-deployer:latest

View File

@@ -34,6 +34,8 @@ spec:
template: pod-delete template: pod-delete
- - name: pod-network-loss - - name: pod-network-loss
template: pod-network-loss template: pod-network-loss
- - name: disk-fill
template: disk-fill
- - name: revert-chaos - - name: revert-chaos
template: revert-chaos template: revert-chaos
# - name: delete-application # - name: delete-application
@@ -348,6 +350,80 @@ spec:
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"]
- name: disk-fill
inputs:
artifacts:
- name: disk-fill
path: /tmp/chaosengine.yaml
raw:
data: |
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: catalogue-disk-fill
namespace: {{workflow.parameters.adminModeNamespace}}
spec:
appinfo:
appns: 'sock-shop'
applabel: 'name=catalogue-db'
appkind: 'statefulset'
annotationCheck: 'false'
engineState: 'active'
chaosServiceAccount: litmus-admin
monitoring: false
jobCleanUpPolicy: 'retain'
components:
runner:
imagePullPolicy: Always
experiments:
- name: disk-fill
spec:
probe:
- name: "check-catalogue-db-cr-status"
type: "k8sProbe"
k8sProbe/inputs:
command:
group: ""
version: "v1"
resource: "pods"
namespace: "sock-shop"
fieldSelector: "status.phase=Running"
labelSelector: "name=catalogue-db"
operation: "present"
mode: "Continuous"
runProperties:
probeTimeout: 1
interval: 1
retry: 1
probePollingInterval: 1
- name: "check-benchmark"
type: "cmdProbe"
cmdProbe/inputs:
command: "curl http://qps-test.sock-shop.svc.cluster.local:80"
comparator:
type: "int" # supports: string, int, float
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
value: "500"
source: "inline" # it can be “inline” or any image
mode: "Edge"
runProperties:
probeTimeout: 2
interval: 2
retry: 1
initialDelaySeconds: 1
components:
env:
- name: FILL_PERCENTAGE
value: '100'
- name: TARGET_CONTAINER
value: ''
- name: TOTAL_CHAOS_DURATION
value: '60'
container:
image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
- name: delete-application - name: delete-application
container: container:
image: litmuschaos/litmus-app-deployer:latest image: litmuschaos/litmus-app-deployer:latest

View File

@@ -30,6 +30,8 @@ spec:
template: pod-delete template: pod-delete
- - name: pod-network-loss - - name: pod-network-loss
template: pod-network-loss template: pod-network-loss
- - name: disk-fill
template: disk-fill
- - name: revert-chaos - - name: revert-chaos
template: revert-chaos template: revert-chaos
# - name: delete-application # - name: delete-application
@@ -338,6 +340,78 @@ spec:
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"]
- name: disk-fill
inputs:
artifacts:
- name: disk-fill
path: /tmp/chaosengine.yaml
raw:
data: |
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: catalogue-disk-fill
namespace: {{workflow.parameters.adminModeNamespace}}
spec:
appinfo:
appns: 'sock-shop'
applabel: 'name=catalogue-db'
appkind: 'statefulset'
annotationCheck: 'false'
engineState: 'active'
chaosServiceAccount: litmus-admin
monitoring: false
jobCleanUpPolicy: 'retain'
components:
runner:
imagePullPolicy: Always
experiments:
- name: disk-fill
spec:
probe:
- name: "check-catalogue-db-cr-status"
type: "k8sProbe"
k8sProbe/inputs:
command:
group: ""
version: "v1"
resource: "pods"
namespace: "sock-shop"
fieldSelector: "status.phase=Running"
labelSelector: "name=catalogue-db"
operation: "present"
mode: "Continuous"
runProperties:
probeTimeout: 1
interval: 1
retry: 1
probePollingInterval: 1
- name: "check-probe-success"
type: "promProbe"
promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500"
mode: "Edge"
runProperties:
probeTimeout: 5
interval: 5
retry: 1
components:
env:
- name: FILL_PERCENTAGE
value: '100'
- name: TARGET_CONTAINER
value: ''
- name: TOTAL_CHAOS_DURATION
value: '60'
container:
image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
- name: delete-application - name: delete-application
container: container:
image: litmuschaos/litmus-app-deployer:latest image: litmuschaos/litmus-app-deployer:latest

View File

@@ -35,7 +35,9 @@ spec:
- - name: pod-delete - - name: pod-delete
template: pod-delete template: pod-delete
- - name: pod-network-loss - - name: pod-network-loss
template: pod-network-loss template: pod-network-loss
- - name: disk-fill
template: disk-fill
- - name: revert-chaos - - name: revert-chaos
template: revert-chaos template: revert-chaos
# - name: delete-application # - name: delete-application
@@ -343,6 +345,78 @@ spec:
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"]
- name: disk-fill
inputs:
artifacts:
- name: disk-fill
path: /tmp/chaosengine.yaml
raw:
data: |
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: catalogue-disk-fill
namespace: {{workflow.parameters.adminModeNamespace}}
spec:
appinfo:
appns: 'sock-shop'
applabel: 'name=catalogue-db'
appkind: 'statefulset'
annotationCheck: 'false'
engineState: 'active'
chaosServiceAccount: litmus-admin
monitoring: false
jobCleanUpPolicy: 'retain'
components:
runner:
imagePullPolicy: Always
experiments:
- name: disk-fill
spec:
probe:
- name: "check-catalogue-db-cr-status"
type: "k8sProbe"
k8sProbe/inputs:
command:
group: ""
version: "v1"
resource: "pods"
namespace: "sock-shop"
fieldSelector: "status.phase=Running"
labelSelector: "name=catalogue-db"
operation: "present"
mode: "Continuous"
runProperties:
probeTimeout: 1
interval: 1
retry: 1
probePollingInterval: 1
- name: "check-probe-success"
type: "promProbe"
promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090"
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
comparator:
criteria: ">=" #supports >=,<=,>,<,==,!= comparision
value: "500"
mode: "Edge"
runProperties:
probeTimeout: 5
interval: 5
retry: 1
components:
env:
- name: FILL_PERCENTAGE
value: '100'
- name: TARGET_CONTAINER
value: ''
- name: TOTAL_CHAOS_DURATION
value: '60'
container:
image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
- name: delete-application - name: delete-application
container: container:
image: litmuschaos/litmus-app-deployer:latest image: litmuschaos/litmus-app-deployer:latest