chaos-mesh

by KubeSphere

Helm chartv2.5.1App 2.5.1Apache-2.0

Chaos Mesh is a cloud-native Chaos Engineering platform that orchestrates chaos on Kubernetes environments.

About this chart

Chaos Mesh

Chaos Mesh is a cloud-native Chaos Engineering platform that orchestrates chaos on Kubernetes environments.

Introduction

This chart bootstraps a Chaos Mesh deployment on a Kubernetes cluster using the Helm package manager.

Deploy

Before deploying Chaos Mesh, make sure you have installed the Prerequisites. And then follow the install-by-helm doc step by step.

Configuration

The following tables list the configurable parameters of the Chaos Mesh chart and their default values.

ParameterDescriptionDefault
nameOverride``
fullnameOverride``
customLabelsCustomized labels that will be tagged on all the resources of Chaos Mesh{}
clusterScopedWhether chaos-mesh should manage kubernetes cluster wide chaos.Also see rbac.create and controllerManager.serviceAccounttrue
rbac.createCreating rbac API Objects. Also see clusterScoped and controllerManager.serviceAccounttrue
timezoneThe timezone where controller-manager, chaos-daemon and dashboard uses. For example: UTC, Asia/ShanghaiUTC
enableProfilingA flag to enable pprof in controller-manager and chaos-daemontrue
enableCtrlServerA flag to enable ctrlserver which provides service to chaosctl in controller-manager.true
images.registryThe global container registry for the images, you could replace it with your self-hosted container registry.ghcr.io
images.tagThe global image tag (for example, semiVer with prefix v, or latest).latest
imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
controllerManager.securityContextPod securityContext if needed{}
controllerManager.hostNetworkRunning chaos-controller-manager on host networkfalse
controllerManager.allowHostNetworkTestingAllow testing on hostNetwork podsfalse
controllerManager.serviceAccountThe serviceAccount for chaos-controller-managerchaos-controller-manager
controllerManager.priorityClassNameCustom priorityClassName for using pod priorities``
controllerManager.replicaCountReplicas for chaos-controller-manager3
controllerManager.image.registryOverride global registry, empty value means using the global images.registry``
controllerManager.image.repositoryRepository part for image of chaos-controller-managerchaos-mesh/chaos-mesh
controllerManager.image.tagOverride global tag, empty value means using the global images.tag``
controllerManager.imagePullPolicyImage pull policyAlways
controllerManager.enableFilterNamespaceIf enabled, only pods in the namespace annotated with "chaos-mesh.org/inject": "enabled" could be injectedfalse
controllerManager.service.typeKubernetes Service type for service chaos-controller-managerClusterIP
controllerManager.resourcesCPU/Memory resource requests/limits for chaos-controller-manager pod{requests: { cpu: "25m", memory: "256Mi" }, limits:{}}
controllerManager.nodeSelectorNode labels for chaos-controller-manager pod assignment{}
controllerManager.tolerationsToleration labels for chaos-controller-manager pod assignment[]
controllerManager.affinityMap of chaos-controller-manager node/pod affinities{}
controllerManager.podAnnotationsPod annotations of chaos-controller-manager{}
controllerManager.enabledControllersA list of controllers to enable. "*" enables all controllers by default.["*"]
controllerManager.enabledWebhooksA list of webhooks to enable. "*" enables all webhooks by default.["*"]
controllerManager.podChaos.podFailure.pauseImageCustom Pause Container Image for Pod Failure Chaosgcr.io/google-containers/pause:latest
controllerManager.leaderElection.enabledEnable leader election for controller manager.true
controllerManager.leaderElection.leaseDurationThe duration that non-leader candidates will wait to force acquire leadership. This is measured against time of last observed ack.15s
controllerManager.leaderElection.renewDeadlineThe duration that the acting control-plane will retry refreshing leadership before giving up.10s
controllerManager.leaderElection.retryPeriodThe duration the LeaderElector clients should wait between tries of actions.2s
controllerManager.chaosdSecurityModeEnabled for mTLS connection between chaos-controller-manager and chaosdtrue
chaosDaemon.image.registryOverride global registry, empty value means using the global images.registry``
chaosDaemon.image.repositoryRepository part for image of chaos-daemonchaos-mesh/chaos-daemon
chaosDaemon.image.tagOverride global tag, empty value means using the global images.tag``
chaosDaemon.imagePullPolicyImage pull policyAlways
chaosDaemon.grpcPortThe port which grpc server listens on31767
chaosDaemon.httpPortThe port which http server listens on31766
chaosDaemon.envExtra chaosDaemon envs{}
chaosDaemon.hostNetworkRunning chaosDaemon on host networkfalse
chaosDaemon.mtls.enabledEnable mtls on the grpc connection between chaos-controller-manager and chaos-daemontrue
chaosDaemon.privilegedRun chaos-daemon container in privileged mode. If it is set to false, chaos-daemon will be run in some specified capabilities. capabilities: SYS_PTRACE, NET_ADMIN, MKNOD, SYS_CHROOT, SYS_ADMIN, KILL, IPC_LOCKtrue
chaosDaemon.priorityClassNameCustom priorityClassName for using pod priorities``
chaosDaemon.podAnnotationsPod annotations of chaos-daemon{}
chaosDaemon.serviceAccountServiceAccount name for chaos-daemonchaos-daemon
chaosDaemon.podSecurityPolicySpecify PodSecurityPolicy(psp) on chaos-daemon podsfalse
chaosDaemon.runtimeRuntime specifies which container runtime to use. Currently we only supports docker, containerd and CRI-O.docker
chaosDaemon.socketPathSpecifiesthe path of container runtime socket on the host./var/run/docker.sock
chaosDaemon.resourcesCPU/Memory resource requests/limits for chaosDaemon container{}
chaosDaemon.nodeSelectorNode labels for chaos-daemon pod assignment{}
chaosDaemon.tolerationsToleration labels for chaos-daemon pod assignment[]
chaosDaemon.affinityMap of chaos-daemon node/pod affinities{}
chaosDaemon.updateStrategySpecify DaemonSetUpdateStrategy for chaos-daemon{}
dashboard.createEnable chaos-dashboardfalse
dashboard.rootUrlSpecify the base url for openid/oauth2 (like GCP Auth Integration) callback URL.http://localhost:2333
dashboard.securityContextPod securityContext if needed{}
dashboard.hostNetworkRunning chaos-dashboard on host networkfalse
dashboard.replicaCountReplicas of chaos-dashboard1
dashboard.priorityClassNameCustom priorityClassName for using pod priorities``
dashboard.serviceAccountThe serviceAccount for chaos-dashboardchaos-dashboard
dashboard.image.registryOverride global registry, empty value means using the global images.registry``
dashboard.image.repositoryRepository part for image of chaos-dashboardchaos-mesh/chaos-dashboard
dashboard.image.tagOverride global tag, empty value means using the global images.tag``
dashboard.imagePullPolicyImage pull policyAlways
dashboard.securityModeRequire user to provide credentials on Chaos Dashboard, instead of using chaos-dashboard service accounttrue
dashboard.gcpSecurityModeEnable GCP Authentication Integration, see: https://chaos-mesh.org/docs/gcp-authentication/ for more detailsfalse
dashboard.gcpClientIdGCP app's client ID with GCP Authentication Integration``
dashboard.gcpClientSecretGCP app's client secret with GCP Authentication Integration``
dashboard.nodeSelectorNode labels for chaos-dashboard pod assignment{}
dashboard.tolerationsToleration labels for chaos-dashboard pod assignment[]
dashboard.affinityMap of chaos-dashboard node/pod affinities{}
dashboard.podAnnotationsDeployment chaos-dashboard annotations{}
dashboard.service.annotationsService annotations for the dashboard{}
dashboard.service.typeService type of the service created for exposing the dashboardNodePort
dashboard.service.clusterIPSet the clusterIP of the dashboard service if the type is ClusterIPnil
dashboard.service.nodePortSet the nodePort of the dashboard service if the type is NodePortnil
dashboard.resourcesCPU/Memory resource requests/limits for chaos-dashboard podrequests: { cpu: "25m", memory: "256Mi" }, limits:{}
dashboard.persistentVolume.enabledEnable storage volume for chaos-dashboard. If you are using SQLite as your DB for Chaos Dashboard, it is recommended to enable persistencefalse
dashboard.persistentVolume.existingClaimUse the existing PVC for persisting chaos event``
dashboard.persistentVolume.sizeChaos Dashboard data Persistent Volume size8Gi
dashboard.persistentVolume.storageClassNameChaos Dashboard data Persistent Volume Storage Classstandard
dashboard.persistentVolume.mountPathChaos Dashboard data Persistent Volume mount root path/data
dashboard.persistentVolume.subPathSubdirectory of Chaos Dashboard data Persistent Volume to mount``
dashboard.envThe keys within the env map are mounted as environment variables on the Chaos Dashboard pod``
dashboard.env.LISTEN_HOSTThe address which chaos-dashboard would listen on.0.0.0.0
dashboard.env.LISTEN_PORTThe port which chaos-dashboard would listen on.2333
dashboard.env.METRIC_HOSTThe address which metrics endpoints would listen on.0.0.0.0
dashboard.env.METRIC_PORTThe address which metrics endpoints would listen on.2334
dashboard.env.DATABASE_DRIVERThe db drive used for Chaos Dashboard, support db: sqlite3, mysqlsqlite3
dashboard.env.DATABASE_DATASOURCEThe db dsn used for Chaos Dashboard/data/core.sqlite
dashboard.env.CLEAN_SYNC_PERIODSet the sync period to clean up archived data12h
dashboard.env.TTL_EVENTSet TTL of archived event data168h
dashboard.env.TTL_EXPERIMENTSet TTL of archived experiment data336h
dashboard.env.TTL_SCHEDULESet TTL of archived schedule data336h
dashboard.env.TTL_WORKFLOWSet TTL of archived workflow data336h
dashboard.ingress.enabledEnable the use of the ingress controller to access the dashboardfalse
dashboard.ingress.certManagerEnable Cert-Manager for ingressfalse
dashboard.ingress.annotationsAnnotations for the dashboard Ingress{}
dashboard.ingress.hosts[0].nameHostname to your dashboard installationdashboard.local
dashboard.ingress.hosts[0].tlsUtilize TLS backend in ingressfalse
dashboard.ingress.hosts[0].tlsHostsArray of TLS hosts for ingress record (defaults to ingress.hosts[0].name if nil)nil
dashboard.ingress.hosts[0].tlsSecretTLS Secret (certificates)dashboard.local-tls
dashboard.ingress.pathsPaths that map requests to chaos dashboard["/"]
dashboard.ingress.apiVersionOverridesOverride apiVersion of ingress rendered by this helm chart``
dashboard.ingress.ingressClassNameDefines which ingress controller will implement the resource``
dnsServer.createEnable DNS Server which required by DNSChaosfalse
dnsServer.serviceAccountName of serviceaccount for chaos-dns-server.chaos-dns-server
dnsServer.imageImage of DNS Serverpingcap/coredns:v0.2.1
dnsServer.imagePullPolicyImage pull policyIfNotPresent
dnsServer.priorityClassNameCustomized priorityClassName for chaos-dns-server``
dnsServer.nodeSelectorNode labels for chaos-dns-server pod assignment``
dnsServer.tolerationsToleration labels for chaos-dns-server pod assignment[]
dnsServer.podAnnotationsPod annotations of chaos-dns-server``
`dnsServer.name

Deploy chaos-mesh with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has chaos-mesh 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-mesh is pinned at v2.5.1 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