refactors directory and file structure
Signed-off-by: neelanjan00 <neelanjan.manna@harness.io>
This commit is contained in:
26
faults/spring-boot/spring-boot-app-kill/engine.yaml
Normal file
26
faults/spring-boot/spring-boot-app-kill/engine.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: spring-boot-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
appinfo:
|
||||
appns: ''
|
||||
applabel: ''
|
||||
appkind: ''
|
||||
# It can be active/stop
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: spring-boot-app-kill-sa
|
||||
experiments:
|
||||
- name: spring-boot-app-kill
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# port of the spring boot application
|
||||
- name: CM_PORT
|
||||
value: ''
|
||||
|
||||
## percentage of total pods to target
|
||||
- name: PODS_AFFECTED_PERC
|
||||
value: ''
|
85
faults/spring-boot/spring-boot-app-kill/fault.yaml
Normal file
85
faults/spring-boot/spring-boot-app-kill/fault.yaml
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
It can target random pods with a Spring Boot application and allows configuring the assaults to inject app-kill
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: spring-boot-app-kill
|
||||
labels:
|
||||
name: spring-boot-app-kill
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: ci
|
||||
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"]
|
||||
# Track and get the runner, experiment, and helper pods log
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/log"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
# for creating and managing to execute commands inside target container
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/exec"]
|
||||
verbs: ["get", "list", "create"]
|
||||
# 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: "chaosnative/go-runner:ci"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name spring-boot-app-kill
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
# port of the spring boot application
|
||||
- name: CM_PORT
|
||||
value: ''
|
||||
|
||||
#it contains number of requests are to be attacked
|
||||
# n value means nth request will be affected
|
||||
- name: CM_LEVEL
|
||||
value: '1'
|
||||
|
||||
# it limits watched packages/classes/methods
|
||||
- name: CM_WATCHED_CUSTOM_SERVICES
|
||||
value: ''
|
||||
|
||||
# provide name of watcher
|
||||
# it supports controller, restController, service, repository, component, webClient
|
||||
- name: CM_WATCHERS
|
||||
value: 'restController'
|
||||
|
||||
## percentage of total pods to target
|
||||
- name: PODS_AFFECTED_PERC
|
||||
value: ''
|
||||
|
||||
## Period to wait before and after injection of chaos
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
|
||||
## it defines the sequence of chaos execution for multiple target pods
|
||||
## supported values: serial, parallel
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
labels:
|
||||
name: spring-boot-app-kill
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: ci
|
@@ -0,0 +1,27 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: spring-boot-app-kill
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Spring Boot
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: spring-boot-app-kill
|
||||
categoryDescription: |
|
||||
This experiment allows injecting Chaos Monkey app-kill assaults on Spring Boot applications, which have the [Chaos Monkey for Spring Boot](https://codecentric.github.io/chaos-monkey-spring-boot/) in their classpath.
|
||||
It can target random pods with a Spring Boot application and allows configuring the assaults to inject app-kill. It tests the resiliency of the system when some applications are having unexpected faulty behavior.
|
||||
keywords:
|
||||
- Spring Boot
|
||||
platforms:
|
||||
- GKE
|
||||
- Konvoy
|
||||
- Packet(Kubeadm)
|
||||
- Minikube
|
||||
- EKS
|
||||
maturity: alpha
|
||||
minKubeVersion: 1.12.0
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
Reference in New Issue
Block a user