litmus Documentation

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub ( Community notes is at

RAW Doc

Technical Documentation: litmuschaos/litmus

ℹ️ Provenance: Multi-Tier Ingestion · CodeWiki Reference

Overview (`README.md`)

[LitmusChaos](https://litmuschaos.io/)

Open Source Chaos Engineering Platform







*Read this in [other languages](translations/TRANSLATIONS.md).*

🇰🇷 🇨🇳 🇧🇷 🇮🇳 🇪🇸

Overview

LitmusChaos is an open source Chaos Engineering platform that enables teams to identify weaknesses & potential outages in infrastructures by
inducing chaos tests in a controlled way. Developers & SREs can practice Chaos Engineering with LitmusChaos as it is easy to use, based on modern
Chaos Engineering principles & community collaborated. It is 100% open source & a CNCF project.

LitmusChaos takes a cloud-native approach to create, manage and monitor chaos. The platform itself runs as a set of microservices and uses Kubernetes
custom resources (CRs) to define the chaos intent, as well as the steady state hypothesis.

At a high-level, Litmus comprises of:

  • Chaos Control Plane: A centralized chaos management tool called chaos-center, which helps construct, schedule and visualize Litmus chaos workflows
  • Chaos Execution Plane Services: Made up of a chaos agent and multiple operators that execute & monitor the experiment within a defined
    target Kubernetes environment.

At the heart of the platform are the following chaos custom resources:

  • ChaosExperiment: A resource to group the configuration parameters of a particular fault. ChaosExperiment CRs are essentially installable templates
    that describe the library carrying out the fault, indicate permissions needed to run it & the defaults it will operate with. Through the ChaosExperiment, Litmus supports BYOC (bring-your-own-chaos) that helps integrate (optional) any third-party tooling to perform the fault injection.

  • ChaosEngine: A resource to link a Kubernetes application workload/service, node or an infra component to a fault described by the ChaosExperiment.
    It also provides options to tune the run properties and specify the steady state validation constraints using 'probes'. ChaosEngine is watched by the
    Chaos-Operator, which reconciles it (triggers experiment execution) via runners.

The ChaosExperiment & ChaosEngine CRs are embedded within a Workflow object that can string together one or more experiments in a desired order.

  • ChaosResult: A resource to hold the results of the experiment run. It provides details of the success of each validation constraint,
    the revert/rollback status of the fault as well as a verdict. The Chaos-exporter reads the results and exposes information as prometheus metrics.
    ChaosResults are especially useful during automated runs.

ChaosExperiment CRs are hosted on hub.litmuschaos.io. It is a central hub where the
application developers or vendors share their chaos experiments so that their users can use them to increase the resilience of the applications
in production.

Use cases

  • For Developers: To run chaos experiments during application development as an extension of unit testing or integration testing.
  • For CI/CD pipeline builders: To run chaos as a pipeline stage to find bugs when the application is subjected to fail paths in a pipeline.
  • For SREs: To plan and schedule chaos experiments into the application and/or surrounding infrastructure. This practice identifies the weaknesses
    in the deployment system and increases resilience.

Getting Started with Litmus

To get started, check out the Litmus Docs and specifically the Installation section of the Getting Started with Litmus page.

Contributing to Chaos Hub

Check out the Contributing Guidelines for the Chaos Hub

Community

Community Resources:

Feel free to reach out if you have any queries, concerns, or feature requests

  • Give us a star ⭐️ - If you are using LitmusChaos or think it is an interesting project, we would love a star ❤️

  • Follow LitmusChaos on Twitter @LitmusChaos.

  • Subscribe to the LitmusChaos YouTube channel for regular updates & meeting recordings.

  • To join our Slack Community and meet our community members, put forward your questions & opinions, join the #litmus channel on the Kubernetes Slack.

Community Meetings

  1. Community Meetings
  • These will be hosted every 3rd Wednesday of every month at 5:30 PM GMT /6:30 PM CEST /10 PM IST
  • These meetings cover community updates, new feature or release announcements, and user/adopter stories. Everyone in the community is welcome to join and participate in discussions.
  1. Contributor Meetings
  • These will be hosted every second & last Thursday of every month at 2:30 PM GMT /3:30 PM CEST /7 PM IST
  • These meetings focus on both technical and non-technical contributions to LitmusChaos. Maintainers, current contributors, and aspiring contributors are encouraged to join to discuss issues, fixes, enhancements, and future contributions.

Fill out the LitmusChaos Meetings invite form to get your Calendar invite!

Videos

And More....

Blogs

Community Blogs:

Adopters

Check out the Adopters of LitmusChaos

(Send a PR to the above page if you are using Litmus in your chaos engineering practice)

License

Litmus is licensed under the Apache License, Version 2.0. See LICENSE for the full license text. Some of the projects used by the Litmus project may be governed by a different license, please refer to its specific license.

Litmus Chaos is part of the CNCF Projects.

Litmus Docs CNCF Landscape

Overview (`community/Readme.md`)

LitmusChaos Community

Welcome to the LitmusChaos community. This is the starting point for becoming a contributor, improving the code and docs, giving presentations and all the goodness of helping out on the project. We are a friendly, collaborative group and look forward to working together.

Introduction

LitmusChaos is an open source Chaos Engineering platform that enables teams to identify weaknesses & potential outages in infrastructures by
inducing chaos tests in a controlled way. Developers & SREs can practice Chaos Engineering with LitmusChaos as it is easy to use, based on modern
Chaos Engineering principles & community collaborated. It is 100% open source & a CNCF project.

LitmusChaos takes a cloud-native approach to create, manage and monitor chaos. The platform itself runs as a set of microservices and uses Kubernetes
custom resources (CRs) to define the chaos intent, as well as the steady state hypothesis.

Visit litmuschaos.io for information about LitmusChaos.

LitmusChaos authors

LitmusChaos is an open source project with an active development community.

Communication and Slack

We would greatly appreciate your contributions and suggestions! One of the easiest ways to contribute is to participate in Slack discussions, or join the monthly communtiy calls and bi-monthly contributor calls.

Questions and issues

Reach out with any questions you may have and we'll make sure to answer them as soon as possible and as a community member feel free to jump in and answer questions.

Platform Link
💬 Slack (preferred) Join the #litmus channel on the Kubernetes slack
🐤 Twitter @litmuschaos

Community meetings

These will be hosted every 3rd Wednesday of every month at 4:30 PM GMT /5:30 PM CEST /10 PM IST
The community meetings will involve discussing community updates, sharing updates on new features/releases and discussing user/adopter stories. Everyone in the community is invited for the same to participate in the LitmusChaos community meetings.

Upcoming Meeting Dates: 20th March

Contributor Meetings

These will be hosted every second & last Thursday of every month at 1:30 PM GMT /2:30 PM CEST /7 PM IST
The contributor meetings are only meant to discuss technical and non-technical contributions to LitmusChaos. Maintainers, present Contributors and aspiring contributors are invited to participate in the LitmusChaos contributor meetings to discuss issues, fixes, enhancements and future contributions

Upcoming Meeting Dates: 14th March 2024, 28th March 2024

The rough agenda for contributor meetings are:

  • Highlight the contributions and contributors.
  • Let contributors share their contributions updates and ask doubts.
  • Review previous contributions
  • Discussion on future action items
  • Announcements
  • Open floor discussion / Q&A

You can always catch up offline by watching the recordings on the LitmusChaos YouTube channel.

Asset Link
🔗 Meeting Link & Password **Zoom Call: https://harness-io.zoom.us/j/95100368978?pwd=b2VrdCtaakE5U3dhOElFMUJOaXVOUT09 ** Passcode: 448312
🎥 Meeting Recordings https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw

LitmusChaos blog

The LitmusChaos blog is an open platform on DEV.to consisting posts on releases, technical articles and upcoming events. If you would like to author a post, use the #litmuschaos and publish your article.

You can reach out to us with a suggestion if you want your blog to be published on the CNCF Blog page.
You can find the LitmusChaos CNCF Blogs for reference.

How can I get involved?

One of the easiest ways to contribute is to participate in discussions at community engagements or write a blog entry.

If you're looking for something to work on, read the contribution guidelines and then you start by looking for GitHub issues, marked with "Good First Issue" or the "Help Wanted" labels:

And, we can always use more testing, have more and improved docs, or just write a blog post on what you have discovered whilst using LitmusChaos.

Code of Conduct

This project has adopted the Contributor Covenant Code of Conduct


Overview (`monitoring/README.md`)

Monitor Chaos

This directory contains chaos interleaved grafana dashboards along with the utilities needed to get started with monitoring chaos experiments and workflows.

Components

  • Grafana Dashboards

    Contains chaos interleaved grafana dashboards for various native k8s and application metrics.

  • Utilities

    Contains utilities required to setup monitoring infrastructure on a kubernetes cluster.

  • Tutorials

    Contains tutorials for users on monitoring target applications under chaos using various tools.

Setup the LitmusChaos Infrastructure

  • Install the litmus chaos operator and CRDs

    text
    kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.6.yaml
  • Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution

    text
    kubectl apply -f https://litmuschaos.github.io/litmus/litmus-admin-rbac.yaml
  • Install the chaos experiments in admin(litmus) namespace

    text
    kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.6?file=charts/generic/experiments.yaml -n litmus

Setup the Monitoring Infrastructure

Create monitoring namespace on the cluster

text
kubectl create ns monitoring

Setup prometheus TSDB

Model-1 (optional): Prometheus scrape config model.

Deploy prometheus components

text
kubectl -n monitoring apply -f utils/prometheus/prometheus-scrape-configuration/

Deploy metrics exporters

text
kubectl -n monitoring apply -f utils/metrics-exporters/node-exporter/
kubectl -n monitoring apply -f utils/metrics-exporters/kube-state-metrics/

Deploy chaos-exporter when the cluster is not connected to litmus 2.0 control plane via litmus agent (exporter is installed as a part of the agent bundle)

text
kubectl -n litmus apply -f utils/metrics-exporters/litmus-metrics/chaos-exporter/

Model-2 (optional): Service monitor and prometheus operator model.

Create the operator to instantiate all CRDs

text
kubectl -n monitoring apply -f utils/prometheus/prometheus-operator/

Deploy monitoring components

text
kubectl -n monitoring apply -f utils/metrics-exporters-with-service-monitors/node-exporter/
kubectl -n monitoring apply -f utils/metrics-exporters-with-service-monitors/kube-state-metrics/

Deploy chaos-exporter when the cluster is not connected to litmus 2.0 control plane via litmus agent (exporter is installed as a part of the agent bundle)

text
kubectl -n litmus apply -f utils/metrics-exporters-with-service-monitors/litmus-metrics/chaos-exporter/

Deploy prometheus instance and all the service monitors for targets

text
kubectl -n monitoring apply -f utils/prometheus/prometheus-configuration/

Note: To change the service type to NodePort, perform a kubectl edit svc prometheus-k8s -n monitoring and replace type: LoadBalancer to type: NodePort

optional: Alert manager

text
kubectl -n monitoring apply -f utils/alert-manager-with-service-monitor/

Setup Grafana

Apply the grafana manifests after deploying prometheus for all metrics.

text
kubectl -n monitoring apply -f utils/grafana/
  • You may access the grafana dashboard via the LoadBalancer (or NodePort) service IP or via a port-forward operation on localhost

    View the services running in the monitoring namespace

    text
    kubectl get svc -n monitoring

    Now copy the EXTERNAL-IP of grafana and view it in the browser

    Default username/password credentials: admin/admin

    The dashboard and the datasource are imported automatically by Grafana during deployment, if something goes wrong, you can manually set it up as shown below.

Manually Importing datasource and dashboard

  • Add the prometheus datasource from monitoring namespace as DS_PROMETHEUS for Grafana via the Grafana Settings menu

  • Import the grafana dashboards

  • Import the grafana dashboard "Node and Pod Chaos Demo" provided here


Overview (`proposals/README.md`)

Litmus Enhancement Proposals

This directory contains design documents for accepted proposals. Anyone who wants to enhance Litmus can submit a proposal. The proposal should be a design document that describes the enhancement and its implementation. The proposal should follow the template and be submitted as a pull request to this repository.


Overview (`resources/README.md`)

✨ Here is a list of beginner-level resources, everything you need to get started in your Cloud-Native Chaos Engineering journey ✨
Leave a comment if you think there is something you'd like to add to this list. 📝📝

Kubernetes Resources

Resource Link
The Illustrated Children's Guide to Kubernetes https://www.cncf.io/the-childrens-illustrated-guide-to-kubernetes/
Learn Kubernetes Basics https://kubernetes.io/docs/tutorials/kubernetes-basics/
Introduction to Kubernetes architecture https://www.redhat.com/en/topics/containers/kubernetes-architecture
Kubernetes: Getting Started (Free Course) https://www.udemy.com/course/kubernetes-getting-started/
Kubernetes Zero to Hero, TechWorld with Nana on YouTube https://www.youtube.com/watch?v=X48VuDVv0do
Kubernetes Fundamentals https://k8sfun.courselabs.co/
How To Setup Kubernetes Cluster Using Kubeadm https://devopscube.com/setup-kubernetes-cluster-kubeadm/
An Intro to Google's Kubernetes and How to use it https://www.ctl.io/developers/blog/post/what-is-kubernetes-and-how-to-use-it/
Kubernetes Deployment Tutorial For Beginners https://devopscube.com/kubernetes-deployment-tutorial/
Awesome Kubernetes https://awesome-kubernetes.readthedocs.io/kubernetes/

CNCF & Cloud-Native Technology-based Resources

Resource Link
The beginner’s guide to the CNCF landscape https://www.cncf.io/blog/2018/11/05/beginners-guide-cncf-landscape/
CNCF Training https://www.cncf.io/certification/training/
CNCF YouTube https://www.youtube.com/c/cloudnativefdn
CNCF Community Groups https://community.cncf.io/
LFX Mentorship (Community Bridge) https://github.com/cncf/mentoring/tree/master/lfx-mentorship
CNCF Certification Candidate Resorces https://training.linuxfoundation.org/cncf-certification-candidate-resources/
How to explain cloud-native apps in plain English https://enterprisersproject.com/article/2018/10/how-explain-cloud-native-apps-plain-english
A guide to cloud native storage for beginners https://about.gitlab.com/blog/2020/09/10/cloud-native-storage-beginners/
New Cloud Native and Multicloud Course for Beginners https://www.ibm.com/cloud/blog/announcements/new-cloud-native-and-multicloud-course-for-beginners
Benefits of Cloud-Native Applications https://www.thruinc.com/blog/cloud-native/

Chaos Engineering Resources

Resource Link
Awesome Chaos Engineering https://github.com/dastergon/awesome-chaos-engineering
Principles of Chaos Engineering https://principlesofchaos.org/
Why you should consider Chaos Engineering https://dev.to/sayanide/why-should-you-consider-chaos-engineering-35eh
Lord of Chaos - Becoming a Chaos Engineer https://vimeo.com/groups/jz2016/videos/181925286
How Litmus Orchestrates Chaos https://dev.to/litmus-chaos/how-litmus-orchestrates-chaos-3nnd
SRECON17 Principles of Chaos Engineering https://www.usenix.org/conference/srecon17americas/program/presentation/rosenthal
Why the World Needs More Resilient Systems https://www.infoq.com/news/2018/03/resilient-systems-chaos-engineer/
Chaos Architecture https://www.infoq.com/presentations/chaos-architecture-mindset/
LitmusChaos Slack Communtiy https://slack.litmuschaos.io/

Overview (`monitoring/grafana-dashboards/README.md`)

Grafana Dashboards

This directory contains chaos interleaved grafana dashboards to monitor chaos experiments and workflows.

Categories

  • Kubernetes

    Contains generic K8s dashboards with data from node exporter and kube-state metrics.

    bash
    cd kubernetes
  • Sock Shop

    Contains application metrics dashboard for Sock Shop.

    bash
    cd sock-shop

Auto-Configurations

The chaos interleaved grafana dashboards and a default prometheus datasource are auto-configured and automatically imported when you deploy grafana.

The following datasources and dashboard are auto-configured and imported:

The datasource-configMaps.yaml defines all the definitions of the datasource that are imported, currently the following datasources are imported:

Datasources Configured

  • DS_PROMETHEUS: The prometheus datasource that is deployed while setting up the monitoring for chaos as mentioned here

The dashboard-configMaps.yaml defines all the definitions of the dashboards that are imported, along with a provider that helps Grafana to plugin and import the dashboards. currently the following datasources are imported:

Dashboards Imported


Overview (`monitoring/tutorials/README.md`)

Tutorials

This directory contains tutorials for users on monitoring target applications under chaos using various tools.

  • Otel-demo

    Contains a tutorial on injecting chaos into target applications using LitmusChaos and observing the chaos with OpenTelemetry.


Overview (`monitoring/utils/README.md`)

Utilities

This directory contains utilities required to setup a monitoring infrastructure for application or generic metrics with chaos exporter metrics and litmus event router updates.

Setups


Overview (`community/mentorship/gsoc/Readme.md`)

Google Summer of Code for LitmusChaos

Google Summer of Code (GSoC) is a global, online program focused on
bringing new contributors into open source software development.
GSoC contributors work with an open source organization on a
summer programming project under the guidance of mentors.

GSoC contributors accepted into the program receive a stipend, paid by Google,
to work well-defined projects to improve or enhance the LitmusChaos project and its ecosystem.
In exchange, numerous community members volunteer as "mentors" for GSoC contributors
to help integrate them into the open source community and succeed in completing their projects.

GSoC Programs

2024
2023
2022
2021

Participate

We invite GSoC contributors to submit project proposal applications in relation to the issues raised.

Apply as a contributor

  1. Check out our project ideas.
  2. Join the #litmus & #litmus-dev channel on the Kubernetes Slack
  3. Explore the project ideas and find one or two that interest you.
    Notify us in the chat.
  4. Join our contributor calls to learn and present your ideas.
  5. Try contributing to LitmusChaos. Some project ideas include references to newcomer friendly issues. You can also find links to the generic contributing guide here.
  6. Work with the potential mentors during the application phase.
    Do not hesitate to ask any questions in the chat.
    It may also be possible to organize special sessions to discuss the project ideas.
  7. Make sure to submit the final application in time! See the GSoC Timeline

Overview (`demo/kubecon-demo/2020-NA/Readme.md`)

Getting Started

Litmus

  • Refer to the LitmusChaos documentation to get started on installing Litmus infra on your
    Kubernetes clusters. All chaos resources will be created in the centralized namespace from below manifest, litmus.
  • Apply the LitmusChaos Operator manifest
text
2020-NA git:(kubecon-2020)kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.9.0.yaml
  • Verify if the ChaosOperator is running
text
2020-NA git:(kubecon-2020) ✗ kubectl get pods -n litmus
NAME                                 READY   STATUS    RESTARTS   AGE
chaos-operator-ce-658b7dfc7b-4nw45   1/1     Running   0          11d
  • verify the CRD's
text
2020-NA git:(kubecon-2020) ✗ kubectl get crds | grep chaos
chaosengines.litmuschaos.io                   2020-06-11T17:59:33Z
chaosexperiments.litmuschaos.io               2020-06-11T17:59:33Z
chaosresults.litmuschaos.io                   2020-06-11T17:59:34Z
  • Verify the api-resources
text
2020-NA git:(kubecon-2020) ✗ kubectl api-resources | grep chaos
chaosengines                                           litmuschaos.io                 true         ChaosEngine
chaosexperiments                                       litmuschaos.io                 true         ChaosExperiment
chaosresults                                           litmuschaos.io                 true         ChaosResult

Argo Workflows

The Argo workflow infra consists of the Argo workflow CRDs, Workflow Controller, associated RBAC & Argo CLI. The steps
shown below installs argo in the standard cluster-wide mode wherein the workflow controller operates on all
namespaces. Ensure that you have the right permission to be able to create the said resources.

If you would like to run argo with a namespace scope, refer to this manifest.

  • Create argo namespace
    text
    ➜  2020-NA git:(kubecon-2020) ✗ kubectl create ns argo
  • Create the CRDs, workflow controller deployment with associated RBAC
    text
    ➜  2020-NA git:(kubecon-2020) ✗ kubectl apply -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml
  • Verify successful creation of argo resources (crds)
text
2020-NA git:(kubecon-2020) ✗ kubectl get crds | grep argo
clusterworkflowtemplates.argoproj.io          2020-05-14T04:57:16Z
cronworkflows.argoproj.io                     2020-05-14T04:57:18Z
workflows.argoproj.io                         2020-05-14T04:57:20Z
workflowtemplates.argoproj.io                 2020-05-14T04:57:21Z
  • Verify successful creation of argo resources (api-resources)
text
2020-NA git:(kubecon-2020) ✗ kubectl api-resources | grep argo
clusterworkflowtemplates          clusterwftmpl,cwft   argoproj.io                    false        ClusterWorkflowTemplate
cronworkflows                     cwf,cronwf           argoproj.io                    true         CronWorkflow
workflows                         wf                   argoproj.io                    true         Workflow
workflowtemplates                 wftmpl               argoproj.io                    true         WorkflowTemplate
  • Verify successful creation of argo server and workflow
text
2020-NA git:(kubecon-2020) ✗  kubectl get pods -n argo
NAME                                   READY   STATUS    RESTARTS   AGE
argo-server-78b774dd56-j8xwx           1/1     Running   0          13h
workflow-controller-589bf468d7-bwjtr   1/1     Running   0          13h
  • Install the argo CLI on the harness/test machine (where the kubeconfig is available)
text
2020-NA git:(kubecon-2020) curl -sLO https://github.com/argoproj/argo/releases/download/v2.8.0/argo-linux-amd64
2020-NA git:(kubecon-2020) chmod +x argo-linux-amd64
2020-NA git:(kubecon-2020) mv ./argo-linux-amd64 /usr/local/bin/argo
2020-NA git:(kubecon-2020) argo version
  argo: v2.8.0
  BuildDate: 2020-05-11T22:55:16Z
  GitCommit: 8f696174746ed01b9bf1941ad03da62d312df641
  GitTreeState: clean
  GitTag: v2.8.0
  GoVersion: go1.13.4
  Compiler: gc
  Platform: linux/amd64

Application

  • Create a namespace for chaos experiment as chaos-ns
text
➜  2020-NA git:(kubecon-2020) ✗ kubectl create ns chaos-ns
  • Install a simple multi-replica stateless nginx deployment with service exposed over nodeport
text
➜  App git:(kubecon-2020) ✗ kubectl  apply -f nginx_demo.yaml
deployment.apps/nginx-demo-app created
service/nginx-demo-app-svc created
text
App git:(kubecon-2020) ✗ kubectl get pods -l app=nginx-demo-app  -w
NAME                              READY   STATUS    RESTARTS   AGE
nginx-demo-app-68c58bb7d7-fg2bc   1/1     Running   0          94s
nginx-demo-app-68c58bb7d7-jfrrr   1/1     Running   0          94s
nginx-demo-app-68c58bb7d7-s98wz   1/1     Running   0          94s
  • You can access this service over https://<node-ip>:<nodeport>

Chaos Experiment

  • Setup the Chaos Experiment for your namespace
text
2020-NA git:(kubecon-2020) ✗ kubectl apply -f ChaosExperiment/experiments-k8.yaml
chaosexperiment.litmuschaos.io/k8-pod-delete created
text
➜  2020-NA git:(kubecon-2020) ✗ k get chaosexperiments
NAME            AGE
k8-pod-delete   4s

Chaos Execution

  • Setup the RBAC to execute chaos experiment in your namespace
text
➜  2020-NA git:(kubecon-2020) ✗ kubectl apply -f ChaosExecution/rbac-chaos-admin.yaml
serviceaccount/chaos-admin created
clusterrole.rbac.authorization.k8s.io/chaos-admin configured
clusterrolebinding.rbac.authorization.k8s.io/chaos-admin configured
  • Execute the Chaos Experiment in your namespace
text
➜  2020-NA git:(kubecon-2020) ✗ kubectl apply -f ChaosExecution/engine-nginx-count-admin.yaml

Chaos Workflow - Argo Workflow

  • Execute the Chaos Experiment via Argo Workflow
text
➜  2020-NA git:(kubecon-2020) ✗ argo submit Argo/argowf-chaos-admin.yaml --watch

Perf WorkFlow - Argo workflow on NGINX Application

  • Execute the Performance Test via Argo Workflow
text
➜  2020-NA git:(kubecon-2020) ✗ argo submit Argo/argowf-perf.yaml --watch

Chaos with Performance testing - Argo Workflow

  • Execute the Chaos Experiment with Performance Test via Argo Workflow
text
➜  2020-NA git:(kubecon-2020) ✗ argo submit Argo/argowf-perf-chaos-admin.yaml --watch

Overview (`demo/sample-applications/sock-shop/README.md`)

Monitor Chaos on Sock-Shop

Chaos experiments on sock-shop app with grafana dashboard to monitor it.

Step-0: Obtain the demo artefacts

  • Clone the litmus repo

    text
    git clone https://github.com/litmuschaos/litmus.git
    cd litmus/demo/sample-applications/sock-shop

Step-1: Setup Sock-Shop Microservices Application

  • Create sock-shop namespace on the cluster

    text
    kubectl create ns sock-shop
  • Apply the sock-shop microservices manifests

    text
    kubectl apply -f deploy/sock-shop/
  • Wait until all services are up. Verify via kubectl get pods -n sock-shop

Step-2: Setup the LitmusChaos Infrastructure

  • Install the litmus chaos operator and CRDs

    text
    kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.6.1.yaml
  • Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution

    text
    kubectl apply -f https://litmuschaos.github.io/litmus/litmus-admin-rbac.yaml
  • Install the chaos experiments in admin(litmus) namespace

    text
    kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.6.1?file=faults/generic/experiments.yaml -n litmus
  • Install the chaos experiment metrics exporter and chaos event exporter

    text
    kubectl apply -f deploy/litmus-metrics/chaos-exporter.yaml

Step-3: Setup the Monitoring Infrastructure

  • Apply the monitoring manifests in specified order

    text
    kubectl apply -f deploy/monitoring/01-monitoring-ns.yaml
    kubectl apply -f deploy/monitoring/02-prometheus-rbac.yaml
    kubectl apply -f deploy/monitoring/03-prometheus-configmap.yaml
    kubectl apply -f deploy/monitoring/04-prometheus-alert-rules.yaml
    kubectl apply -f deploy/monitoring/05-prometheus-deployment.yaml
    kubectl apply -f deploy/monitoring/06-prometheus-svc.yaml
    kubectl apply -f deploy/monitoring/07-grafana-deployment.yaml
    kubectl apply -f deploy/monitoring/08-grafana-svc.yaml
  • Access the grafana dashboard via the NodePort (or loadbalancer) service IP or via a port-forward operation on localhost

    Note: To change the service type to Loadbalancer, perform a kubectl edit svc prometheus -n monitoring and replace
    type: NodePort to type: LoadBalancer

    text
    kubectl get svc -n monitoring

    Default username/password credentials: admin/admin

  • Add the prometheus datasource for Grafana via the Grafana Settings menu

  • Import the grafana dashboard "Sock-Shop Performance" provided here

Step-4: Execute the Chaos Experiments

  • For the sake of illustration, let us execute a CPU hog experiment on the catalogue microservice & a Memory Hog experiment on
    the orders microservice in a staggered manner

    text
    kubectl apply -f chaos/catalogue/catalogue-cpu-hog.yaml

    Wait for ~60s

    text
    kubectl apply -f chaos/orders/orders-memory-hog.yaml
  • Verify execution of chaos experiments

    text
    kubectl describe chaosengine catalogue-cpu-hog -n litmus
    kubectl describe chaosengine orders-memory-hog -n litmus

Step-5: Visualize Chaos Impact

  • Observe the impact of chaos injection through increased Latency & reduced QPS (queries per second) on the microservices
    under test.

Overview (`monitoring/grafana-dashboards/kubernetes/README.md`)

Node and Pod K8s metrics dashboard

This dashboard visualizes Node and Pod level CPU and memory utilization metrics interleaved with chaos events.

Prerequisites

  • Node exporter and kube state metrics exporter with service monitor.

  • Prometheus operator and deployment configured for using the service monitors.

OR

  • prometheus deployment with a scrape job for litmus and node exporter metrics.

  • Chaos engine name must match the labels used in PromQL for the grafana dashboard.

Instructions

  • Download the dashboard json file.

  • Import the json file into grafana.

  • Change data source for the dashboard accordingly.

  • Tune the PromQL queries to match the labels with engine name and other parameters as per need.

Screenshot


Overview (`monitoring/grafana-dashboards/percona-sql/README.md`)

Node and Pod K8s metrics dashboard

These dashboards visualize Percona SQL server and PMM server metrics interleaved with chaos events.

Prerequisites

  • mysqld exporter with service monitor and Prometheus operator and deployment configured for using the service monitor.

  • mysqld exporter with Prometheus deployment with job configured for scraping metrics from the service endpoint.

OR

  • Percona PMM installation.

  • Chaos engine name must match the labels used in PromQL for the grafana dashboard.

Instructions

  • Download the dashboard json file.

  • Import the json file into grafana.

  • Change data source for the dashboard accordingly.

  • Tune the PromQL queries to match the labels with engine name and other parameters as per need.

Screenshots


Overview (`monitoring/grafana-dashboards/sock-shop/README.md`)

Sock shop application metrics dashboard

This dashboard visualizes Sock Shop application metrics interleaved with chaos events and chaos exporter metrics.

Prerequisites

  • Sock shop microservices application deployments with service monitors.

  • Litmus chaos exporter with service monitors.

  • Prometheus operator and deployment configured for using the service monitors.

OR

  • Sock shop microservices application deployments.

  • prometheus deployment with a scrape job for litmus and sock-shop application metrics.

  • Chaos engine name must match the labels used in PromQL for the grafana dashboard.

Instructions

  • Download the dashboard json file.

  • Import the json file into grafana.

  • Change data source for the dashboard accordingly.

  • Tune the PromQL queries to match the labels with engine name and other parameters as per need.

Screenshots

Chaos Result selector dropdown:

Chaos Engine Context (Target application's NAMESPACE_LABEL) selector dropdown:

Chaos Engines with Experiments as Chaos Results:

Chaos event annotations:

Chaos Result verdict annotations:

Interleaved Chaos events:

Interleaved Chaos Result verdicts:

Chaos Result verdict failure alerts:

Chaos Result probe failure alerts:

Systems healthy / in steady state OR no alerts to be issued:

Systems un-healthy / failed to regain steady state after chaos / meet SLO OR alerts are issued:

Alerts issued:


Overview (`monitoring/platforms/kublr/README.md`)

Monitor Chaos

This directory contains chaos interleaved grafana dashboards along with the utilities needed to get started with monitoring chaos experiments and workflows on Kublr platform.

The main difference from the standard getting started guide is that Kublr platform includes a centralized monitoring subsystem out of the box. As a result, there is no
need to set up prometheus and grafana to enable monitoring, it is possible to just enable monitoring integration in the test application and in Litmus.

Components

  • Grafana Dashboards

    Contains chaos interleaved grafana dashboards for various native k8s and application metrics. These dashboards are modified slightly relative to the dashboards in the generic getting started guide to accommodate for additional labels which Kublr introduces in its centralized monitoring.

Demonstration

Monitor Chaos on Sock-Shop

Run chaos experiments and workflows on sock-shop application with grafana dashboard to monitor it.

Step-1: Setup Sock-Shop Microservices Application

  • Apply the sock-shop microservices manifests

    text
    kubectl apply -f ../../utils/sample-application-under-test/sock-shop/
  • Wait until all services are up. Verify via kubectl get pods -n sock-shop

Step-2: Setup the LitmusChaos Infrastructure

  • Install the litmus chaos operator and CRDs

    text
    kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.6.yaml
  • Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution

    text
    kubectl apply -f https://litmuschaos.github.io/litmus/litmus-admin-rbac.yaml
  • Install the chaos experiments in admin(litmus) namespace

    text
    kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.6?file=charts/generic/experiments.yaml -n litmus

Step-3: Configure Sock-shop application and Litmus for the Kublr centralized monitoring Infrastructure

  • Deploy Litmus monitoring components

    text
    kubectl -n litmus apply -f ../../utils/metrics-exporters/litmus-metrics/chaos-exporter/
  • Enable Litmus metrics collection on the Litmus monitoring components

    text
    kubectl annotate svc -n litmus --overwrite \
      chaos-exporter chaos-operator-metrics \
      'prometheus.io/scrape=true'
  • Enable custom metrics collection on the Sock-shop application

    text
    kubectl annotate svc -n sock-shop --overwrite \
      carts catalogue front-end orders payment shipping user \
      'prometheus.io/scrape=true'
  • Import the grafana dashboards choosing prometheus as data source.

  • Import the grafana dashboard "Sock-Shop Performance" provided here

  • Import the grafana dashboard "Node and Pod Chaos Demo" provided here

Step-4: Execute the Chaos Experiments

  • For the sake of illustration, let us execute node and pod level, CPU hog experiments on the catalogue microservice & Memory Hog
    experiments on the orders microservice in a staggered manner.

    text
    kubectl apply -f ../../utils/sample-chaos-injectors/chaos-experiments/catalogue/catalogue-pod-cpu-hog.yaml

    Wait for ~60s

    text
    kubectl apply -f ../../utils/sample-chaos-injectors/chaos-experiments/orders/orders-pod-memory-hog.yaml

    Wait for ~60s

    text
    kubectl apply -f ../../utils/sample-chaos-injectors/chaos-experiments/catalogue/catalogue-node-cpu-hog.yaml

    Wait for ~60s

    text
    kubectl apply -f ../../utils/sample-chaos-injectors/chaos-experiments/orders/orders-node-memory-hog.yaml
  • Verify execution of chaos experiments

    text
    kubectl describe chaosengine catalogue-pod-cpu-hog -n litmus
    kubectl describe chaosengine orders-pod-memory-hog -n litmus
    kubectl describe chaosengine catalogue-node-cpu-hog -n litmus
    kubectl describe chaosengine orders-node-memory-hog -n litmus

Step-5: Visualize Chaos Impact

  • Observe the impact of chaos injection through increased Latency & reduced QPS (queries per second) on the microservices
    under test.

Step-6 (optional): Inject continous chaos using Argo CD.

  • Install Chaos workflow infrastructure.

    • Create argo namespace

      text
      kubectl create ns argo
    • Create the CRDs, workflow controller deployment with associated RBAC.

      text
      kubectl apply -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml -n argo
    • Install the argo CLI on the test harness machine (where the kubeconfig is available)

      bash
      # Download the binary
      curl -sLO https://github.com/argoproj/argo/releases/download/v2.11.0/argo-linux-amd64.gz
      
      # Unzip
      gunzip argo-linux-amd64.gz
      
      # Make binary executable
      chmod +x argo-linux-amd64
      
      # Move binary to path
      mv ./argo-linux-amd64 /usr/local/bin/argo
      
      # Test installation
      argo version
  • Create the Argo Access ServiceAccount

    text
    kubectl apply -f https://raw.githubusercontent.com/litmuschaos/chaos-workflows/master/Argo/argo-access.yaml -n litmus
  • Run one or more of the litmuschaos experiments as Chaos workflows using argo CLI or kubectl.

    Node CPU hog

    bash
    argo cron create ../../utils/sample-chaos-injectors/chaos-workflows-with-argo-CD/catalogue/catalogue-node-cpu-hog-workflow.yaml -n litmus

    Node memory hog

    bash
    argo cron create ../../utils/sample-chaos-injectors/chaos-workflows-with-argo-CD/orders/orders-node-memory-hog-workflow.yaml -n litmus

    Pod CPU hog

    bash
    kubectl apply -f ../../utils/sample-chaos-injectors/chaos-workflows-with-argo-CD/catalogue/catalogue-pod-cpu-hog-workflow.yaml -n litmus

    Pod memory hog

    bash
    kubectl apply -f ../../utils/sample-chaos-injectors/chaos-workflows-with-argo-CD/orders/orders-pod-memory-hog-workflow.yaml -n litmus
  • Visualize the Chaos cron workflow through argo UI by obtaining Node port or Load Balancer IP.

    text
    kubectl port-forward svc/argo-server -n argo 2746

    OR

    text
    kubectl patch svc argo-server -n argo -p '{"spec": {"type": "NodePort"}}'

    OR

    text
    kubectl patch svc argo-server -n argo -p '{"spec": {"type": "LoadBalancer"}}'

Overview (`monitoring/tutorials/otel-demo/README.md`)

Otel-demo tutorial

This tutorial provides a step-by-step guide for injecting chaos into target applications using LitmusChaos and observing the chaos with OpenTelemetry.

0. Prerequisites

  • Kubernetes 1.24+
  • 8 GB of free RAM
  • Helm 3.9+

1. Install Litmus

  1. Create the litmus namespace.
    bash
    kubectl create ns litmus
  2. Add the Litmus Helm repository.
    bash
    helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/
  3. Install Litmus using Helm.
    bash
    helm install chaos litmuschaos/litmus \
    --namespace=litmus \
    --set portal.frontend.service.type=NodePort \
    --set mongodb.image.registry=ghcr.io/zcube \
    --set mongodb.image.repository=bitnami-compat/mongodb \
    --set mongodb.image.tag=6.0.5
  4. Verify the installation.
    bash
    kubectl get all -n litmus
  5. Forward the Litmus frontend service port.
    bash
    kubectl port-forward svc/chaos-litmus-frontend-service 9091:9091 -n litmus
    Access the Litmus frontend at http://localhost:9091 and log in with admin / litmus.

2. Set Up Litmus Environment

  1. Create a new environment.
    • Environment Name: local
    • Environment Type: Production
  2. Configure a new chaos infrastructure.
    • Name: local
    • Chaos Components Installation: Cluster-wide access
    • Installation Location (Namespace): litmus
    • Service Account Name: litmus
  3. Deploy the new chaos infrastructure.
    bash
    cd ~/Downloads
    kubectl apply -f local-litmus-chaos-enable.yml
    Wait until the status shows CONNECTED.

3. Install Otel-demo microservices & Observability tools

  1. Create the otel-demo namespace.
    bash
    kubectl create ns otel-demo
  2. Add the OpenTelemetry Helm repository.
    bash
    helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
  3. Install Otel-demo microservices and Observability tools using Helm.
    bash
    cd litmus/monitoring/tutorials/otel-demo
    helm install my-otel-demo open-telemetry/opentelemetry-demo --namespace otel-demo --values custom_otel_demo_values.yml
    It contains Otel-demo microservices, OpenTelemetry(with chaos metrics), Prometheus, Jaeger, Grafana, OpenSearch, and PostgreSQL.
  4. Verify the installation.
    bash
    kubectl get all -n otel-demo
  5. Forward the Otel-demo frontend proxy port.
    bash
    kubectl port-forward svc/frontend-proxy 8080:8080 -n otel-demo
  6. Access the following services.

4. Add Grafana Panel

Import the chaos-experiments-dashboard.json file into Grafana to visualize the results of chaos experiments.

5. Observe chaos

Explore the following experiments to observe chaos on the Otel-demo microservices.

  • Pod Network Latency

    Performs a pod network latency experiment on the cart service.

  • Pod Delete

    Performs a pod delete experiment on the recommendation service.


Overview (`monitoring/platforms/kublr/grafana-dashboards/README.md`)

Grafana Dashboards

This directory contains chaos interleaved grafana dashboards to monitor chaos experiments and workflows.

Categories

  • Kubernetes

    Contains generic K8s dashboards with data from node exporter and kube-state metrics.

    text
    cd kubernetes
  • Sock Shop

    Contains application metrics dashboard for Sock Shop.

    text
    cd sock-shop

Overview (`monitoring/tutorials/otel-demo/cart-service/README.md`)

cart service pod network latency

Description

  • This experiment injects network latency to the cart service pod.
  • The Probe checks Prometheus metrics Latency of cart service requests.

Steps

1. Probe Settings

  • probe type: Prometheus Probe
  • name: cart-service-pod-network-latency-probe
  • timeout: 3s
  • interval: 3s
  • prometheus endpoint: http://prometheus.otel-demo:9090
  • prometheus query: histogram_quantile(0.99, sum(rate(traces_span_metrics_duration_milliseconds_bucket{service_name=\"cart\"}[5m])) by (le))/1000

    Note: The escaped quotes (\") are required when configuring the Litmus Prometheus Probe.

  • Data Comparison:
    • Type: Float
    • Criteria: <
    • Value: 3.0

2. Make Experiment

  1. New Experimnet
  2. Complete Overview
  3. Start off by Upload YML(cart-service-pod-network-latency.yml)

3. Run Experiment

  1. Click on the Run button
  2. Check Experiment Status and Logs
  3. Check the Resilience Score
  4. Check the Chaos Exporter metrics using Grafana and confirm if the experiment failed.
  5. Check cart service Spanmetrics Metrics using Grafana

Overview (`monitoring/tutorials/otel-demo/recommendation-service/README.md`)

recommendation service pod delete

Description

  • This experiment injects pod delete chaos to the recommendation service pod.
  • The Probe checks the Prometheus metrics for the error rate of the ListRecommendations span
    • ListRecommendations is included in the frontend service, even though it utilizes the recommendation service.

Steps

1. Probe Settings

  • probe type: Prometheus Probe
  • name: recommendation-service-pod-delete-probe
  • timeout: 3s
  • interval: 3s
  • prometheus endpoint: http://prometheus.otel-demo:9090
  • prometheus query: sum(rate(traces_span_metrics_calls_total{status_code=\"STATUS_CODE_ERROR\", span_name=\"grpc.oteldemo.RecommendationService/ListRecommendations\"}[5m]))

    Note: The escaped quotes (\") are required when configuring the Litmus Prometheus Probe.

  • Data Comparison:
    • Type: Float
    • Criteria: <
    • Value: 0.05

2. Make Experiment

  1. New Experimnet
  2. Complete Overview
  3. Start off by Upload YML(recommendation-service-pod-delete.yml)

3. Run Experiment

  1. Click on the Run button
  2. Check Experiment Status and Logs
  3. Check the Resilience Score
  4. Check the Chaos Exporter metrics using Grafana and confirm if the experiment passed.
  5. Check Error Rate in frontend service Spanmetrics using Grafana

Overview (`monitoring/utils/sample-application-under-test/percona/README.md`)

Demonstration

Monitor Chaos on Percona

Run chaos experiments on percona application with grafana dashboard to monitor it.

Setup Percona Application

  • Setup Percona.

    text
    kubectl apply -f ../../sample-application-under-test/percona/crd.yaml
    text
    kubectl create namespace pxc
    text
    kubectl -n pxc apply -f ../../sample-application-under-test/percona/rbac.yaml
    text
    kubectl -n pxc apply -f ../../sample-application-under-test/percona/operator.yaml
    text
    kubectl -n pxc apply -f ../../sample-application-under-test/percona/secrets.yaml
  • (optional-PMM) Setup PMM for Percona

    text
    helm repo add percona https://percona-charts.storage.googleapis.com
    text
    helm repo update
    text
    helm install monitoring percona/pmm-server --set platform=kubernetes --version 2.7.0 --set "credentials.password=newpass"
  • Wait until all services are up. Verify via kubectl get pods -n pxc

  • (optional-PMM) Check for logs and monitoring service

    text
    kubectl logs -f cluster1-pxc-0 -c pmm-client
    text
    kubectl get service/monitoring-service -o wide
  • Apply the CR with pmm:enabled: true OR false

    text
    kubectl -n pxc apply -f ../../sample-application-under-test/percona/cr.yaml
  • To Check connectivity to newly created cluster for PMM

    text
    kubectl run -i --rm --tty percona-client --image=percona:8.0 --restart=Never -- bash -il percona-client:/$ mysql -h cluster1-haproxy -uroot -proot_password

Setup the Monitoring Infrastructure (if not using PMM)

  • Create monitoring namespace on the cluster

    text
    kubectl create ns monitoring
  • Setup prometheus TSDB (Using mySQLd exporter for percona SQL metrics)

    text
    kubectl create ns monitoring

    Model-1 (optional): Service monitor and prometheus operator model.

    text
    Create the operator to instantiate all CRDs
    
    ```
    kubectl -n monitoring apply -f ../../prometheus/prometheus-operator/
    ```
    
    Deploy monitoring components
    
    ```
    kubectl -n litmus apply -f ../../metrics-exporters-with-service-monitors/litmus-metrics/chaos-exporter/
    kubectl -n monitoring apply -f ../../metrics-exporters-with-service-monitors/mysqld-exporter/
    ```
    
    Deploy prometheus instance and all the service monitors for targets
    
    ```
    kubectl -n monitoring apply -f ../../prometheus/prometheus-configuration/
    ```
    
    Note: To change the service type to NodePort, perform a `kubectl edit svc prometheus-k8s -n monitoring` and replace `type: LoadBalancer` to `type: NodePort`

    Model-2 (optional): Prometheus scrape config model.

    text
    Deploy prometheus components
    
    ```
    kubectl -n monitoring apply -f ../../prometheus/prometheus-scrape-configuration/
    ```
    
    Deploy metrics exporters
    
    ```
    kubectl -n litmus apply -f ../../metrics-exporters/litmus-metrics/chaos-exporter/
    kubectl -n monitoring apply -f ../../metrics-exporters/mysqld-exporter/
    ```
  • Apply the grafana manifests after deploying prometheus for all metrics.

    text
    kubectl -n monitoring apply -f ../../grafana/
  • You may access the grafana dashboard via the LoadBalancer (or NodePort) service IP or via a port-forward operation on localhost

    View the services running in the monitoring namespace

    text
    kubectl get svc -n monitoring

    Now copy the EXTERNAL-IP of grafana and view it in the browser

    Default username/password credentials: admin/admin

Configure the Monitoring Infrastructure

  • Add the prometheus datasource from monitoring namespace as DS_PROMETHEUS for Grafana via the Grafana Settings menu for PMM

  • Import the grafana dashboards

  • (optional) Import the grafana dashboard "MySQL Overview" provided here

  • (optional) Import the grafana dashboard "PXC Galera Node summary Performance" provided here

  • (optional) Use PMM for monitoring.

Execute the Chaos Experiments

text
kubectl apply -f ../../sample-chaos-injectors/chaos-experiments/percona/percona-network-loss.yaml
  • Verify execution of chaos experiments

    text
    kubectl describe chaosengine percona-network-chaos -n litmus

Visualize Chaos Impact


Overview (`monitoring/utils/sample-application-under-test/sock-shop/README.md`)

Demonstration

Monitor Chaos on Sock-Shop

Run chaos experiments and workflows on sock-shop application with grafana dashboard to monitor it.

Setup Sock-Shop Microservices Application

  • Apply the sock-shop microservices manifests

    text
    kubectl apply -f .
  • Wait until all services are up. Verify via kubectl get pods -n sock-shop

Setup the Monitoring Components

  • create service monitors for all the application services if using prometheus operator with service monitors.

    text
    kubectl -n sock-shop apply -f ../../sample-application-service-monitors/sock-shop/

Import the grafana dashboard

  • Import the grafana dashboard "Sock-Shop Performance" provided here

Execute the Chaos Experiments

  • For the sake of illustration, let us execute node and pod level, CPU hog experiments on the catalogue microservice & Memory Hog experiments on the orders microservice in a staggered manner.

    text
    kubectl apply -f ../../sample-chaos-injectors/chaos-experiments/catalogue/catalogue-pod-cpu-hog.yaml

    Wait for ~60s

    text
    kubectl apply -f ../../sample-chaos-injectors/chaos-experiments/orders/orders-pod-memory-hog.yaml

    Wait for ~60s

    text
    kubectl apply -f ../../sample-chaos-injectors/chaos-experiments/catalogue/catalogue-node-cpu-hog.yaml

    Wait for ~60s

    text
    kubectl apply -f ../../sample-chaos-injectors/chaos-experiments/orders/orders-node-memory-hog.yaml
  • Verify execution of chaos experiments

    text
    kubectl describe chaosengine catalogue-pod-cpu-hog -n litmus
    kubectl describe chaosengine orders-pod-memory-hog -n litmus
    kubectl describe chaosengine catalogue-node-cpu-hog -n litmus
    kubectl describe chaosengine orders-node-memory-hog -n litmus

Visualize Chaos Impact

  • Observe the impact of chaos injection through increased Latency & reduced QPS (queries per second) on the microservices
    under test.

Inject continous chaos using Argo CD.

  • Install Chaos workflow infrastructure.

    • Create argo namespace

      text
      kubectl create ns argo
    • Create the CRDs, workflow controller deployment with associated RBAC.

      text
      kubectl apply -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml -n argo
    • Install the argo CLI on the test harness machine (where the kubeconfig is available)

      bash
      # Download the binary
      curl -sLO https://github.com/argoproj/argo/releases/download/v2.11.0/argo-linux-amd64.gz
      
      # Unzip
      gunzip argo-linux-amd64.gz
      
      # Make binary executable
      chmod +x argo-linux-amd64
      
      # Move binary to path
      mv ./argo-linux-amd64 /usr/local/bin/argo
      
      # Test installation
      argo version
  • Create the Argo Access ServiceAccount

    text
    kubectl apply -f https://raw.githubusercontent.com/litmuschaos/chaos-workflows/master/Argo/argo-access.yaml -n litmus
  • Run one or more of the litmuschaos experiments as Chaos workflows using argo CLI or kubectl.

    Node CPU hog

    bash
    argo cron create ../../sample-chaos-injectors/chaos-workflows-with-argo-CD/catalogue/catalogue-node-cpu-hog-workflow.yaml -n litmus

    Node memory hog

    bash
    argo cron create ../../sample-chaos-injectors/chaos-workflows-with-argo-CD/orders/orders-node-memory-hog-workflow.yaml -n litmus

    Pod CPU hog

    bash
    kubectl apply -f ../../sample-chaos-injectors/chaos-workflows-with-argo-CD/catalogue/catalogue-pod-cpu-hog-workflow.yaml -n litmus

    Pod memory hog

    bash
    kubectl apply -f ../../sample-chaos-injectors/chaos-workflows-with-argo-CD/orders/orders-pod-memory-hog-workflow.yaml -n litmus
  • Visualize the Chaos cron workflow through argo UI by obtaining Node port or Load Balancer IP.

    text
    kubectl patch svc argo-server -n argo -p '{"spec": {"type": "NodePort"}}'

    OR

    text
    kubectl patch svc argo-server -n argo -p '{"spec": {"type": "LoadBalancer"}}'

Overview (`chaoscenter/graphql/server/pkg/metrics/README.md`)

LitmusChaos GraphQL Server Metrics

This document explains the Prometheus metrics exposed by the LitmusChaos GraphQL server.

Metrics Endpoint: http://localhost:8889/metrics
Port: Configurable via METRICS_PORT environment variable (default: 8889)


Available Metrics

API Metrics

litmus_api_requests_total
Counts total API requests to the GraphQL server, including GraphQL operation details.
Labels: endpoint, status, operation_name, operation_type
Example operation names: listExperiment, runChaosExperiment, getExperiment
Example operation types: query, mutation

litmus_api_response_time_milliseconds
Tracks how long API requests take to respond (in milliseconds).
Labels: endpoint, operation_name, operation_type
Type: Histogram with buckets from 10ms to 5s

litmus_api_error_requests_total
Counts API requests that resulted in errors.
Labels: endpoint, error_type

litmus_api_authentication_failures_total
Counts failed authentication attempts.
Labels: auth_method


Experiment Metrics

litmus_experiments_total
Shows total number of experiments in the system.
Labels: project_id, status, infra_id

litmus_experiment_runs_total
Counts how many times experiments have been run.
Labels: project_id, experiment_id, experiment_name, infra_id

litmus_experiment_run_duration_seconds
Tracks how long experiment runs take (in seconds).
Labels: project_id, experiment_id, experiment_name, infra_id
Type: Histogram with buckets from 1s to 30 minutes

litmus_experiment_status
Tracks the current status of experiment runs.
Labels: project_id, experiment_id, experiment_name, status, infra_id
Values: 1 = experiment started, 0 = experiment completed
The status label holds the phase string (e.g. Running, Completed, Stopped, Error)


Agent Metrics

litmus_connected_agents
Shows number of chaos agents currently connected.
Labels: project_id

litmus_disconnected_agents
Shows number of chaos agents that are disconnected.
Labels: project_id

litmus_total_agents
Shows total number of registered agents.
Labels: project_id


How to Use

Access the metrics endpoint:

bash
curl http://localhost:8889/metrics

Or configure Prometheus to scrape from your GraphQL server on port 8889.


Grafana Dashboard

A pre-built Grafana dashboard is available at grafana/litmuschaos-metrics-dashboard.json. Import it into Grafana to visualize all metrics out of the box.


Overview (`monitoring/platforms/kublr/grafana-dashboards/kubernetes/README.md`)

Node and Pod K8s metrics dashboard

This dashboard visualizes Node and Pod level CPU and memory utilization metrics interleaved with chaos events.

Prerequisites

  • Kublr's central monitoring with Prometheus enabled for litmus and node exporter metrics.

  • Chaos engine name must match the labels used in PromQL for the grafana dashboard.

Instructions

  • Download the dashboard json file.

  • Import the json file into grafana.

  • Change data source for the dashboard accordingly.

  • Tune the PromQL queries to match the labels with engine name and other parameters as per need.

Screenshot


Overview (`monitoring/platforms/kublr/grafana-dashboards/sock-shop/README.md`)

Sock shop application metrics dashboard

This dashboard visualizes Sock Shop application metrics interleaved with chaos events and chaos exporter metrics.

Prerequisites

  • Sock shop microservices application deployments.

  • Kublr's central monitoring with Prometheus enabled for litmus and sock-shop application metrics.

  • Chaos engine name must match the labels used in PromQL for the grafana dashboard.

Instructions

  • Download the dashboard json file.

  • Import the json file into grafana.

  • Change data source for the dashboard accordingly.

  • Tune the PromQL queries to match the labels with engine name and other parameters as per need.

Screenshot


Mkdocs Docs Chaos Scheduler V1.10.0.Yaml (`mkdocs/docs/chaos-scheduler-v1.10.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: ["","apps","batch","litmuschaos.io","argoproj.io"]
    resources: ["pods","jobs","deployments","daemonsets","statefulsets","events","configmaps","services","chaosengines","chaosexperiments","chaosresults","chaosschedules","rollouts"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:1.10.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
subresources:
validation:
openAPIV3Schema:
properties:
apiVersion:
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
type: object
properties:
engineTemplateSpec:
type: object
properties:
monitoring:
type: boolean
jobCleanUpPolicy:
type: string
pattern: "^(delete|retain)$"
annotationCheck:
type: string
pattern: "^(true|false)$"
appinfo:
type: object
properties:
appkind:
type: string
pattern: "^(deployment|statefulset|daemonset|deploymentconfig|rollout)$"
applabel:
pattern: "([a-z0-9A-Z_\.-/]+)=([a-z0-9A-Z_\.-/_]+)"
type: string
appns:
type: string
auxiliaryAppInfo:
type: string
engineState:
type: string
pattern: "^(active|stop|initialized|stopped)$"
chaosServiceAccount:
type: string
components:
type: object
properties:
runner:
type: object
properties:
image:
type: string
type:
type: string
pattern: "^(go)$"
runnerannotation:
type: object
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
experiments:
type: array
items:
type: object
properties:
name:
type: string
spec:
type: object
properties:
probe:
type: array
items:
type: object
properties:
name:
type: string
type:
type: string
k8sProbe/inputs:
type: object
properties:
command:
type: object
properties:
group:
type: string
version:
type: string
resource:
type: string
namespace:
type: string
fieldSelector:
type: string
labelSelector:
type: string
expectedResult:
type: string
cmdProbe/inputs:
type: object
properties:
command:
type: string
expectedResult:
type: string
source:
type: string
httpProbe/inputs:
type: object
properties:
url:
type: string
expectedResponseCode:
type: string
runProperties:
type: object
properties:
probeTimeout:
type: integer
interval:
type: integer
retry:
type: integer
mode:
type: string
components:
type: object
properties:
statusCheckTimeouts:
type: object
properties:
delay:
type: integer
timeout:
type: integer
nodeSelector:
type: object
minLength: 1
experimentImage:
type: string
env:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
configMaps:
type: array
items:
type: object
properties:
name:
type: string
mountPath:
type: string
secrets:
type: array
items:
type: object
properties:
name:
type: string
mountPath:
type: string
experimentannotation:
type: object
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
schedule:
oneOf:
- required:
- now
- required:
- once
- required:
- repeat
properties:
now:
type: boolean
once:
properties:
executionTime:
format: date-time
type: date
type: object
repeat:
properties:
timeRange:
properties:
endTime:
format: date-time
type: date
startTime:
format: date-time
type: date
type: object
workkHours:
properties:
includedHours:
type: string
type: object
required:
- includedHours
workDays:
properties:
includedDays:
pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
type: string
type: object
required:
- includedDays
properties:
properties:
minChaosInterval:
pattern: (([1-6][0-9]|[1-9])m)|(\d+h)
type: string
random:
type: boolean
type: object
required:
- minChaosInterval
type: object
required:
- properties
type: object
status:
type: object
version: v1alpha1
versions:

  • name: v1alpha1
    served: true
    storage: true

Mkdocs Docs Chaos Scheduler V1.12.0.Yaml (`mkdocs/docs/chaos-scheduler-v1.12.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: ["","apps","batch","litmuschaos.io","argoproj.io"]
    resources: ["pods","jobs","deployments","daemonsets","statefulsets","events","configmaps","services","chaosengines","chaosexperiments","chaosresults","chaosschedules","rollouts"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:1.12.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
subresources:
validation:
openAPIV3Schema:
properties:
apiVersion:
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
type: object
properties:
engineTemplateSpec:
type: object
properties:
monitoring:
type: boolean
jobCleanUpPolicy:
type: string
pattern: "^(delete|retain)$"
annotationCheck:
type: string
pattern: "^(true|false)$"
appinfo:
type: object
properties:
appkind:
type: string
pattern: "^(deployment|statefulset|daemonset|deploymentconfig|rollout)$"
applabel:
pattern: "([a-z0-9A-Z_\.-/]+)=([a-z0-9A-Z_\.-/_]+)"
type: string
appns:
type: string
auxiliaryAppInfo:
type: string
engineState:
type: string
pattern: "^(active|stop)$"
chaosServiceAccount:
type: string
components:
type: object
properties:
runner:
type: object
properties:
image:
type: string
type:
type: string
pattern: "^(go)$"
runnerannotation:
type: object
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
experiments:
type: array
items:
type: object
properties:
name:
type: string
spec:
type: object
properties:
probe:
type: array
items:
type: object
required:
- runProperties
properties:
name:
type: string
type:
type: string
k8sProbe/inputs:
type: object
properties:
command:
type: object
properties:
group:
type: string
version:
type: string
resource:
type: string
namespace:
type: string
fieldSelector:
type: string
labelSelector:
type: string
expectedResult:
type: string
cmdProbe/inputs:
type: object
properties:
command:
type: string
expectedResult:
type: string
source:
type: string
httpProbe/inputs:
type: object
properties:
url:
type: string
expectedResponseCode:
type: string
runProperties:
type: object
minProperties: 3
required:
- probeTimeout
- interval
- retry
properties:
probeTimeout:
type: integer
interval:
type: integer
retry:
type: integer
mode:
type: string
components:
type: object
properties:
statusCheckTimeouts:
type: object
properties:
delay:
type: integer
timeout:
type: integer
nodeSelector:
type: object
minLength: 1
experimentImage:
type: string
env:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
configMaps:
type: array
items:
type: object
properties:
name:
type: string
mountPath:
type: string
secrets:
type: array
items:
type: object
properties:
name:
type: string
mountPath:
type: string
experimentannotation:
type: object
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
schedule:
oneOf:
- required:
- now
- required:
- once
- required:
- repeat
properties:
now:
type: boolean
once:
properties:
executionTime:
format: date-time
type: date
type: object
repeat:
properties:
timeRange:
properties:
endTime:
format: date-time
type: date
startTime:
format: date-time
type: date
type: object
workkHours:
properties:
includedHours:
type: string
type: object
required:
- includedHours
workDays:
properties:
includedDays:
pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
type: string
type: object
required:
- includedDays
properties:
properties:
minChaosInterval:
pattern: (([1-6][0-9]|[1-9])m)|(\d+h)
type: string
random:
type: boolean
type: object
required:
- minChaosInterval
type: object
required:
- properties
type: object
status:
type: object
version: v1alpha1
versions:

  • name: v1alpha1
    served: true
    storage: true

Mkdocs Docs Chaos Scheduler V1.13.0.Yaml (`mkdocs/docs/chaos-scheduler-v1.13.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: ["","apps","batch","litmuschaos.io","argoproj.io"]
    resources: ["pods","jobs","deployments","daemonsets","statefulsets","events","configmaps","services","chaosengines","chaosexperiments","chaosresults","chaosschedules","rollouts"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:1.13.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
subresources:
validation:
openAPIV3Schema:
properties:
apiVersion:
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
type: object
properties:
engineTemplateSpec:
type: object
properties:
monitoring:
type: boolean
jobCleanUpPolicy:
type: string
pattern: ^(delete|retain)$
# alternate ways to do this in case of complex pattern matches
#oneOf:
# - pattern: '^delete$'
# - pattern: '^retain$'
annotationCheck:
type: string
pattern: ^(true|false)$
appinfo:
type: object
properties:
appkind:
type: string
pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
applabel:
type: string
appns:
type: string
auxiliaryAppInfo:
type: string
engineState:
type: string
pattern: ^(active|stop)$
chaosServiceAccount:
type: string
components:
type: object
properties:
runner:
type: object
properties:
image:
type: string
type:
type: string
pattern: ^(go)$
runnerannotation:
type: object
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
value:
type: string
minLength: 1
experiments:
type: array
items:
type: object
properties:
name:
type: string
spec:
type: object
properties:
probe:
type: array
items:
type: object
required:
- runProperties
properties:
name:
type: string
type:
type: string
minLength: 1
pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
k8sProbe/inputs:
type: object
properties:
command:
type: object
properties:
group:
type: string
version:
type: string
resource:
type: string
namespace:
type: string
fieldSelector:
type: string
labelSelector:
type: string
cmdProbe/inputs:
type: object
properties:
command:
type: string
minLength: 1
comparator:
type: object
properties:
type:
type: string
minLength: 1
pattern: ^(int|float|string)$
criteria:
type: string
value:
type: string
source:
type: string
minLength: 1
httpProbe/inputs:
type: object
properties:
url:
type: string
minLength: 1
insecureSkipVerify:
type: boolean
minLength: 1
method:
type: object
minProperties: 1
properties:
get:
type: object
properties:
criteria:
type: string
minLength: 1
responseCode:
type: string
minLength: 1
post:
type: object
properties:
contentType:
type: string
minLength: 1
body:
type: string
bodyPath:
type: string
criteria:
type: string
minLength: 1
responseCode:
type: string
minLength: 1
promProbe/inputs:
type: object
properties:
endpoint:
type: string
query:
type: string
queryPath:
type: string
comparator:
type: object
properties:
criteria:
type: string
value:
type: string
runProperties:
type: object
minProperties: 3
required:
- probeTimeout
- interval
- retry
properties:
probeTimeout:
type: integer
interval:
type: integer
retry:
type: integer
probePollingInterval:
type: integer
initialDelaySeconds:
type: integer
mode:
type: string
pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
minLength: 1
operation:
type: string
pattern: ^(present|absent|create|delete)$
minLength: 1
data:
type: string
components:
type: object
properties:
statusCheckTimeouts:
type: object
properties:
delay:
type: integer
timeout:
type: integer
nodeSelector:
type: object
minLength: 1
experimentImage:
type: string
env:
type: array
items:
present in a Container.
properties:
name:
Must be a C_IDENTIFIER.
type: string
value:
are expanded using the previous defined environment
variables in the container and any service environment
variables. If a variable cannot be resolved,
the reference in the input string will be unchanged.
The $(VAR_NAME) syntax can be escaped with a
double $$, ie: $$(VAR_NAME). Escaped references
will never be expanded, regardless of whether
the variable exists or not. Defaults to "".'
type: string
valueFrom:
value. Cannot be used if value is not empty.
properties:
configMapKeyRef:
properties:
key:
type: string
name:
info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
or its key must be defined
type: boolean
required:
- key
type: object
fieldRef:
supports metadata.name, metadata.namespace,
metadata.labels, metadata.annotations, spec.nodeName,
spec.serviceAccountName, status.hostIP,
status.podIP.'
properties:
apiVersion:
FieldPath is written in terms of, defaults
to "v1".
type: string
fieldPath:
in the specified API version.
type: string
required:
- fieldPath
type: object
resourceFieldRef:
only resources limits and requests (limits.cpu,
limits.memory, limits.ephemeral-storage,
requests.cpu, requests.memory and requests.ephemeral-storage)
are currently supported.'
properties:
containerName:
for volumes, optional for env vars'
type: string
divisor:
anyOf:
- type: integer
- type: string
of the exposed resources, defaults to
"1"
pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
resource:
type: string
required:
- resource
type: object
secretKeyRef:
the pod's namespace
properties:
key:
select from. Must be a valid secret
key.
type: string
name:
info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
or its key must be defined
type: boolean
required:
- key
type: object
type: object
required:
- name
type: object
configMaps:
type: array
items:
type: object
properties:
name:
type: string
mountPath:
type: string
secrets:
type: array
items:
type: object
properties:
name:
type: string
mountPath:
type: string
experimentannotation:
type: object
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
schedule:
oneOf:
- required:
- now
- required:
- once
- required:
- repeat
properties:
now:
type: boolean
once:
properties:
executionTime:
format: date-time
type: date
type: object
repeat:
properties:
timeRange:
properties:
endTime:
format: date-time
type: date
startTime:
format: date-time
type: date
type: object
workkHours:
properties:
includedHours:
type: string
type: object
required:
- includedHours
workDays:
properties:
includedDays:
pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
type: string
type: object
required:
- includedDays
properties:
properties:
minChaosInterval:
pattern: (([1-6][0-9]|[1-9])m)|(\d+h)
type: string
random:
type: boolean
type: object
required:
- minChaosInterval
type: object
required:
- properties
type: object
status:
type: object
version: v1alpha1
versions:

  • name: v1alpha1
    served: true
    storage: true

Mkdocs Docs Chaos Scheduler V1.13.6.Yaml (`mkdocs/docs/chaos-scheduler-v1.13.6.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:1.13.6
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: string
    minLength: 1
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    pattern: (([1-6][0-9]|[1-9])m)|(\d+h)
    type: string
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V1.13.8.Yaml (`mkdocs/docs/chaos-scheduler-v1.13.8.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:1.13.8
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: string
    minLength: 1
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    pattern: (([1-6][0-9]|[1-9])m)|(\d+h)
    type: string
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.0.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.0.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.0.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: string
    minLength: 1
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    pattern: (([1-6][0-9]|[1-9])m)|(\d+h)
    type: string
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.1.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.1.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.1.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.1.1.Yaml (`mkdocs/docs/chaos-scheduler-v2.1.1.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.1.1
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.10.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.10.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.10.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.11.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.11.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.11.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.12.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.12.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.12.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.13.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.13.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.13.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.14.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.14.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.14.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.2.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.2.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.2.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.3.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.3.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.3.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limits.ephemeral-storage,
    requests.cpu, requests.memory and requests.ephemeral-storage)
    are currently supported.'
    properties:
    containerName:
    for volumes, optional for env vars'
    type: string
    divisor:
    anyOf:
    - type: integer
    - type: string
    of the exposed resources, defaults to
    "1"
    pattern: ^(+|-)?(([0-9]+(.[0-9])?)|(.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|(eE?(([0-9]+(.[0-9])?)|(.[0-9]+))))?$
    x-kubernetes-int-or-string: true
    resource:
    type: string
    required:
    - resource
    type: object
    secretKeyRef:
    the pod's namespace
    properties:
    key:
    select from. Must be a valid secret
    key.
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    type: object
    required:
    - name
    type: object
    configMaps:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    secrets:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    mountPath:
    type: string
    experimentAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array

    concurrencyPolicy:
    type: string
    scheduleState:
    type: string
    schedule:
    oneOf:
    - required:
    - now
    - required:
    - once
    - required:
    - repeat
    properties:
    now:
    type: boolean
    once:
    properties:
    executionTime:
    format: date-time
    type: string
    type: object
    repeat:
    properties:
    timeRange:
    properties:
    endTime:
    format: date-time
    type: string
    startTime:
    format: date-time
    type: string
    type: object
    workHours:
    properties:
    includedHours:
    type: string
    type: object
    required:
    - includedHours
    workDays:
    properties:
    includedDays:
    pattern: ((Mon|Tue|Wed|Thu|Fri|Sat|Sun)(,))*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)
    type: string
    type: object
    required:
    - includedDays
    properties:
    properties:
    minChaosInterval:
    properties:
    hour:
    properties:
    everyNthHour:
    type: integer
    minuteOfTheHour:
    type: integer
    type: object
    minute:
    properties:
    everyNthMinute:
    type: integer
    type: object
    type: object
    minProperties: 1
    maxProperties: 1
    random:
    type: boolean
    type: object
    required:
    - minChaosInterval
    type: object
    required:
    - properties
    type: object
    status:
    x-kubernetes-preserve-unknown-fields: true
    type: object

    served: true
    storage: true
    subresources: {}
    conversion:
    strategy: None

Mkdocs Docs Chaos Scheduler V2.4.0.Yaml (`mkdocs/docs/chaos-scheduler-v2.4.0.yaml`)

apiVersion: v1 kind: Namespace metadata: name: litmus

apiVersion: v1
kind: ServiceAccount
metadata:
name: scheduler
namespace: litmus
labels:
name: scheduler


apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: scheduler
labels:
name: scheduler
rules:

  • apiGroups: [""]
    resources: ["pods","events", "configmaps","services"]
    verbs: ["create","get","list","delete","update","patch"]
  • apiGroups: ["apps"]
    resources: ["replicasets","deployments"]
    verbs: ["get","list"]
  • apiGroups: ["litmuschaos.io"]
    resources: ["chaosengines","chaosschedules"]
    verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scheduler
labels:
name: scheduler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scheduler
subjects:

  • kind: ServiceAccount
    name: scheduler
    namespace: litmus

apiVersion: apps/v1
kind: Deployment
metadata:
name: chaos-scheduler
namespace: litmus
spec:
replicas: 1
selector:
matchLabels:
name: chaos-scheduler
template:
metadata:
labels:
name: chaos-scheduler
spec:
serviceAccountName: scheduler
containers:
- name: chaos-scheduler
image: litmuschaos/chaos-scheduler:2.4.0
command:
- chaos-scheduler
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-scheduler"


apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosschedules.litmuschaos.io
spec:
group: litmuschaos.io
names:
kind: ChaosSchedule
listKind: ChaosScheduleList
plural: chaosschedules
singular: chaosschedule
scope: Namespaced
versions:

  • name: v1alpha1
    schema:
    openAPIV3Schema:
    type: object
    properties:
    apiVersion:
    of an object. Servers should convert recognized schemas to the latest
    internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    type: string
    kind:
    object represents. Servers may infer this from the endpoint the client
    submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    type: string
    metadata:
    type: object
    spec:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    engineTemplateSpec:
    type: object
    properties:
    jobCleanUpPolicy:
    type: string
    pattern: ^(delete|retain)$
    # alternate ways to do this in case of complex pattern matches
    #oneOf:
    # - pattern: '^delete$'
    # - pattern: '^retain$'
    annotationCheck:
    type: string
    pattern: ^(true|false)$
    defaultAppHealthCheck:
    type: string
    pattern: ^(true|false)$
    appinfo:
    type: object
    properties:
    appkind:
    type: string
    pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
    applabel:
    type: string
    appns:
    type: string
    auxiliaryAppInfo:
    type: string
    engineState:
    type: string
    pattern: ^(active|stop)$
    chaosServiceAccount:
    type: string
    terminationGracePeriodSeconds:
    type: integer
    components:
    type: object
    properties:
    runner:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    image:
    type: string
    type:
    type: string
    pattern: ^(go)$
    runnerAnnotations:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    value:
    type: string
    minLength: 1
    tolerations:
    items:
    properties:
    effect:
    type: string
    key:
    type: string
    operator:
    type: string
    tolerationSeconds:
    format: int64
    type: integer
    value:
    type: string
    type: object
    type: array
    experiments:
    type: array
    items:
    type: object
    properties:
    name:
    type: string
    spec:
    type: object
    properties:
    probe:
    type: array
    items:
    type: object
    required:
    - runProperties
    properties:
    name:
    type: string
    type:
    type: string
    minLength: 1
    pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
    k8sProbe/inputs:
    type: object
    properties:
    group:
    type: string
    version:
    type: string
    resource:
    type: string
    namespace:
    type: string
    fieldSelector:
    type: string
    labelSelector:
    type: string
    operation:
    type: string
    pattern: ^(present|absent|create|delete)$
    minLength: 1
    cmdProbe/inputs:
    type: object
    properties:
    command:
    type: string
    minLength: 1
    comparator:
    type: object
    properties:
    type:
    type: string
    minLength: 1
    pattern: ^(int|float|string)$
    criteria:
    type: string
    value:
    type: string
    source:
    type: object
    properties:
    image:
    type: string
    minLength: 1
    hostNetwork:
    type: boolean
    httpProbe/inputs:
    type: object
    properties:
    url:
    type: string
    minLength: 1
    insecureSkipVerify:
    type: boolean
    responseTimeout:
    type: integer
    method:
    type: object
    minProperties: 1
    properties:
    get:
    type: object
    properties:
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    post:
    type: object
    properties:
    contentType:
    type: string
    minLength: 1
    body:
    type: string
    bodyPath:
    type: string
    criteria:
    type: string
    minLength: 1
    responseCode:
    type: string
    minLength: 1
    promProbe/inputs:
    type: object
    properties:
    endpoint:
    type: string
    query:
    type: string
    queryPath:
    type: string
    comparator:
    type: object
    properties:
    criteria:
    type: string
    value:
    type: string
    runProperties:
    type: object
    minProperties: 3
    required:
    - probeTimeout
    - interval
    - retry
    properties:
    probeTimeout:
    type: integer
    interval:
    type: integer
    retry:
    type: integer
    probePollingInterval:
    type: integer
    initialDelaySeconds:
    type: integer
    stopOnFailure:
    type: boolean
    mode:
    type: string
    pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
    minLength: 1
    data:
    type: string
    components:
    x-kubernetes-preserve-unknown-fields: true
    type: object
    properties:
    statusCheckTimeouts:
    type: object
    properties:
    delay:
    type: integer
    timeout:
    type: integer
    nodeSelector:
    type: object
    additionalProperties:
    type: string
    properties:
    key:
    type: string
    minLength: 1
    allowEmptyValue: false
    value:
    type: string
    minLength: 1
    allowEmptyValue: false
    experimentImage:
    type: string
    env:
    type: array
    items:
    present in a Container.
    properties:
    name:
    Must be a C_IDENTIFIER.
    type: string
    value:
    are expanded using the previous defined environment
    variables in the container and any service environment
    variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged.
    The $(VAR_NAME) syntax can be escaped with a
    double $$, ie: $$(VAR_NAME). Escaped references
    will never be expanded, regardless of whether
    the variable exists or not. Defaults to "".'
    type: string
    valueFrom:
    value. Cannot be used if value is not empty.
    properties:
    configMapKeyRef:
    properties:
    key:
    type: string
    name:
    info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    TODO: Add other useful fields. apiVersion,
    kind, uid?'
    type: string
    optional:
    or its key must be defined
    type: boolean
    required:
    - key
    type: object
    fieldRef:
    supports metadata.name, metadata.namespace,
    metadata.labels, metadata.annotations, spec.nodeName,
    spec.serviceAccountName, status.hostIP,
    status.podIP.'
    properties:
    apiVersion:
    FieldPath is written in terms of, defaults
    to "v1".
    type: string
    fieldPath:
    in the specified API version.
    type: string
    required:
    - fieldPath
    type: object
    resourceFieldRef:
    only resources limits and requests (limits.cpu,
    limits.memory, limit