forked from litmuschaos/github-chaos-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore(update): update github actions and add e2e tests (litmuschaos#19)
Signed-off-by: uditgaurav <[email protected]>
- Loading branch information
1 parent
4cd689d
commit d4886fa
Showing
16 changed files
with
192 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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,177 @@ | ||
name: Running-E2E | ||
on: | ||
pull_request: | ||
branches: [master] | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Installing Prerequisites (KinD Cluster) | ||
uses: engineerd/[email protected] | ||
with: | ||
version: "v0.7.0" | ||
|
||
- name: Configuring and testing the Installation | ||
run: | | ||
kubectl cluster-info --context kind-kind | ||
kind get kubeconfig --internal >$HOME/.kube/config | ||
kubectl get nodes | ||
- name: Load image on the nodes of the cluster | ||
run: | | ||
kind load docker-image --name=kind litmuschaos/go-runner:ci | ||
- name: Deploy a sample application for chaos injection | ||
run: | | ||
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/chaos-ci-lib/master/app/nginx.yml | ||
kubectl wait --for=condition=Ready pods --all --namespace default --timeout=60s | ||
- name: Setting up kubeconfig ENV for Github Chaos Action | ||
run: echo ::set-env name=KUBE_CONFIG_DATA::$(base64 -w 0 ~/.kube/config) | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
|
||
- name: Setup Litmus | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
INSTALL_LITMUS: true | ||
|
||
- name: Running Litmus pod delete chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-delete | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
|
||
- name: Running container kill chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: container-kill | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
CONTAINER_RUNTIME: containerd | ||
|
||
- name: Running node-cpu-hog chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: node-cpu-hog | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
|
||
|
||
- name: Running node-memory-hog chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: node-memory-hog | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
|
||
- name: Running pod-cpu-hog chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-cpu-hog | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TARGET_CONTAINER: nginx | ||
TOTAL_CHAOS_DURATION: 60 | ||
CPU_CORES: 1 | ||
|
||
- name: Running pod-memory-hog chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-cpu-hog | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TARGET_CONTAINER: nginx | ||
TOTAL_CHAOS_DURATION: 60 | ||
MEMORY_CONSUMPTION: 500 | ||
|
||
- name: Running pod network corruption chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-network-corruption | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TARGET_CONTAINER: nginx | ||
TOTAL_CHAOS_DURATION: 60 | ||
NETWORK_INTERFACE: eth0 | ||
CONTAINER_RUNTIME: containerd | ||
|
||
- name: Running pod network duplication chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-network-duplication | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TARGET_CONTAINER: nginx | ||
TOTAL_CHAOS_DURATION: 60 | ||
NETWORK_INTERFACE: eth0 | ||
CONTAINER_RUNTIME: containerd | ||
|
||
- name: Running pod-network-latency chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-network-latency | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TARGET_CONTAINER: nginx | ||
TOTAL_CHAOS_DURATION: 60 | ||
NETWORK_INTERFACE: eth0 | ||
NETWORK_LATENCY: 60000 | ||
CONTAINER_RUNTIME: containerd | ||
|
||
- name: Running pod-network-loss chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-network-loss | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TARGET_CONTAINER: nginx | ||
TOTAL_CHAOS_DURATION: 60 | ||
NETWORK_INTERFACE: eth0 | ||
NETWORK_PACKET_LOSS_PERCENTAGE: 100 | ||
CONTAINER_RUNTIME: containerd | ||
|
||
- name: Running pod autoscaler chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: pod-autoscaler | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TOTAL_CHAOS_DURATION: 60 | ||
|
||
- name: Running node-io-stress chaos experiment | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
EXPERIMENT_NAME: node-io-stress | ||
EXPERIMENT_IMAGE: litmuschaos/go-runner | ||
EXPERIMENT_IMAGE_TAG: ci | ||
JOB_CLEANUP_POLICY: delete | ||
TOTAL_CHAOS_DURATION: 120 | ||
FILESYSTEM_UTILIZATION_PERCENTAGE: 10 | ||
|
||
- name: Uninstall Litmus | ||
uses: litmuschaos/github-chaos-actions@master | ||
env: | ||
LITMUS_CLEANUP: true | ||
|
||
- name: Deleting KinD cluster | ||
if: ${{ always() }} | ||
run: kind delete cluster |
This file contains 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 |
---|---|---|
|
@@ -68,7 +68,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running Litmus pod delete chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
##Pass kubeconfig data from secret in base 64 encoded form | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
|
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running container kill chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running disk-fill chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running node-cpu-hog chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running node-io-stress chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##if litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running node-memory-hog chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##if litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod autoscaler chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod-cpu-hog chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod delete chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod-memory-hog chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod network corruption chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod network duplication chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod-network-latency chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
#If litmus is not installed | ||
|
This file contains 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
- name: Running pod-network-loss chaos experiment | ||
uses: litmuschaos/[email protected].0 | ||
uses: litmuschaos/[email protected].1 | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
##If litmus is not installed | ||
|