-
Notifications
You must be signed in to change notification settings - Fork 195
Added charts for spring-boot-chaos experiment #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cazeaux
wants to merge
9
commits into
litmuschaos:master
Choose a base branch
from
cazeaux:spring-boot-chaos
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
615ebd3
Added charts for spring-boot-chaos experiment
cazeaux ceb3fbc
Update charts/spring-boot/spring-boot-chaos/experiment.yaml
cazeaux d7e7106
Update charts/spring-boot/experiments.yaml
cazeaux 6d33c54
Spring boot chaos: Removed optional env variables from ChaosEngine
cazeaux d1b53c4
Spring boot chaos: Remove useless package file, fixed chart name
cazeaux e0f1974
Spring boot chaos: use empty value instead of OFF as it causes an iss…
cazeaux 5ec1f89
Spring boot chaos: added more parameter in engine.yaml
cazeaux efe6400
Update charts/spring-boot/experiments.yaml
cazeaux 47e2664
Update charts/spring-boot/spring-boot-chaos/experiment.yaml
cazeaux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
apiVersion: litmuschaos.io/v1alpha1 | ||
description: | ||
message: | | ||
Injects spring boot chaos monkey assault on pods belonging to an app deployment | ||
kind: ChaosExperiment | ||
metadata: | ||
name: spring-boot-chaos | ||
labels: | ||
name: spring-boot-chaos | ||
app.kubernetes.io/part-of: litmus | ||
app.kubernetes.io/component: chaosexperiment | ||
app.kubernetes.io/version: latest | ||
spec: | ||
definition: | ||
scope: Namespaced | ||
permissions: | ||
# Create and monitor the experiment & helper pods | ||
- apiGroups: [ "" ] | ||
resources: [ "pods" ] | ||
verbs: [ "create","delete","get","list","patch","update", "deletecollection" ] | ||
# Performs CRUD operations on the events inside chaosengine and chaosresult | ||
- apiGroups: [ "" ] | ||
resources: [ "events" ] | ||
verbs: [ "create","get","list","patch","update" ] | ||
# Fetch configmaps details and mount it to the experiment pod (if specified) | ||
- apiGroups: [ "" ] | ||
resources: [ "configmaps" ] | ||
verbs: [ "get","list", ] | ||
# Track and get the runner, experiment, and helper pods log | ||
- apiGroups: [ "" ] | ||
resources: [ "pods/log" ] | ||
verbs: [ "get","list","watch" ] | ||
# for creating and managing to execute comands inside target container | ||
- apiGroups: [ "" ] | ||
resources: [ "pods/exec" ] | ||
verbs: [ "get","list","create" ] | ||
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets}) | ||
- apiGroups: [ "apps" ] | ||
resources: [ "deployments","statefulsets","replicasets", "daemonsets" ] | ||
verbs: [ "list","get" ] | ||
# deriving the parent/owner details of the pod(if parent is deploymentConfig) | ||
- apiGroups: [ "apps.openshift.io" ] | ||
resources: [ "deploymentconfigs" ] | ||
verbs: [ "list","get" ] | ||
# deriving the parent/owner details of the pod(if parent is deploymentConfig) | ||
- apiGroups: [ "" ] | ||
resources: [ "replicationcontrollers" ] | ||
verbs: [ "get","list" ] | ||
# deriving the parent/owner details of the pod(if parent is argo-rollouts) | ||
- apiGroups: [ "argoproj.io" ] | ||
resources: [ "rollouts" ] | ||
verbs: [ "list","get" ] | ||
# for configuring and monitor the experiment job by the chaos-runner pod | ||
- apiGroups: [ "batch" ] | ||
resources: [ "jobs" ] | ||
verbs: [ "create","list","get","delete","deletecollection" ] | ||
# for creation, status polling and deletion of litmus chaos resources used within a chaos workflow | ||
- apiGroups: [ "litmuschaos.io" ] | ||
resources: [ "chaosengines","chaosexperiments","chaosresults" ] | ||
verbs: [ "create","list","get","patch","update","delete" ] | ||
image: "litmuschaos/go-runner:latest" | ||
imagePullPolicy: Always | ||
args: | ||
- -c | ||
- ./experiments -name spring-boot-chaos | ||
command: | ||
- /bin/bash | ||
env: | ||
- name: TOTAL_CHAOS_DURATION | ||
value: '15' | ||
|
||
## Period to wait before 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 | ||
- name: LIB | ||
value: 'litmus' | ||
|
||
# Chaos Monkey Spring Boot configuration | ||
# Level determines at which frequency the assault happens on the application. For a value N, the assaults happens every N requests | ||
- name: CM_LEVEL | ||
value: '1' | ||
|
||
# Whether the level should be used as a deterministic value (attack every x requests) or a chance (on average, 1 in x requests will be attacked) | ||
- name: CM_DETERMINISTIC | ||
value: 'true' | ||
|
||
|
||
# Comma separated list of watched Java services. Ex: com.example.application.controller.HelloController.sayHello | ||
- name: CM_WATCHED_CUSTOM_SERVICES | ||
value: '' | ||
|
||
# Comma separated list of watchers. Possible values: controller, restController, service, repository, component, restTemplate, webClient, actuatorHealth | ||
- name: CM_WATCHERS | ||
value: 'restController' | ||
|
||
# AppKiller assault active | ||
- name: CM_KILL_APPLICATIONS_ACTIVE | ||
value: 'false' | ||
# Memory cron. Cron expression like */1 * * * * ? can be set to enable chaos monkey AppKiller assault on a schedule | ||
# Warning: if disabled, leave empty (do not use "OFF" value like in chaos monkey for spring documentation) | ||
- name: CM_KILL_APPLICATION_CRON | ||
value: '' | ||
|
||
# Latency assault active | ||
- name: CM_LATENCY_ACTIVE | ||
value: 'false' | ||
# Minimum latency (ms) | ||
- name: CM_LATENCY_RANGE_START | ||
value: '500' | ||
# Maxiumu latency (ms) | ||
- name: CM_LATENCY_RANGE_END | ||
value: '500' | ||
|
||
# Exception assault active | ||
- name: CM_EXCEPTIONS_ACTIVE | ||
value: 'false' | ||
# Type of raised exception | ||
- name: CM_EXCEPTIONS_TYPE | ||
value: 'java.lang.IllegalArgumentException' | ||
# Argument of raised exception | ||
- name: CM_EXCEPTIONS_ARGUMENTS | ||
value: 'java.lang.String:custom illegal argument exception' | ||
|
||
# Memory assault active | ||
- name: CM_MEMORY_ACTIVE | ||
value: 'false' | ||
# Duration to assault memory when requested fill amount is reached in ms. | ||
- name: CM_MEMORY_MS_HOLD_FILLED_MEM | ||
value: '90000' | ||
# Time in ms between increases of memory usage. | ||
- name: CM_MEMORY_MS_NEXT_INCREASE | ||
value: '10000' | ||
# Fraction of one individual memory increase iteration. 1.0 equals 100 %. | ||
- name: CM_MEMORY_FILL_INC_FRACTION | ||
value: '1.0' | ||
# Final fraction of used memory by assault. 0.95 equals 95 %. | ||
- name: CM_MEMORY_FILL_TARGET_FRACTION | ||
value: '0.95' | ||
# Memory cron. Cron expression like */1 * * * * ? can be set to enable chaos monkey memory assault on a schedule | ||
# Warning: if disabled, leave empty (do not use "OFF" value like in chaos monkey for spring documentation) | ||
- name: CM_MEMORY_CRON | ||
value: '' | ||
|
||
# CPU assault active | ||
- name: CM_CPU_ACTIVE | ||
value: 'false' | ||
# Duration to assault cpu when requested load is reached in ms. | ||
- name: CM_CPU_MS_HOLD_LOAD | ||
value: '90000' | ||
# Final fraction of used cpu by assault. 0.95 equals 95 %. | ||
- name: CM_CPU_LOAD_TARGET_FRACTION | ||
value: '0.9' | ||
# CPU cron. Cron expression like */1 * * * * ? can be set to enable chaos monkey cpu assault on a schedule | ||
# Warning: if disabled, leave empty (do not use "OFF" value like in chaos monkey for spring documentation) | ||
- name: CM_CPU_CRON | ||
value: '' | ||
|
||
labels: | ||
name: spring-boot-chaos | ||
app.kubernetes.io/part-of: litmus | ||
app.kubernetes.io/component: experiment-job | ||
app.kubernetes.io/runtime-api-usage: "true" | ||
app.kubernetes.io/version: latest |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: litmuschaos.io/v1alpha1 | ||
kind: ChaosEngine | ||
metadata: | ||
name: spring-boot-app-chaos | ||
namespace: default | ||
spec: | ||
appinfo: | ||
appns: 'default' | ||
applabel: 'app=springboot' | ||
appkind: 'deployment' | ||
# It can be active/stop | ||
engineState: 'active' | ||
chaosServiceAccount: spring-boot-chaos-sa | ||
experiments: | ||
- name: spring-boot-chaos | ||
spec: | ||
components: | ||
env: | ||
- name: TOTAL_CHAOS_DURATION | ||
value: '15' | ||
|
||
## Period to wait before injection of chaos in sec | ||
- name: RAMP_TIME | ||
value: '' | ||
# Latency assault active | ||
- name: CM_LATENCY_ACTIVE | ||
value: 'false' | ||
# Memory assault active | ||
- name: CM_MEMORY_ACTIVE | ||
value: 'false' | ||
# Memory assault active | ||
- name: CM_CPU_ACTIVE | ||
value: 'false' | ||
# Memory assault active | ||
- name: CM_EXCEPTION_ACTIVE | ||
value: 'false' | ||
# AppKiller assault active | ||
- name: CM_KILL_APPLICATIONS_ACTIVE | ||
value: 'false' | ||
# Comma separated list of watchers. Possible values: controller, restController, service, repository, component, restTemplate, webClient, actuatorHealth | ||
- name: CM_WATCHERS | ||
value: 'restController' | ||
# Level determines at which frequency the assault happens on the application. For a value N, the assaults happens every N requests | ||
- name: CM_LEVEL | ||
value: '1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
apiVersion: litmuschaos.io/v1alpha1 | ||
description: | ||
message: | | ||
Injects spring boot chaos monkey assault on pods belonging to an app deployment | ||
kind: ChaosExperiment | ||
metadata: | ||
name: spring-boot-chaos | ||
labels: | ||
name: spring-boot-chaos | ||
app.kubernetes.io/part-of: litmus | ||
app.kubernetes.io/component: chaosexperiment | ||
app.kubernetes.io/version: latest | ||
spec: | ||
definition: | ||
scope: Namespaced | ||
permissions: | ||
# Create and monitor the experiment & helper pods | ||
- apiGroups: [ "" ] | ||
resources: [ "pods" ] | ||
verbs: [ "create","delete","get","list","patch","update", "deletecollection" ] | ||
# Performs CRUD operations on the events inside chaosengine and chaosresult | ||
- apiGroups: [ "" ] | ||
resources: [ "events" ] | ||
verbs: [ "create","get","list","patch","update" ] | ||
# Fetch configmaps details and mount it to the experiment pod (if specified) | ||
- apiGroups: [ "" ] | ||
resources: [ "configmaps" ] | ||
verbs: [ "get","list", ] | ||
# Track and get the runner, experiment, and helper pods log | ||
- apiGroups: [ "" ] | ||
resources: [ "pods/log" ] | ||
verbs: [ "get","list","watch" ] | ||
# for creating and managing to execute comands inside target container | ||
- apiGroups: [ "" ] | ||
resources: [ "pods/exec" ] | ||
verbs: [ "get","list","create" ] | ||
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets}) | ||
- apiGroups: [ "apps" ] | ||
resources: [ "deployments","statefulsets","replicasets", "daemonsets" ] | ||
verbs: [ "list","get" ] | ||
# deriving the parent/owner details of the pod(if parent is deploymentConfig) | ||
- apiGroups: [ "apps.openshift.io" ] | ||
resources: [ "deploymentconfigs" ] | ||
verbs: [ "list","get" ] | ||
# deriving the parent/owner details of the pod(if parent is deploymentConfig) | ||
- apiGroups: [ "" ] | ||
resources: [ "replicationcontrollers" ] | ||
verbs: [ "get","list" ] | ||
# deriving the parent/owner details of the pod(if parent is argo-rollouts) | ||
- apiGroups: [ "argoproj.io" ] | ||
resources: [ "rollouts" ] | ||
verbs: [ "list","get" ] | ||
# for configuring and monitor the experiment job by the chaos-runner pod | ||
- apiGroups: [ "batch" ] | ||
resources: [ "jobs" ] | ||
verbs: [ "create","list","get","delete","deletecollection" ] | ||
# for creation, status polling and deletion of litmus chaos resources used within a chaos workflow | ||
- apiGroups: [ "litmuschaos.io" ] | ||
resources: [ "chaosengines","chaosexperiments","chaosresults" ] | ||
verbs: [ "create","list","get","patch","update","delete" ] | ||
image: "litmuschaos/go-runner:latest" | ||
imagePullPolicy: Always | ||
args: | ||
- -c | ||
- ./experiments -name spring-boot-chaos | ||
command: | ||
- /bin/bash | ||
env: | ||
- name: TOTAL_CHAOS_DURATION | ||
value: '15' | ||
|
||
## Period to wait before 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 | ||
- name: LIB | ||
value: 'litmus' | ||
|
||
# Chaos Monkey Spring Boot configuration | ||
# Level determines at which frequency the assault happens on the application. For a value N, the assaults happens every N requests | ||
cazeaux marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: CM_LEVEL | ||
value: '1' | ||
|
||
# Whether the level should be used as a deterministic value (attack every x requests) or a chance (on average, 1 in x requests will be attacked) | ||
- name: CM_DETERMINISTIC | ||
value: 'true' | ||
|
||
|
||
# Comma separated list of watched Java services. Ex: com.example.application.controller.HelloController.sayHello | ||
- name: CM_WATCHED_CUSTOM_SERVICES | ||
value: '' | ||
|
||
# Comma separated list of watchers. Possible values: controller, restController, service, repository, component, restTemplate, webClient, actuatorHealth | ||
- name: CM_WATCHERS | ||
value: 'restController' | ||
|
||
# AppKiller assault active | ||
- name: CM_KILL_APPLICATIONS_ACTIVE | ||
value: 'false' | ||
# Memory cron. Cron expression like */1 * * * * ? can be set to enable chaos monkey AppKiller assault on a schedule | ||
# Warning: if disabled, leave empty (do not use "OFF" value like in chaos monkey for spring documentation) | ||
- name: CM_KILL_APPLICATION_CRON | ||
value: '' | ||
|
||
# Latency assault active | ||
- name: CM_LATENCY_ACTIVE | ||
value: 'false' | ||
# Minimum latency (ms) | ||
- name: CM_LATENCY_RANGE_START | ||
value: '500' | ||
# Maxiumu latency (ms) | ||
- name: CM_LATENCY_RANGE_END | ||
value: '500' | ||
|
||
# Exception assault active | ||
- name: CM_EXCEPTIONS_ACTIVE | ||
value: 'false' | ||
# Type of raised exception | ||
- name: CM_EXCEPTIONS_TYPE | ||
value: 'java.lang.IllegalArgumentException' | ||
# Argument of raised exception | ||
- name: CM_EXCEPTIONS_ARGUMENTS | ||
value: 'java.lang.String:custom illegal argument exception' | ||
|
||
# Memory assault active | ||
- name: CM_MEMORY_ACTIVE | ||
value: 'false' | ||
# Duration to assault memory when requested fill amount is reached in ms. | ||
- name: CM_MEMORY_MS_HOLD_FILLED_MEM | ||
value: '90000' | ||
# Time in ms between increases of memory usage. | ||
- name: CM_MEMORY_MS_NEXT_INCREASE | ||
value: '10000' | ||
# Fraction of one individual memory increase iteration. 1.0 equals 100 %. | ||
- name: CM_MEMORY_FILL_INC_FRACTION | ||
value: '1.0' | ||
# Final fraction of used memory by assault. 0.95 equals 95 %. | ||
- name: CM_MEMORY_FILL_TARGET_FRACTION | ||
value: '0.95' | ||
# Memory cron. Cron expression like */1 * * * * ? can be set to enable chaos monkey memory assault on a schedule | ||
# Warning: if disabled, leave empty (do not use "OFF" value like in chaos monkey for spring documentation) | ||
- name: CM_MEMORY_CRON | ||
value: '' | ||
|
||
# CPU assault active | ||
- name: CM_CPU_ACTIVE | ||
value: 'false' | ||
# Duration to assault cpu when requested load is reached in ms. | ||
- name: CM_CPU_MS_HOLD_LOAD | ||
value: '90000' | ||
# Final fraction of used cpu by assault. 0.95 equals 95 %. | ||
- name: CM_CPU_LOAD_TARGET_FRACTION | ||
value: '0.9' | ||
# CPU cron. Cron expression like */1 * * * * ? can be set to enable chaos monkey cpu assault on a schedule | ||
# Warning: if disabled, leave empty (do not use "OFF" value like in chaos monkey for spring documentation) | ||
- name: CM_CPU_CRON | ||
value: '' | ||
|
||
labels: | ||
name: spring-boot-chaos | ||
app.kubernetes.io/part-of: litmus | ||
app.kubernetes.io/component: experiment-job | ||
app.kubernetes.io/runtime-api-usage: "true" | ||
app.kubernetes.io/version: latest |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.