chaos-litmus

by startxfr

Helm chartv21.3.418App 3.26.0GPL-3.0-or-laterVerified publisher

Helm chart used to deploy litmus on Openshift or Kubernetes cluster. Litmus is as a chaos engine with chaos git or gui configuration backend. This chart is part of the startx chaos helm chart suite.

About this chart

Chaos Chart : Litmus

This helm chart is used to deploy Litmus on an Openshift or Kubernetes cluster. Litmus is a chaos engineering platform : a web portal (ChaosCenter) where chaos experiments are designed, scheduled and followed as workflows.

Upstream project : litmuschaos/litmus, deployed with the upstream helm chart litmus version 3.26.0 ; images litmuschaos/litmusportal-frontend, litmusportal-server and litmusportal-auth-server, tag 3.26.0, and mongo:4.2.8.

This chart is part of the chaos startx helm chart series focused on deploying various kind of chaos tools for cluster infrastructure or applications chaos-testing.

Requirements and guidelines

Read the startx helm-repository homepage for more information on how to use these resources.

Deploy this helm chart on openshift

1. Connect to your Openshift cluster

oc login -t <token> <cluster-url>

2. Install the repository

helm repo add startx https://helm-repository.readthedocs.io/en/latest/repos/stable/

3. Get information about this chart

helm show chart startx/chaos-litmus

4. Install this component

# Create the chaos-litmus namespace
helm install chaos-litmus-project startx/chaos-litmus --set project.enabled=true
# Create the two Secrets holding the credentials (the chart has no default password)
oc -n chaos-litmus create secret generic litmus-admin \
  --from-literal=ADMIN_USERNAME=admin --from-literal=ADMIN_PASSWORD="$(openssl rand -base64 18)"
oc -n chaos-litmus create secret generic litmus-mongodb \
  --from-literal=mongodb-root-password="$(openssl rand -hex 16)" --from-literal=mongodb-replica-set-key="$(openssl rand -hex 16)"
# Deploy the litmus instance
helm install chaos-litmus-instance startx/chaos-litmus -n chaos-litmus \
  --set litmus.enabled=true --set litmus.existingSecret=litmus-admin --set litmus.mongodb.auth.existingSecret=litmus-mongodb

Default values

The default values.yaml deploys nothing : each part is switched on by its enabled key.

  • project.enabled=true : 1 namespace chaos-litmus (see the project chart)
  • litmus.enabled=true : the litmus portal (frontend, server, auth-server, MongoDB), 1 SecurityContextConstraints privileged-litmus with its Role and RoleBinding
  • litmus.expose=true : 1 Route frontend
  • litmus.exampleWorkflow=true : 1 Argo Workflow startx-workflow. The workflows.argoproj.io definition must exist on the cluster (it comes with a Litmus chaos infrastructure or with Argo Workflows), otherwise the install fails.

Credentials : the chart ships no password. litmus.enabled=true refuses to render, with an explicit message, until it gets :

  • the portal administrator : litmus.existingSecret (a Secret with the keys ADMIN_USERNAME and ADMIN_PASSWORD) or litmus.adminConfig.ADMIN_PASSWORD ;
  • the MongoDB deployed with the portal : litmus.mongodb.auth.existingSecret (keys mongodb-root-password and mongodb-replica-set-key) or litmus.mongodb.auth.rootPassword ;
  • with an external MongoDB (litmus.mongodb.enabled=false) : the keys DB_USER and DB_PASSWORD in litmus.existingSecret, or litmus.adminConfig.DBUSER and DBPASSWORD.

Prefer the Secrets : a password given as a value is stored in the helm release and, for MongoDB, written in the portal Deployments by the upstream chart.

Migration from 21.3.390 and earlier (breaking changes) :

  • the passwords litmus (administrator) and 1234 (MongoDB) are no longer defaults. For an existing release, give the values it was installed with (litmus.adminConfig.ADMIN_PASSWORD=litmus, litmus.mongodb.auth.rootPassword=1234), then change them ; a new install must provide its own.
  • the startx-workflow Workflow is no longer created with litmus.enabled : set litmus.exampleWorkflow=true to keep it.
  • litmus.adminConfig.JWTSecret is removed (the upstream chart does not read it).
KeyDefaultDescription
context.scopecompanynameName of the global scope for this application (organizational tenant)
context.clusterclusternameName of the cluster running this application (platform tenant)
context.environmentdevName of the environment for this application (ex: dev, factory, preprod or prod)
context.componentchaosComponent name of this application (logical tenant)
context.applitmusApplication name (functional tenant, default use Chart name)
context.version3.26.0Version name of this application (default use Chart appVersion)
project{...}Values of the project chart, which creates the namespace
project.enabledfalseCreate the namespace
project.project.namechaos-litmusName of the namespace ; also the namespace of the resources created by this chart
litmus{...}Values of the upstream litmus chart, passed as is
litmus.enabledfalseDeploy the litmus portal and the privileged-litmus SecurityContextConstraints ; requires the credentials above
litmus.exposefalseCreate the Openshift route frontend to the litmus portal, on top of the route of the upstream chart (litmus.openshift.route)
litmus.exampleWorkflowfalseCreate the example Argo Workflow startx-workflow
litmus.existingSecret""Secret holding ADMIN_USERNAME and ADMIN_PASSWORD (and DB_USER, DB_PASSWORD with an external MongoDB)
litmus.adminConfig.ADMIN_PASSWORD""Administrator password, when litmus.existingSecret is empty
litmus.mongodb.auth.existingSecret""Secret holding mongodb-root-password and mongodb-replica-set-key
litmus.mongodb.auth.rootPassword""MongoDB root password, when litmus.mongodb.auth.existingSecret is empty
litmus.portal{...}Frontend, GraphQL server and authentication server of the portal

Values files

  • startx-project : values-startx-project.yaml, namespace startx-chaos-litmus only
  • startx-deploy : values-startx-deploy.yaml, litmus portal in the namespace startx-chaos-litmus ; it expects the Secrets litmus-admin and litmus-mongodb in that namespace (see step 4 above)
helm install chaos-litmus-project startx/chaos-litmus -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/chaos-litmus/values-startx-project.yaml
helm install chaos-litmus-instance startx/chaos-litmus -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/chaos-litmus/values-startx-deploy.yaml -n startx-chaos-litmus

Usage examples

Default : namespace then portal

Two releases of the same chart, the namespace first, with the credentials in the Secrets litmus-admin and litmus-mongodb (created as in step 4 above).

helm install chaos-litmus-project startx/chaos-litmus --set project.enabled=true
helm install chaos-litmus-instance startx/chaos-litmus -n chaos-litmus \
  --set litmus.enabled=true --set litmus.existingSecret=litmus-admin --set litmus.mongodb.auth.existingSecret=litmus-mongodb

Minimal : portal in an existing namespace

The namespace already exists, with its two Secrets ; the portal is reached with oc port-forward.

# my-litmus-minimal-values.yaml
project:
  enabled: false
  project:
    name: my-chaos
litmus:
  enabled: true
  existingSecret: litmus-admin
  mongodb:
    auth:
      existingSecret: litmus-mongodb
helm install chaos-litmus startx/chaos-litmus -f my-litmus-minimal-values.yaml -n my-chaos
oc port-forward -n my-chaos svc/chaos-litmus-frontend-service 9091:9091

Advanced : exposed portal, example workflow and public URL

The portal is exposed with a route, the public URL is given to the server and the example workflow is created (the Argo Workflow definition must exist).

# my-litmus-values.yaml
context:
  scope: myorg
  cluster: mycluster
  environment: prod
  component: chaos
  app: litmus
litmus:
  enabled: true
  expose: true
  exampleWorkflow: true
  existingSecret: litmus-admin
  mongodb:
    auth:
      existingSecret: litmus-mongodb
  portal:
    server:
      graphqlServer:
        genericEnv:
          CHAOS_CENTER_UI_ENDPOINT: https://frontend-chaos-litmus.apps.mycluster.example.com
helm install chaos-litmus-instance startx/chaos-litmus -f my-litmus-values.yaml -n chaos-litmus

Deploy with ArgoCD

One AppProject and two Applications : chaos-litmus-project (wave 1, the namespace) then chaos-litmus-instance (wave 5, the portal and its route). The instance Application reads the credentials from the Secrets litmus-admin and litmus-mongodb : create them in the chaos-litmus namespace (step 4 above, or an ExternalSecret) once the project Application is synced. The files are in examples/argocd.

git clone https://github.com/startxfr/helm-repository.git
cd helm-repository/charts/chaos-litmus
oc apply -k examples/argocd/

Each Application sets the enabled key of the other part to false, so that the two Applications never render the same resource. Delete chaos-litmus-instance first, wait for it to be gone, then delete chaos-litmus-project (it has no finalizer : a namespace can be slow to terminate).

History

ReleaseDateDescription
16.19.592024-12-09Align all chart to the 16.19.59 release
17.14.902025-04-30Publish stable release for 4.17 version
18.11.712025-11-27Align all charts to the same release
18.23.02026-02-28Start 4.19 branch
19.23.172026-03-02Align all dependencies to chart v19.23.11
20.14.152026-03-02Update all charts to OCP version 4.20.14
21.3.02026-03-02Update all chart to OCP version 4.21.3
21.3.2032026-06-24Improve chaos-litmus options
21.3.2782026-08-14add centigpu
21.3.3002026-10-21Add new charts and align all to this release
21.3.3092026-10-27Adding new charts perconna and align all to v21.3.309
21.3.3132026-11-04Add cluster-unifai and cluster-qdrant, align all charts to 21.3.313
21.3.3212026-11-05Adding external secret management
21.3.3712026-11-19Add Sail, oauthProxy, DSCInitialization, spot machines and annotations support
21.3.3732026-11-19align inter-chart dependency pins
21.3.3772026-11-19full repository release: aligned pins, ArgoCD source fix, schemas and docs
21.3.3792026-11-19conventions wave: spelling, READMEs, ArgoCD examples and values-app, oauth switch
21.3.3892026-11-19full repository release: HTTPS dependency URLs, dependency-ordered release, schema guard, docs and examples
21.3.3902026-11-20full repository release: test fix, keepalived README, aligned pins
21.3.3912026-11-21chaos charts: krkn v5.2.15, new chaos-pipeline chart, security fixes for litmus and monkey; breaking, see README migration notes
21.3.3922026-11-21full repository release: chaos-pipeline run parameters and authenticated health check, aligned pins
21.3.3972026-11-21stable repository release 21.3.397: all charts aligned, unifai delegation cap documentation
21.3.3982026-11-21project: dockercfg existi

Deploy chaos-litmus with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has chaos-litmus on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartchaos-litmus is pinned at v21.3.418 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply