From 615ebd3a0ab395c1d2547da51db9a2d0e65cf60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cazeaux?= Date: Fri, 29 Apr 2022 11:27:20 +0200 Subject: [PATCH 1/9] Added charts for spring-boot-chaos experiment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Cazeaux --- charts/spring-boot/experiments.yaml | 163 ++++++++++++++++++ .../spring-boot/icons/spring-boot-chaos.png | Bin 0 -> 4010 bytes charts/spring-boot/icons/spring-boot.png | Bin 0 -> 4010 bytes .../spring-boot/spring-boot-chaos/engine.yaml | 106 ++++++++++++ .../spring-boot-chaos/experiment.yaml | 163 ++++++++++++++++++ ...spring-boot-chaos.chartserviceversion.yaml | 50 ++++++ .../spring-boot-chaos.package.yaml | 2 + .../spring-boot.chartserviceversion.yaml | 34 ++++ charts/spring-boot/spring-boot.package.yaml | 5 + 9 files changed, 523 insertions(+) create mode 100644 charts/spring-boot/experiments.yaml create mode 100644 charts/spring-boot/icons/spring-boot-chaos.png create mode 100644 charts/spring-boot/icons/spring-boot.png create mode 100644 charts/spring-boot/spring-boot-chaos/engine.yaml create mode 100644 charts/spring-boot/spring-boot-chaos/experiment.yaml create mode 100644 charts/spring-boot/spring-boot-chaos/spring-boot-chaos.chartserviceversion.yaml create mode 100644 charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml create mode 100644 charts/spring-boot/spring-boot.chartserviceversion.yaml create mode 100644 charts/spring-boot/spring-boot.package.yaml diff --git a/charts/spring-boot/experiments.yaml b/charts/spring-boot/experiments.yaml new file mode 100644 index 000000000..943ba0719 --- /dev/null +++ b/charts/spring-boot/experiments.yaml @@ -0,0 +1,163 @@ +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:ci" + 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.sayHelle + - 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 + - name: CM_KILL_APPLICATION_CRON + value: 'OFF' + + # 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 + - name: CM_MEMORY_CRON + value: 'OFF' + + # 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 + - name: CM_CPU_CRON + value: 'OFF' + + 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 diff --git a/charts/spring-boot/icons/spring-boot-chaos.png b/charts/spring-boot/icons/spring-boot-chaos.png new file mode 100644 index 0000000000000000000000000000000000000000..afd8837a66f728596b8fd3ae12fd38c339c8ffd5 GIT binary patch literal 4010 zcmV;b4^{AqP)#)`SJ4j?#tr7>-6T}?$~v= zO0?FY$>F@M(wNfb$K>$ciNI*M*rt`nc%sdUr_Yd#!fdtHqHwiCeY;n`+^?I-fS1R6 zd%9GR#B$N*#@Ol4-|g61s~NuBt*OwI!`-y#^5GFG!C(LY4%XjRnZ9%2L?2ebyqaS*}h%~)nVr)zt%j&FoOs}lf(_cP&w!v9Wf$r|o_ z)QzYK9Q^(!Skea~EeZRJI+Zn%cgMY#A+gAJ8?ugV(zUD%2=b2e3R%vj1!1qy=|flw z@3(eQAvV)IYQdy+m!^e1_9!gfy&An6VD?kz-LSBI?rbb>_3myG zt%;=!vo!vC7M2RMsaRG3K>R~=G%D>J^en7p`4yUZi=Bga?({9;zeOd%ge0hQUYjR`x$eao2u zeihesp+^``lK&H9M>*jJ?#E-1Hq*)ml5y8TZEd!NCuU>M*(!gTn_(asHvk8@ z2+V}~WapSnvsJR|25VzrY5Wex`aA&6Y53{ovr%W}FgF!89EQtS0J*=h+eKFSg|6sP z#-i+`2)hAUpA3fs{SPXtVCL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UY6LWq?t; z#mW`wCF=>IskrU(kHksY$Vi3xsM@mV}=#pCd<`MuL!6EZ}+my>0}rAL|#%FQF)P} z%E`b^kD@kLbrn?FAee1$c>Ub7!>iJu4P1X`ibnf;RLV8z3>H251ju|c3TF2c#7bKl ze^od-8Y^tL`;V`=LEGI}SVjfN0TZ`46vs}%LRr9$tHh|N z#;@v#x#Bxmag7X-HuOsh>Y(hayt>j3 zaW6}gqK>bV+XWDe_|ACaoc(Adbd5faN#v`bgRk^!|0)TX+BpifR(gYHcB&Zj(bX2wCY@-&Sv7FON+Mpj87R z2eoOf-JmsLMODJ0^&=Ao z5w`y>t~5%69n3>&R759eqobpQ!%(b{cvQ3j^!yBc294TH9Vovd)DFCE#!>tYLQxqc z2lx<=is%3piTrjDsFw{Hhu7Vc2^~B}F92#QhOa{32`MM)P}tFE(W|)5yyGd(pE|FL z8UpHCST@e6FSARwJ&Z7$&U^8gf#1_papidp?aNA{Zf9KOFull?!x@7MdYwc*+w&Xq zOu`|^P{V~jrmHzdu;ncV4kGZYueqp2{2fpB9KiN)h_;Js-`n~R|1cc<55#Bbgf6lr Q(f|Me07*qoM6N<$f)jMa$p8QV literal 0 HcmV?d00001 diff --git a/charts/spring-boot/icons/spring-boot.png b/charts/spring-boot/icons/spring-boot.png new file mode 100644 index 0000000000000000000000000000000000000000..afd8837a66f728596b8fd3ae12fd38c339c8ffd5 GIT binary patch literal 4010 zcmV;b4^{AqP)#)`SJ4j?#tr7>-6T}?$~v= zO0?FY$>F@M(wNfb$K>$ciNI*M*rt`nc%sdUr_Yd#!fdtHqHwiCeY;n`+^?I-fS1R6 zd%9GR#B$N*#@Ol4-|g61s~NuBt*OwI!`-y#^5GFG!C(LY4%XjRnZ9%2L?2ebyqaS*}h%~)nVr)zt%j&FoOs}lf(_cP&w!v9Wf$r|o_ z)QzYK9Q^(!Skea~EeZRJI+Zn%cgMY#A+gAJ8?ugV(zUD%2=b2e3R%vj1!1qy=|flw z@3(eQAvV)IYQdy+m!^e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=n9dmEYu^{pVBHUh06Azq+_q|`TuGv2jHB0s#fFc{odqYLGcBdBO`#W}P zPmjZSPF@Oe!pT>$)Lj0$5kK;`i8!KCRctrR;>KeR6o=XKr~_@zI$ZA#9^!eX2sSP3 zh+RfyuYflj!PQYzKN}kne(?_QPmOg#ylzpGPzl_*7b^5P!+5#H7zwiTfJDs`xbN)y zbU1Iz)PUPnUi0Eo6~^BmXODAJvyW_ih$&9-1=I*#xYPjvQo4jnI>!V`)UY6LWq?t; z#mW`wCF=>IskrU(kHksY$Vi3xsM@mV}=#pCd<`MuL!6EZ}+my>0}rAL|#%FQF)P} z%E`b^kD@kLbrn?FAee1$c>Ub7!>iJu4P1X`ibnf;RLV8z3>H251ju|c3TF2c#7bKl ze^od-8Y^tL`;V`=LEGI}SVjfN0TZ`46vs}%LRr9$tHh|N z#;@v#x#Bxmag7X-HuOsh>Y(hayt>j3 zaW6}gqK>bV+XWDe_|ACaoc(Adbd5faN#v`bgRk^!|0)TX+BpifR(gYHcB&Zj(bX2wCY@-&Sv7FON+Mpj87R z2eoOf-JmsLMODJ0^&=Ao z5w`y>t~5%69n3>&R759eqobpQ!%(b{cvQ3j^!yBc294TH9Vovd)DFCE#!>tYLQxqc z2lx<=is%3piTrjDsFw{Hhu7Vc2^~B}F92#QhOa{32`MM)P}tFE(W|)5yyGd(pE|FL z8UpHCST@e6FSARwJ&Z7$&U^8gf#1_papidp?aNA{Zf9KOFull?!x@7MdYwc*+w&Xq zOu`|^P{V~jrmHzdu;ncV4kGZYueqp2{2fpB9KiN)h_;Js-`n~R|1cc<55#Bbgf6lr Q(f|Me07*qoM6N<$f)jMa$p8QV literal 0 HcmV?d00001 diff --git a/charts/spring-boot/spring-boot-chaos/engine.yaml b/charts/spring-boot/spring-boot-chaos/engine.yaml new file mode 100644 index 000000000..3f1da7dba --- /dev/null +++ b/charts/spring-boot/spring-boot-chaos/engine.yaml @@ -0,0 +1,106 @@ +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-delete + spec: + components: + 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.sayHelle + - 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 + - name: CM_KILL_APPLICATION_CRON + value: 'OFF' + + # 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 + - name: CM_MEMORY_CRON + value: 'OFF' + + # 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 + - name: CM_CPU_CRON + value: 'OFF' diff --git a/charts/spring-boot/spring-boot-chaos/experiment.yaml b/charts/spring-boot/spring-boot-chaos/experiment.yaml new file mode 100644 index 000000000..943ba0719 --- /dev/null +++ b/charts/spring-boot/spring-boot-chaos/experiment.yaml @@ -0,0 +1,163 @@ +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:ci" + 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.sayHelle + - 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 + - name: CM_KILL_APPLICATION_CRON + value: 'OFF' + + # 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 + - name: CM_MEMORY_CRON + value: 'OFF' + + # 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 + - name: CM_CPU_CRON + value: 'OFF' + + 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 diff --git a/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.chartserviceversion.yaml b/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.chartserviceversion.yaml new file mode 100644 index 000000000..9cc5b8422 --- /dev/null +++ b/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.chartserviceversion.yaml @@ -0,0 +1,50 @@ +apiVersion: litmuchaos.io/v1alpha1 +kind: ChartServiceVersion +metadata: + createdAt: 2022-03-31T15:50:08Z + name: spring-boot-chaos + version: 0.1.0 + annotations: + categories: SpringBoot + chartDescription: Injects chaos on spring boot applications running on Kubernetes +spec: + displayName: spring-boot-chaos + categoryDescription: | + Spring Boot Chaos contains chaos to inject assaults on Spring Boot applications running on kubernetes. Experiments can inject assault on random pod against specified application. + - Causes application faulty behavior: exception, latency, cpu/memory consumption. + - Tests system resiliency against faulty micro-services. + + keywords: + - Kubernetes + - K8S + - Pod + - SpringBoot + platforms: + - GKE + - Konvoy + - Packet(Kubeadm) + - Minikube + - EKS + - AKS + - Kind + - Rancher + - OpenShift(OKD) + maturity: alpha + maintainers: + - name: Stephane Cazeaux + email: stephane.cazeaux@orange.com + minKubeVersion: 1.12.0 + provider: + name: Stephane Cazeaux + labels: + app.kubernetes.io/component: chartserviceversion + app.kubernetes.io/version: latest + links: + - name: Source Code + url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/spring-boot/spring-boot-chaos + - name: Chaos Monkey for Spring Boot + url: https://codecentric.github.io/chaos-monkey-spring-boot/ + icon: + - url: + mediatype: "" + chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/spring-boot/spring-boot-chaos/experiment.yaml diff --git a/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml b/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml new file mode 100644 index 000000000..d844b9abd --- /dev/null +++ b/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml @@ -0,0 +1,2 @@ +packageName: mysql +experiments: diff --git a/charts/spring-boot/spring-boot.chartserviceversion.yaml b/charts/spring-boot/spring-boot.chartserviceversion.yaml new file mode 100644 index 000000000..b6487924a --- /dev/null +++ b/charts/spring-boot/spring-boot.chartserviceversion.yaml @@ -0,0 +1,34 @@ +apiVersion: litmuchaos.io/v1alpha1 +kind: ChartServiceVersion +metadata: + createdAt: 2022-03-31T15:50:08Z + name: spring-boot-chaos + version: 0.1.0 + annotations: + categories: SpringBoot + chartDescription: Injects chaos on spring boot applications running on Kubernetes +spec: + displayName: Spring Boot + categoryDescription: > + Inject chaos on Spring Boot applications. + + experiments: + - spring-boot-chaos + keywords: + - Kubernetes + - K8S + - Pod + - SpringBoot + maintainers: + - name: stephane cazeaux + email: stephane.cazeaux@orange.com + minKubeVersion: 1.12.0 + provider: + name: Stephane Cazeaux + links: + - name: Spring Boot + url: https://spring.io/projects/spring-boot + icon: + - url: + mediatype: + chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/spring-boot/experiments.yaml diff --git a/charts/spring-boot/spring-boot.package.yaml b/charts/spring-boot/spring-boot.package.yaml new file mode 100644 index 000000000..fd38a5b56 --- /dev/null +++ b/charts/spring-boot/spring-boot.package.yaml @@ -0,0 +1,5 @@ +packageName: spring-boot +experiments: + - name: spring-boot-chaos + CSV: spring-boot-chaos.chartserviceversion.yaml + desc: "spring-boot-chaos" From ceb3fbc44c1d7e6b6667d723ff6bd6e22ade193a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cazeaux?= Date: Mon, 30 May 2022 15:42:57 +0200 Subject: [PATCH 2/9] Update charts/spring-boot/spring-boot-chaos/experiment.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Neelanjan Manna Signed-off-by: Stéphane Cazeaux --- charts/spring-boot/spring-boot-chaos/experiment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spring-boot/spring-boot-chaos/experiment.yaml b/charts/spring-boot/spring-boot-chaos/experiment.yaml index 943ba0719..951f476a1 100644 --- a/charts/spring-boot/spring-boot-chaos/experiment.yaml +++ b/charts/spring-boot/spring-boot-chaos/experiment.yaml @@ -58,7 +58,7 @@ spec: - apiGroups: [ "litmuschaos.io" ] resources: [ "chaosengines","chaosexperiments","chaosresults" ] verbs: [ "create","list","get","patch","update","delete" ] - image: "litmuschaos/go-runner:ci" + image: "litmuschaos/go-runner:latest" imagePullPolicy: Always args: - -c From d7e71060c07189053892eba7dc1c63dba36341e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cazeaux?= Date: Mon, 30 May 2022 15:43:09 +0200 Subject: [PATCH 3/9] Update charts/spring-boot/experiments.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Neelanjan Manna Signed-off-by: Stéphane Cazeaux --- charts/spring-boot/experiments.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spring-boot/experiments.yaml b/charts/spring-boot/experiments.yaml index 943ba0719..951f476a1 100644 --- a/charts/spring-boot/experiments.yaml +++ b/charts/spring-boot/experiments.yaml @@ -58,7 +58,7 @@ spec: - apiGroups: [ "litmuschaos.io" ] resources: [ "chaosengines","chaosexperiments","chaosresults" ] verbs: [ "create","list","get","patch","update","delete" ] - image: "litmuschaos/go-runner:ci" + image: "litmuschaos/go-runner:latest" imagePullPolicy: Always args: - -c From 6d33c54f3e49833d1e61bf838e9999cb4d459033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cazeaux?= Date: Mon, 30 May 2022 15:53:33 +0200 Subject: [PATCH 4/9] Spring boot chaos: Removed optional env variables from ChaosEngine Signed-off-by: Stephane Cazeaux --- .../spring-boot/spring-boot-chaos/engine.yaml | 79 +------------------ 1 file changed, 1 insertion(+), 78 deletions(-) diff --git a/charts/spring-boot/spring-boot-chaos/engine.yaml b/charts/spring-boot/spring-boot-chaos/engine.yaml index 3f1da7dba..8a4f8f4aa 100644 --- a/charts/spring-boot/spring-boot-chaos/engine.yaml +++ b/charts/spring-boot/spring-boot-chaos/engine.yaml @@ -12,7 +12,7 @@ spec: engineState: 'active' chaosServiceAccount: spring-boot-chaos-sa experiments: - - name: spring-boot-delete + - name: spring-boot-chaos spec: components: env: @@ -27,80 +27,3 @@ spec: ## 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.sayHelle - - 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 - - name: CM_KILL_APPLICATION_CRON - value: 'OFF' - - # 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 - - name: CM_MEMORY_CRON - value: 'OFF' - - # 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 - - name: CM_CPU_CRON - value: 'OFF' From d1b53c40bd35006209c9a7c62c48238b242c13eb Mon Sep 17 00:00:00 2001 From: Stephane Cazeaux Date: Tue, 7 Jun 2022 12:22:01 +0200 Subject: [PATCH 5/9] Spring boot chaos: Remove useless package file, fixed chart name Signed-off-by: Stephane Cazeaux --- .../spring-boot-chaos/spring-boot-chaos.package.yaml | 2 -- charts/spring-boot/spring-boot.chartserviceversion.yaml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml diff --git a/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml b/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml deleted file mode 100644 index d844b9abd..000000000 --- a/charts/spring-boot/spring-boot-chaos/spring-boot-chaos.package.yaml +++ /dev/null @@ -1,2 +0,0 @@ -packageName: mysql -experiments: diff --git a/charts/spring-boot/spring-boot.chartserviceversion.yaml b/charts/spring-boot/spring-boot.chartserviceversion.yaml index b6487924a..b71ba84fe 100644 --- a/charts/spring-boot/spring-boot.chartserviceversion.yaml +++ b/charts/spring-boot/spring-boot.chartserviceversion.yaml @@ -2,7 +2,7 @@ apiVersion: litmuchaos.io/v1alpha1 kind: ChartServiceVersion metadata: createdAt: 2022-03-31T15:50:08Z - name: spring-boot-chaos + name: spring-boot version: 0.1.0 annotations: categories: SpringBoot From e0f1974767d08123cc8342a754e5c347967d25bf Mon Sep 17 00:00:00 2001 From: Stephane Cazeaux Date: Tue, 7 Jun 2022 15:31:01 +0200 Subject: [PATCH 6/9] Spring boot chaos: use empty value instead of OFF as it causes an issue with yaml parsing. Signed-off-by: Stephane Cazeaux --- charts/spring-boot/experiments.yaml | 9 ++++++--- charts/spring-boot/spring-boot-chaos/experiment.yaml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/charts/spring-boot/experiments.yaml b/charts/spring-boot/experiments.yaml index 951f476a1..a40202bc5 100644 --- a/charts/spring-boot/experiments.yaml +++ b/charts/spring-boot/experiments.yaml @@ -100,8 +100,9 @@ spec: - 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: 'OFF' + value: '' # Latency assault active - name: CM_LATENCY_ACTIVE @@ -139,8 +140,9 @@ spec: - 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: 'OFF' + value: '' # CPU assault active - name: CM_CPU_ACTIVE @@ -152,8 +154,9 @@ spec: - 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: 'OFF' + value: '' labels: name: spring-boot-chaos diff --git a/charts/spring-boot/spring-boot-chaos/experiment.yaml b/charts/spring-boot/spring-boot-chaos/experiment.yaml index 951f476a1..a40202bc5 100644 --- a/charts/spring-boot/spring-boot-chaos/experiment.yaml +++ b/charts/spring-boot/spring-boot-chaos/experiment.yaml @@ -100,8 +100,9 @@ spec: - 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: 'OFF' + value: '' # Latency assault active - name: CM_LATENCY_ACTIVE @@ -139,8 +140,9 @@ spec: - 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: 'OFF' + value: '' # CPU assault active - name: CM_CPU_ACTIVE @@ -152,8 +154,9 @@ spec: - 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: 'OFF' + value: '' labels: name: spring-boot-chaos From 5ec1f898eade3588748efa1fd90e7eaac6bda973 Mon Sep 17 00:00:00 2001 From: Stephane Cazeaux Date: Wed, 8 Jun 2022 13:43:49 +0200 Subject: [PATCH 7/9] Spring boot chaos: added more parameter in engine.yaml Signed-off-by: Stephane Cazeaux --- .../spring-boot/spring-boot-chaos/engine.yaml | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/charts/spring-boot/spring-boot-chaos/engine.yaml b/charts/spring-boot/spring-boot-chaos/engine.yaml index 8a4f8f4aa..72cb53a9d 100644 --- a/charts/spring-boot/spring-boot-chaos/engine.yaml +++ b/charts/spring-boot/spring-boot-chaos/engine.yaml @@ -22,8 +22,24 @@ spec: ## 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' + # 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' From efe6400cb0ad20b6950ee2965235a5a2c5253bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cazeaux?= Date: Wed, 22 Jun 2022 09:02:52 +0200 Subject: [PATCH 8/9] Update charts/spring-boot/experiments.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Akash Shrivastava Signed-off-by: Stéphane Cazeaux --- charts/spring-boot/experiments.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spring-boot/experiments.yaml b/charts/spring-boot/experiments.yaml index a40202bc5..df10dd909 100644 --- a/charts/spring-boot/experiments.yaml +++ b/charts/spring-boot/experiments.yaml @@ -88,7 +88,7 @@ spec: value: 'true' - # Comma separated list of watched Java services. Ex: com.example.application.controller.HelloController.sayHelle + # Comma separated list of watched Java services. Ex: com.example.application.controller.HelloController.sayHello - name: CM_WATCHED_CUSTOM_SERVICES value: '' From 47e266432830ab51f71cd356258b428366dd270b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cazeaux?= Date: Wed, 22 Jun 2022 09:02:59 +0200 Subject: [PATCH 9/9] Update charts/spring-boot/spring-boot-chaos/experiment.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Akash Shrivastava Signed-off-by: Stéphane Cazeaux --- charts/spring-boot/spring-boot-chaos/experiment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spring-boot/spring-boot-chaos/experiment.yaml b/charts/spring-boot/spring-boot-chaos/experiment.yaml index a40202bc5..df10dd909 100644 --- a/charts/spring-boot/spring-boot-chaos/experiment.yaml +++ b/charts/spring-boot/spring-boot-chaos/experiment.yaml @@ -88,7 +88,7 @@ spec: value: 'true' - # Comma separated list of watched Java services. Ex: com.example.application.controller.HelloController.sayHelle + # Comma separated list of watched Java services. Ex: com.example.application.controller.HelloController.sayHello - name: CM_WATCHED_CUSTOM_SERVICES value: ''