Skip to content

Commit bb63f05

Browse files
Jonsy13uditgaurav
andauthored
Cherry-Pick for v0.4.0 (#21)
* Chore(actions): Update GitHub Chaos Actions Name (#18) Signed-off-by: udit <[email protected]> Co-authored-by: udit <[email protected]> * Chore(update): update github actions and add e2e tests (#19) Signed-off-by: uditgaurav <[email protected]> * Chore(update): Update Github Chaos Actions (#20) * Chore(update): Update Github Chaos Actions Signed-off-by: uditgaurav <[email protected]> * Update test.yml * Updated the version for chaos-action. Signed-off-by: Jonsy13 <[email protected]> * Fixed the app deployment in workflow. Signed-off-by: Jonsy13 <[email protected]> * updated the tag to master in e2e workflow. Signed-off-by: Jonsy13 <[email protected]> Co-authored-by: Udit Gaurav <[email protected]> Co-authored-by: udit <[email protected]>
1 parent 6a61d31 commit bb63f05

File tree

17 files changed

+294
-128
lines changed

17 files changed

+294
-128
lines changed

.github/workflows/test.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
name: Running-E2E
2+
on:
3+
pull_request:
4+
branches: [v0.4.x]
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches: [v0.4.x]
8+
workflow_dispatch:
9+
10+
jobs:
11+
Tests:
12+
runs-on: ubuntu-18.04
13+
steps:
14+
15+
- name: Installing Prerequisites (KinD Cluster)
16+
uses: engineerd/[email protected]
17+
with:
18+
version: "v0.7.0"
19+
20+
- name: Configuring and testing the Installation
21+
run: |
22+
kubectl cluster-info --context kind-kind
23+
kind get kubeconfig --internal >$HOME/.kube/config
24+
kubectl get nodes
25+
26+
- name: Deploy a sample application for chaos injection
27+
run: |
28+
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/chaos-ci-lib/master/app/nginx.yml
29+
kubectl wait --for=condition=Ready pods --all --namespace default --timeout=60s
30+
31+
- name: Setting up kubeconfig ENV for Github Chaos Action
32+
run: echo ::set-env name=KUBE_CONFIG_DATA::$(base64 -w 0 ~/.kube/config)
33+
env:
34+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
35+
36+
- name: Setup Litmus
37+
uses: litmuschaos/github-chaos-actions@master
38+
env:
39+
INSTALL_LITMUS: true
40+
41+
- name: Running Litmus pod delete chaos experiment
42+
uses: litmuschaos/github-chaos-actions@master
43+
env:
44+
EXPERIMENT_NAME: pod-delete
45+
EXPERIMENT_IMAGE: litmuschaos/go-runner
46+
EXPERIMENT_IMAGE_TAG: ci
47+
JOB_CLEANUP_POLICY: delete
48+
49+
- name: Running container kill chaos experiment
50+
uses: litmuschaos/github-chaos-actions@master
51+
env:
52+
EXPERIMENT_NAME: container-kill
53+
EXPERIMENT_IMAGE: litmuschaos/go-runner
54+
EXPERIMENT_IMAGE_TAG: ci
55+
JOB_CLEANUP_POLICY: delete
56+
CONTAINER_RUNTIME: containerd
57+
58+
- name: Running node-cpu-hog chaos experiment
59+
uses: litmuschaos/github-chaos-actions@master
60+
env:
61+
EXPERIMENT_NAME: node-cpu-hog
62+
EXPERIMENT_IMAGE: litmuschaos/go-runner
63+
EXPERIMENT_IMAGE_TAG: ci
64+
JOB_CLEANUP_POLICY: delete
65+
66+
67+
- name: Running node-memory-hog chaos experiment
68+
uses: litmuschaos/github-chaos-actions@master
69+
env:
70+
EXPERIMENT_NAME: node-memory-hog
71+
EXPERIMENT_IMAGE: litmuschaos/go-runner
72+
EXPERIMENT_IMAGE_TAG: ci
73+
JOB_CLEANUP_POLICY: delete
74+
75+
- name: Running pod-cpu-hog chaos experiment
76+
uses: litmuschaos/github-chaos-actions@master
77+
env:
78+
EXPERIMENT_NAME: pod-cpu-hog
79+
EXPERIMENT_IMAGE: litmuschaos/go-runner
80+
EXPERIMENT_IMAGE_TAG: ci
81+
JOB_CLEANUP_POLICY: delete
82+
TARGET_CONTAINER: nginx
83+
TOTAL_CHAOS_DURATION: 60
84+
CPU_CORES: 1
85+
86+
- name: Running pod-memory-hog chaos experiment
87+
uses: litmuschaos/github-chaos-actions@master
88+
env:
89+
EXPERIMENT_NAME: pod-memory-hog
90+
EXPERIMENT_IMAGE: litmuschaos/go-runner
91+
EXPERIMENT_IMAGE_TAG: ci
92+
JOB_CLEANUP_POLICY: delete
93+
TARGET_CONTAINER: nginx
94+
TOTAL_CHAOS_DURATION: 60
95+
MEMORY_CONSUMPTION: 500
96+
97+
- name: Running pod network corruption chaos experiment
98+
uses: litmuschaos/github-chaos-actions@master
99+
env:
100+
EXPERIMENT_NAME: pod-network-corruption
101+
EXPERIMENT_IMAGE: litmuschaos/go-runner
102+
EXPERIMENT_IMAGE_TAG: ci
103+
JOB_CLEANUP_POLICY: delete
104+
TARGET_CONTAINER: nginx
105+
TOTAL_CHAOS_DURATION: 60
106+
NETWORK_INTERFACE: eth0
107+
CONTAINER_RUNTIME: containerd
108+
109+
- name: Running pod network duplication chaos experiment
110+
uses: litmuschaos/github-chaos-actions@master
111+
env:
112+
EXPERIMENT_NAME: pod-network-duplication
113+
EXPERIMENT_IMAGE: litmuschaos/go-runner
114+
EXPERIMENT_IMAGE_TAG: ci
115+
JOB_CLEANUP_POLICY: delete
116+
TARGET_CONTAINER: nginx
117+
TOTAL_CHAOS_DURATION: 60
118+
NETWORK_INTERFACE: eth0
119+
CONTAINER_RUNTIME: containerd
120+
121+
- name: Running pod-network-latency chaos experiment
122+
uses: litmuschaos/github-chaos-actions@master
123+
env:
124+
EXPERIMENT_NAME: pod-network-latency
125+
EXPERIMENT_IMAGE: litmuschaos/go-runner
126+
EXPERIMENT_IMAGE_TAG: ci
127+
JOB_CLEANUP_POLICY: delete
128+
TARGET_CONTAINER: nginx
129+
TOTAL_CHAOS_DURATION: 60
130+
NETWORK_INTERFACE: eth0
131+
NETWORK_LATENCY: 60000
132+
CONTAINER_RUNTIME: containerd
133+
134+
- name: Running pod-network-loss chaos experiment
135+
uses: litmuschaos/github-chaos-actions@master
136+
env:
137+
EXPERIMENT_NAME: pod-network-loss
138+
EXPERIMENT_IMAGE: litmuschaos/go-runner
139+
EXPERIMENT_IMAGE_TAG: ci
140+
JOB_CLEANUP_POLICY: delete
141+
TARGET_CONTAINER: nginx
142+
TOTAL_CHAOS_DURATION: 60
143+
NETWORK_INTERFACE: eth0
144+
NETWORK_PACKET_LOSS_PERCENTAGE: 100
145+
CONTAINER_RUNTIME: containerd
146+
147+
- name: Running pod autoscaler chaos experiment
148+
uses: litmuschaos/github-chaos-actions@master
149+
env:
150+
EXPERIMENT_NAME: pod-autoscaler
151+
EXPERIMENT_IMAGE: litmuschaos/go-runner
152+
EXPERIMENT_IMAGE_TAG: ci
153+
JOB_CLEANUP_POLICY: delete
154+
TOTAL_CHAOS_DURATION: 60
155+
156+
- name: Running node-io-stress chaos experiment
157+
uses: litmuschaos/github-chaos-actions@master
158+
env:
159+
EXPERIMENT_NAME: node-io-stress
160+
EXPERIMENT_IMAGE: litmuschaos/go-runner
161+
EXPERIMENT_IMAGE_TAG: ci
162+
JOB_CLEANUP_POLICY: delete
163+
TOTAL_CHAOS_DURATION: 120
164+
FILESYSTEM_UTILIZATION_PERCENTAGE: 10
165+
166+
- name: Uninstall Litmus
167+
uses: litmuschaos/github-chaos-actions@master
168+
env:
169+
LITMUS_CLEANUP: true
170+
171+
- name: Deleting KinD cluster
172+
if: ${{ always() }}
173+
run: kind delete cluster

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM golang:latest
22

33
LABEL name="Kubernetes Chaos"
4-
LABEL repository="http://github.com/mayadata-io/github-chaos-actions"
5-
LABEL homepage="http://github.com/mayadata-io/github-chaos-actions"
4+
LABEL repository="http://github.com/litmuschaos/github-chaos-actions"
5+
LABEL homepage="http://github.com/litmuschaos/github-chaos-actions"
66

77
LABEL maintainer="LitmusChaos"
88
LABEL com.github.actions.name="Kubernetes Chaos"

0 commit comments

Comments
 (0)