chore(new_experiment): Add charts for disk io stress experiment (#318)
Signed-off-by: Udit Gaurav <udit.gaurav@mayadata.io>
This commit is contained in:
@@ -32,6 +32,7 @@ spec:
|
|||||||
- pod-autoscaler
|
- pod-autoscaler
|
||||||
- k8-pod-delete
|
- k8-pod-delete
|
||||||
- k8-service-kill
|
- k8-service-kill
|
||||||
|
- node-io-stress
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
- Kubernetes
|
- Kubernetes
|
||||||
@@ -39,6 +40,8 @@ spec:
|
|||||||
- Node
|
- Node
|
||||||
- Pod
|
- Pod
|
||||||
- Disk
|
- Disk
|
||||||
|
- IO
|
||||||
|
- Filesystem
|
||||||
- Network
|
- Network
|
||||||
- CPU
|
- CPU
|
||||||
- Memory
|
- Memory
|
||||||
|
@@ -57,3 +57,6 @@ experiments:
|
|||||||
- name: k8-service-kill
|
- name: k8-service-kill
|
||||||
CSV: k8-service-kill.chartserviceversion.yaml
|
CSV: k8-service-kill.chartserviceversion.yaml
|
||||||
desc: "k8-service-kill"
|
desc: "k8-service-kill"
|
||||||
|
- name: node-io-stress
|
||||||
|
CSV: node-io-stress.chartserviceversion.yaml
|
||||||
|
desc: "node-io-stress"
|
||||||
|
BIN
charts/generic/icons/node-io-stress.png
Normal file
BIN
charts/generic/icons/node-io-stress.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
36
charts/generic/node-io-stress/engine.yaml
Normal file
36
charts/generic/node-io-stress/engine.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be true/false
|
||||||
|
annotationCheck: 'false'
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
appinfo:
|
||||||
|
appns: 'default'
|
||||||
|
applabel: 'app=nginx'
|
||||||
|
appkind: 'deployment'
|
||||||
|
chaosServiceAccount: node-io-stress-sa
|
||||||
|
monitoring: false
|
||||||
|
# It can be delete/retain
|
||||||
|
jobCleanUpPolicy: 'delete'
|
||||||
|
experiments:
|
||||||
|
- name: node-io-stress
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '120'
|
||||||
|
|
||||||
|
## specify the size as percentage of free space on the file system
|
||||||
|
- name: FILESSYSTEM_UTILIZATION_PERCENTAGE
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
## enter the name of the desired node
|
||||||
|
- name: APP_NODE
|
||||||
|
value: ''
|
83
charts/generic/node-io-stress/experiment.yaml
Normal file
83
charts/generic/node-io-stress/experiment.yaml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Give a memory hog on a node belonging to a deployment
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: node-io-stress
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Cluster
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "batch"
|
||||||
|
- "apps"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "pods/log"
|
||||||
|
- "events"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- "nodes"
|
||||||
|
verbs:
|
||||||
|
- "get"
|
||||||
|
- "list"
|
||||||
|
image: "litmuschaos/go-runner:latest"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ./experiments/node-io-stress
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '120'
|
||||||
|
|
||||||
|
## specify the size as percentage of free space on the file system
|
||||||
|
## default value 90 (in percentage)
|
||||||
|
- name: FILESSYSTEM_UTILIZATION_PERCENTAGE
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
## we can specify the size in Gigabyte (Gb) also in place of percentage of free space
|
||||||
|
## NOTE: for selecting this option FILESSYSTEM_UTILIZATION_PERCENTAGE should be empty
|
||||||
|
- name: FILESSYSTEM_UTILIZATION_BYTES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
## Total number of workers default value is 4
|
||||||
|
- name: NUMBER_OF_WORKERS
|
||||||
|
value: '4'
|
||||||
|
|
||||||
|
## enter the name of the desired node
|
||||||
|
- name: APP_NODE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the LIB here
|
||||||
|
# Only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
# provide lib image
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: node-io-stress
|
@@ -0,0 +1,46 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2020-09-12T10:28:08Z
|
||||||
|
name:
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.kubernetes.io/
|
||||||
|
spec:
|
||||||
|
displayName:
|
||||||
|
categoryDescription: |
|
||||||
|
This experiment causes disk stress on the Kubernetes node. The experiment aims to verify the resiliency of applications that share this disk resource for ephemeral or persistent storage purposes..
|
||||||
|
- Disk stress on a particular node filesystem where the application deployment is available.
|
||||||
|
- The amount of disk stress can be either specifed as the size in percentage of the total free space on the file system or simply in Gigabytes(Gb)
|
||||||
|
- After the test, the recovery should be manual for the application pod and node in case they are not in an appropriate state.
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- Disk
|
||||||
|
- IO
|
||||||
|
- Filesystem
|
||||||
|
- State
|
||||||
|
- Node
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
- EKS
|
||||||
|
maturity: alpha
|
||||||
|
chaosType: infra
|
||||||
|
maintainers:
|
||||||
|
- name: Udit Gaurav
|
||||||
|
email: udit.gaurav@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
links:
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.litmuschaos.io/docs//
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
icon:
|
||||||
|
- url: ""
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic//experiment.yaml
|
37
charts/generic/node-io-stress/rbac.yaml
Normal file
37
charts/generic/node-io-stress/rbac.yaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: node-io-stress-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: node-io-stress-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: node-io-stress-sa
|
||||||
|
labels:
|
||||||
|
name: node-io-stress-sa
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
||||||
|
resources: ["pods","jobs","pods/log","events","chaosengines","chaosexperiments","chaosresults"]
|
||||||
|
verbs: ["create","list","get","patch","update","delete"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: node-io-stress-sa
|
||||||
|
labels:
|
||||||
|
name: node-io-stress-sa
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: node-io-stress-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: node-io-stress-sa
|
||||||
|
namespace: default
|
Reference in New Issue
Block a user