Giter Site home page Giter Site logo

chaos-mesh-action's Introduction

chaos-mesh-action Chaos

FOSSA Status

chaos-mesh-action is a GitHub action that applies chaos engineering to your development workflow using Chaos Mesh. It automatically deploys the Chaos Mesh environment and injects the specified chaos experiment.

For more details on Chaos Mesh, refer to https://chaos-mesh.org/.

Usage

Step 1. Prepare chaos configuration file

Prepare the configuration file (YAML) of the failures which you expect to inject into the system, for example:

apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
 name: network-delay
 namespace: busybox
spec:
 action: delay # the specific chaos action to inject
 mode: all
 selector:
   pods:
     busybox:
       - busybox-0
 delay:
   latency: "10ms"
 duration: "5s"
 scheduler:
   cron: "@every 10s"
 direction: to
 target:
   selector:
     pods:
       busybox:
         - busybox-1
   mode: all

Step 2. Encode the chaos configuration file with base64

Obtain the base64 value of the chaos configuration file using the following command:

CFG_BASE64=`base64 chaos.yaml`

Step 3. Create the workflow

  1. Deploy the Kubernetes cluster

A Kubernetes cluster is required for the workflow. You can use Kind Cluster or Kind Action to deploy.

  1. Use chaos-mesh-action.

To create the workflow in GitHub action, use chaos-mesh/chaos-mesh-action in the yaml configuration file and configure the base64 value of the chaos configuration file. The chaos-mesh related configuration is as follows:

    - name: Run chaos mesh action
      uses: chaos-mesh/chaos-mesh-action@master
      env:
        CFG_BASE64: ${CFG_BASE64}

For the complete configuration file, see sample.

Limitation

  • Link to private K8s clusters is not supported for now.
  • Only helm 3.x is supported for now.

License

FOSSA Status

chaos-mesh-action's People

Contributors

fossabot avatar wangxiangustc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.