(chore) add workflows to chaos-charts repo (#281)

Signed-off-by: ksatchit <karthik.s@mayadata.io>
This commit is contained in:
Karthik Satchitanand
2020-08-05 04:35:34 +05:30
committed by GitHub
parent 2fb1c27c89
commit e4068f6fc0
2 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
## Refer to https://github.com/litmuschaos/chaos-workflows.git to setup the argo infrastructure
## Uses admin mode of litmus execution
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: node-cpu-cron-wf
spec:
schedule: "5/10 * * * *"
concurrencyPolicy: "Forbid"
startingDeadlineSeconds: 0
workflowSpec:
entrypoint: argowf-chaos
serviceAccountName: argo-chaos
templates:
- name: argowf-chaos
steps:
- - name: run-node-cpu-hog
template: run-node-cpu-hog
- name: run-node-cpu-hog
inputs:
artifacts:
- name: run-node-cpu-hog
path: /tmp/chaosengine-1.yaml
raw:
data: |
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: node-cpu-hog
namespace: litmus
spec:
appinfo:
appns: kube-system
applabel: "k8s-app=kube-proxy"
appkind: daemonset
jobCleanUpPolicy: retain
monitoring: true
annotationCheck: 'false'
engineState: 'active'
chaosServiceAccount: litmus-admin
experiments:
- name: node-cpu-hog
spec:
components:
env:
- name: TOTAL_CHAOS_DURATION
value: "60"
- name: NODE_CPU_CORE
value: ""
container:
image: lachlanevenson/k8s-kubectl
command: [sh, -c]
args: ['kubectl apply -f /tmp/chaosengine-1.yaml -n litmus']