89 lines
2.2 KiB
YAML
89 lines
2.2 KiB
YAML
---
|
|
apiVersion: litmuschaos.io/v1alpha1
|
|
description:
|
|
message: |
|
|
Injects memory consumption on pods belonging to an app deployment
|
|
kind: ChaosExperiment
|
|
metadata:
|
|
name: pod-memory-hog
|
|
labels:
|
|
name: pod-memory-hog
|
|
app.kubernetes.io/part-of: litmus
|
|
app.kubernetes.io/component: chaosexperiment
|
|
app.kubernetes.io/version: latest
|
|
spec:
|
|
definition:
|
|
scope: Namespaced
|
|
permissions:
|
|
- apiGroups:
|
|
- ""
|
|
- "batch"
|
|
- "litmuschaos.io"
|
|
resources:
|
|
- "jobs"
|
|
- "pods"
|
|
- "pods/log"
|
|
- "pods/exec"
|
|
- "events"
|
|
- "chaosengines"
|
|
- "chaosexperiments"
|
|
- "chaosresults"
|
|
verbs:
|
|
- "create"
|
|
- "list"
|
|
- "get"
|
|
- "patch"
|
|
- "update"
|
|
- "delete"
|
|
- "deletecollection"
|
|
image: "litmuschaos/go-runner:latest"
|
|
args:
|
|
- -c
|
|
- ./experiments -name pod-memory-hog
|
|
command:
|
|
- /bin/bash
|
|
env:
|
|
- name: TOTAL_CHAOS_DURATION
|
|
value: '60'
|
|
|
|
- name: CHAOS_INTERVAL
|
|
value: '10'
|
|
|
|
## enter the amount of memory in megabytes to be consumed by the application pod
|
|
- name: MEMORY_CONSUMPTION
|
|
value: '500'
|
|
|
|
## percentage of total pods to target
|
|
- name: PODS_AFFECTED_PERC
|
|
value: ''
|
|
|
|
## Period to wait before and after injection of chaos in sec
|
|
- name: RAMP_TIME
|
|
value: ''
|
|
|
|
## env var that describes the library used to execute the chaos
|
|
## default: litmus. Supported values: litmus, pumba
|
|
- name: LIB
|
|
value: 'litmus'
|
|
|
|
## It is used in pumba lib only
|
|
- name: LIB_IMAGE
|
|
value: 'gaiaadm/pumba'
|
|
|
|
- name: CHAOS_KILL_COMMAND
|
|
value: "kill -9 $(ps afx | grep \"[dd] if /dev/zero\" | awk '{print $1}' | tr '\n' ' ')"
|
|
|
|
## it defines the sequence of chaos execution for multiple target pods
|
|
## supported values: serial, parallel
|
|
- name: SEQUENCE
|
|
value: 'parallel'
|
|
|
|
- name: TARGET_PODS
|
|
value: ''
|
|
|
|
labels:
|
|
name: pod-memory-hog
|
|
app.kubernetes.io/part-of: litmus
|
|
app.kubernetes.io/component: experiment-job
|
|
app.kubernetes.io/version: latest
|