67 lines
1.6 KiB
YAML
67 lines
1.6 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
|
|
version: 0.1.1
|
|
spec:
|
|
definition:
|
|
scope: Namespaced
|
|
permissions:
|
|
- apiGroups:
|
|
- ""
|
|
- "batch"
|
|
- "litmuschaos.io"
|
|
resources:
|
|
- "jobs"
|
|
- "pods"
|
|
- "pods/log"
|
|
- "events"
|
|
- "chaosengines"
|
|
- "chaosexperiments"
|
|
- "chaosresults"
|
|
verbs:
|
|
- "create"
|
|
- "list"
|
|
- "get"
|
|
- "patch"
|
|
- "update"
|
|
- "delete"
|
|
image: "litmuschaos/ansible-runner:latest"
|
|
imagePullPolicy: Always
|
|
args:
|
|
- -c
|
|
- ansible-playbook ./experiments/generic/pod_memory_hog/pod_memory_hog_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
command:
|
|
- /bin/bash
|
|
env:
|
|
- name: ANSIBLE_STDOUT_CALLBACK
|
|
value: 'default'
|
|
|
|
# Provide name of target container
|
|
# where chaos has to be injected
|
|
- name: TARGET_CONTAINER
|
|
value: ''
|
|
|
|
# Enter the amount of memory in megabytes to be consumed by the application pod
|
|
# default: 500 (Megabytes)
|
|
- name: MEMORY_CONSUMPTION
|
|
value: '500'
|
|
|
|
- name: TOTAL_CHAOS_DURATION
|
|
value: '60' # in seconds
|
|
|
|
# Period to wait before and after injection of chaos in sec
|
|
- name: RAMP_TIME
|
|
value: ''
|
|
|
|
- name: LIB
|
|
value: 'litmus'
|
|
|
|
- name: LIB_IMAGE
|
|
value: 'litmuschaos/app-memory-stress:latest'
|
|
labels:
|
|
name: pod-memory-hog
|