API Reference

chaos-mesh.org/v1alpha1

Package v1alpha1 contains API Schema definitions for the chaosmesh v1alpha1 API group

AWSChaos

AWSChaos is the Schema for the awschaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

AWSChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

AWSChaosAction (string)

AWSChaosAction represents the chaos action about aws.

Appears In:

AWSChaosSpec

AWSChaosSpec is the content of the specification for an AWSChaos

Appears In:
Field Description

Action defines the specific aws chaos action. Supported action: ec2-stop / ec2-restart / detach-volume Default action: ec2-stop

duration string

Duration represents the duration of the chaos action.

secretName string

SecretName defines the name of kubernetes secret.

AWSSelector AWSSelector

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

AWSChaosStatus

AWSChaosStatus represents the status of an AWSChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

AWSSelector

Appears In:
Field Description

endpoint string

Endpoint indicates the endpoint of the aws server. Just used it in test now.

awsRegion string

AWSRegion defines the region of aws.

ec2Instance string

Ec2Instance indicates the ID of the ec2 instance.

volumeID string

EbsVolume indicates the ID of the EBS volume. Needed in detach-volume.

deviceName string

DeviceName indicates the name of the device. Needed in detach-volume.

AttrOverrideSpec

AttrOverrideSpec represents an override of attribution

Field Description

ino integer

size integer

blocks integer

atime Timespec

mtime Timespec

ctime Timespec

kind FileType

perm integer

nlink integer

uid integer

gid integer

rdev integer

AzureChaos

AzureChaos is the Schema for the azurechaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

AzureChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

AzureChaosAction (string)

AzureChaosAction represents the chaos action about azure.

Appears In:

AzureChaosSpec

AzureChaosSpec is the content of the specification for an AzureChaos

Appears In:
Field Description

Action defines the specific azure chaos action. Supported action: vm-stop / vm-restart / disk-detach Default action: vm-stop

duration string

Duration represents the duration of the chaos action.

AzureSelector AzureSelector

AzureChaosStatus

AzureChaosStatus represents the status of an AzureChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

AzureSelector

Appears In:
Field Description

subscriptionID string

SubscriptionID defines the id of Azure subscription.

resourceGroupName string

ResourceGroupName defines the name of ResourceGroup

vmName string

VMName defines the name of Virtual Machine

diskName string

DiskName indicates the name of the disk. Needed in disk-detach.

lun integer

LUN indicates the Logical Unit Number of the data disk. Needed in disk-detach.

secretName string

SecretName defines the name of kubernetes secret. It is used for Azure credentials.

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

BandwidthSpec

BandwidthSpec defines detail of bandwidth limit.

Appears In:
Field Description

rate string

Rate is the speed knob. Allows bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means bytes per second.

limit integer

Limit is the number of bytes that can be queued waiting for tokens to become available.

buffer integer

Buffer is the maximum amount of bytes that tokens can be available for instantaneously.

peakrate integer

Peakrate is the maximum depletion rate of the bucket. The peakrate does not need to be set, it is only necessary if perfect millisecond timescale shaping is required.

minburst integer

Minburst specifies the size of the peakrate bucket. For perfect accuracy, should be set to the MTU of the interface. If a peakrate is needed, but some burstiness is acceptable, this size can be raised. A 3000 byte minburst allows around 3mbit/s of peakrate, given 1000 byte packets.

BlockChaos

BlockChaos is the Schema for the blockchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

BlockChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

BlockChaosAction (string)

Appears In:

BlockChaosSpec

BlockChaosSpec is the content of the specification for a BlockChaos

Appears In:
Field Description

Action defines the specific block chaos action. Supported action: delay

Delay defines the delay distribution.

ContainerNodeVolumePathSelector ContainerNodeVolumePathSelector

duration string

Duration represents the duration of the chaos action.

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

BlockChaosStatus

BlockChaosStatus represents the status of a BlockChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

ids object (keys:string, values:integer)

InjectionIds always specifies the number of injected chaos action

BlockDelaySpec

BlockDelaySpec describes the block delay specification

Appears In:
Field Description

latency string

Latency defines the latency of every io request.

correlation string

jitter string

CPUStressor

CPUStressor defines how to stress CPU out

Appears In:
Field Description

Stressor Stressor

load integer

Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading.

options string array

extend stress-ng options

ChainDirection (string)

ChainDirection represents the direction of chain

Appears In:

ChaosCondition

Appears In:
Field Description

reason string

ChaosConditionType (string)

Appears In:

ChaosOnlyScheduleSpec

ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now

Appears In:
Field Description

schedule string

startingDeadlineSeconds integer

concurrencyPolicy ConcurrencyPolicy

historyLimit integer

EmbedChaos EmbedChaos

ChaosStatus

Field Description

conditions ChaosCondition array

Conditions represents the current global condition of the chaos

experiment ExperimentStatus

Experiment records the last experiment state.

CidrAndPort

CidrAndPort represents CIDR and port pair

Appears In:
Field Description

cidr string

port integer

ClockSpec

Appears In:
Field Description

pid integer

the pid of target program.

time-offset string

specifies the length of time offset.

clock-ids-slice string

the identifier of the particular clock on which to act. More clock description in linux kernel can be found in man page of clock_getres, clock_gettime, clock_settime. Muti clock ids should be split with ","

ConcurrencyPolicy (string)

ConditionalBranch

Field Description

target string

Target is the name of other template, if expression is evaluated as true, this template will be spawned.

expression string

Expression is the expression for this conditional branch, expected type of result is boolean. If expression is empty, this branch will always be selected/the template will be spawned.

ConditionalBranchStatus

Field Description

target string

evaluationResult ConditionStatus

ConditionalBranchesStatus

Appears In:
Field Description

branches ConditionalBranchStatus array

context string array

ContainerNodeVolumePathSelector

ContainerNodeVolumePathSelector is the selector to select a node and a PV on it

Appears In:
Field Description

ContainerSelector ContainerSelector

volumeName string

ContainerSelector

Field Description

PodSelector PodSelector

containerNames string array

ContainerNames indicates list of the name of affected container. If not set, the first container will be injected

CorruptSpec

CorruptSpec defines detail of a corrupt action

Appears In:
Field Description

corrupt string

correlation string

DNSChaos

DNSChaos is the Schema for the networkchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

DNSChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a pod chaos experiment

Most recently observed status of the chaos experiment about pods

DNSChaosSpec

DNSChaosSpec defines the desired state of DNSChaos

Appears In:
Field Description

action DNSChaosAction

Action defines the specific DNS chaos action. Supported action: error, random Default action: error

ContainerSelector ContainerSelector

duration string

Duration represents the duration of the chaos action

patterns string array

Choose which domain names to take effect, support the placeholder ? and wildcard , or the Specified domain name. Note: 1. The wildcard * must be at the end of the string. For example, chaos-.org is invalid. 2. if the patterns is empty, will take effect on all the domain names. For example: The value is ["google.com", "github.*", "chaos-mes?.org"], will take effect on "google.com", "github.com" and "chaos-mesh.org"

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

DNSChaosStatus

DNSChaosStatus defines the observed state of DNSChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

DelaySpec

DelaySpec defines detail of a delay action

Appears In:
Field Description

latency string

correlation string

jitter string

reorder ReorderSpec

DesiredPhase (string)

Appears In:

Direction (string)

Direction represents traffic direction from source to target, it could be netem, delay, loss, duplicate, corrupt or partition, check comments below for detail direction flow.

Appears In:

DiskFileSpec

Field Description

size string

specifies how many units of data will write into the file path. support unit: c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 BYTES. example : 1M

512kB

path string

DiskFillSpec

Appears In:
Field Description

DiskFileSpec DiskFileSpec

fill-by-fallocate boolean

fill disk by fallocate

DiskPayloadSpec

Appears In:
Field Description

DiskFileSpec DiskFileSpec

payload-process-num integer

specifies the number of process work on writing, default 1, only 1-255 is valid value

DuplicateSpec

DuplicateSpec defines detail of a duplicate action

Appears In:
Field Description

duplicate string

correlation string

EmbedChaos

Field Description

awsChaos AWSChaosSpec

azureChaos AzureChaosSpec

blockChaos BlockChaosSpec

dnsChaos DNSChaosSpec

gcpChaos GCPChaosSpec

httpChaos HTTPChaosSpec

ioChaos IOChaosSpec

jvmChaos JVMChaosSpec

kernelChaos KernelChaosSpec

networkChaos NetworkChaosSpec

physicalmachineChaos PhysicalMachineChaosSpec

podChaos PodChaosSpec

stressChaos StressChaosSpec

timeChaos TimeChaosSpec

EmbedStatusCheck

Appears In:
Field Description

ExpInfo

Field Description

uid string

the experiment ID

action string

the subAction, generate automatically

stress-cpu StressCPUSpec

stress-mem StressMemorySpec

disk-read-payload DiskPayloadSpec

disk-write-payload DiskPayloadSpec

disk-fill DiskFillSpec

network-corrupt NetworkCorruptSpec

network-duplicate NetworkDuplicateSpec

network-loss NetworkLossSpec

network-delay NetworkDelaySpec

network-partition NetworkPartitionSpec

network-dns NetworkDNSSpec

network-bandwidth NetworkBandwidthSpec

network-flood NetworkFloodSpec

network-down NetworkDownSpec

process ProcessSpec

jvm-exception JVMExceptionSpec

jvm-gc JVMGCSpec

jvm-latency JVMLatencySpec

jvm-return JVMReturnSpec

jvm-stress JVMStressSpec

jvm-rule-data JVMRuleDataSpec

jvm-mysql PMJVMMySQLSpec

clock ClockSpec

redis-expiration RedisExpirationSpec

redis-penetration RedisPenetrationSpec

redis-cacheLimit RedisCacheLimitSpec

redis-restart RedisSentinelRestartSpec

kafka-fill KafkaFillSpec

kafka-flood KafkaFloodSpec

kafka-io KafkaIOSpec

http-abort HTTPAbortSpec

http-delay HTTPDelaySpec

http-config HTTPConfigSpec

http-request HTTPRequestSpec

file-create FileCreateSpec

file-delete FileDeleteSpec

file-rename FileRenameSpec

file-append FileAppendSpec

file-replace FileReplaceSpec

vm VMSpec

user_defined UserDefinedSpec

ExperimentStatus

Appears In:
Field Description

desiredPhase DesiredPhase

containerRecords Record array

Records are used to track the running status

FailKernRequest

FailKernRequest defines the injection conditions

Appears In:
Field Description

failtype integer

FailType indicates what to fail, can be set to '0' / '1' / '2' If 0, indicates slab to fail (should_failslab) If 1, indicates alloc_page to fail (should_fail_alloc_page) If 2, indicates bio to fail (should_fail_bio) You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt to learn more

headers string array

Headers indicates the appropriate kernel headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" and so on

callchain Frame array

Callchain indicate a special call chain, such as: ext4_mount → mount_subtree → …​ → should_failslab With an optional set of predicates and an optional set of parameters, which used with predicates. You can read call chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples to learn more. If no special call chain, just keep Callchain empty, which means it will fail at any call chain with slab alloc (eg: kmalloc).

probability integer

Probability indicates the fails with probability. If you want 1%, please set this field with 1.

times integer

Times indicates the max times of fails.

FileAppendSpec

Appears In:
Field Description

file-name string

FileName is the name of the file to be created, modified, deleted, renamed, or appended.

data string

Data is the data for append.

count integer

Count is the number of times to append the data.

FileCreateSpec

Appears In:
Field Description

file-name string

FileName is the name of the file to be created, modified, deleted, renamed, or appended.

dir-name string

DirName is the directory name to create or delete.

FileDeleteSpec

Appears In:
Field Description

file-name string

FileName is the name of the file to be created, modified, deleted, renamed, or appended.

dir-name string

DirName is the directory name to create or delete.

FileModifyPrivilegeSpec

Appears In:
Field Description

file-name string

FileName is the name of the file to be created, modified, deleted, renamed, or appended.

privilege integer

Privilege is the file privilege to be set.

FileRenameSpec

Appears In:
Field Description

source-file string

SourceFile is the name need to be renamed.

dest-file string

DestFile is the name to be renamed.

FileReplaceSpec

Appears In:
Field Description

file-name string

FileName is the name of the file to be created, modified, deleted, renamed, or appended.

origin-string string

OriginStr is the origin string of the file.

dest-string string

DestStr is the destination string of the file.

line integer

Line is the line number of the file to be replaced.

FileType (string)

FileType represents type of file

Appears In:

FillingType (string)

FillingType represents type of data is filled for incorrectness

Appears In:

Filter

Filter represents a filter of IOChaos action, which will define the scope of an IOChaosAction

Appears In:
Field Description

path string

Path represents a glob of injecting path

methods IoMethod

Methods represents the method that the action will inject in

percent integer

Percent represents the percent probability of injecting this action

Frame

Frame defines the function signature and predicate in function’s body

Appears In:
Field Description

funcname string

Funcname can be find from kernel source or /proc/kallsyms, such as ext4_mount

parameters string

Parameters is used with predicate, for example, if you want to inject slab error in d_alloc_parallel(struct dentry *parent, const struct qstr *name) with a special name bananas, you need to set it to struct dentry *parent, const struct qstr *name otherwise omit it.

predicate string

Predicate will access the arguments of this Frame, example with Parameters’s, you can set it to STRNCMP(name→name, "bananas", 8) to make inject only with it, or omit it to inject for all d_alloc_parallel call chain.

GCPChaos

GCPChaos is the Schema for the gcpchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

GCPChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

GCPChaosAction (string)

GCPChaosAction represents the chaos action about gcp.

Appears In:

GCPChaosSpec

GCPChaosSpec is the content of the specification for a GCPChaos

Appears In:
Field Description

Action defines the specific gcp chaos action. Supported action: node-stop / node-reset / disk-loss Default action: node-stop

duration string

Duration represents the duration of the chaos action.

secretName string

SecretName defines the name of kubernetes secret. It is used for GCP credentials.

GCPSelector GCPSelector

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

GCPChaosStatus

GCPChaosStatus represents the status of a GCPChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

attachedDiskStrings string array

The attached disk info strings. Needed in disk-loss.

GCPSelector

Appears In:
Field Description

project string

Project defines the ID of gcp project.

zone string

Zone defines the zone of gcp project.

instance string

Instance defines the name of the instance

deviceNames string array

The device name of disks to detach. Needed in disk-loss.

GenericSelectorSpec

GenericSelectorSpec defines some selectors to select objects.

Field Description

namespaces string array

Namespaces is a set of namespace to which objects belong.

fieldSelectors object (keys:string, values:string)

Map of string keys and values that can be used to select objects. A selector based on fields.

labelSelectors object (keys:string, values:string)

Map of string keys and values that can be used to select objects. A selector based on labels.

expressionSelectors LabelSelectorRequirement array

a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions.

annotationSelectors object (keys:string, values:string)

Map of string keys and values that can be used to select objects. A selector based on annotations.

HTTPAbortSpec

Appears In:
Field Description

HTTPCommonSpec HTTPCommonSpec

HTTPChaos

HTTPChaos is the Schema for the HTTPchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

HTTPChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

HTTPChaosSpec

Appears In:
Field Description

PodSelector PodSelector

Target is the object to be selected and injected.

PodHttpChaosActions PodHttpChaosActions

port integer

Port represents the target port to be proxy of.

path string

Path is a rule to select target by uri path in http request.

method string

Method is a rule to select target by http method in request.

code integer

Code is a rule to select target by http status code in response.

request_headers object (keys:string, values:string)

RequestHeaders is a rule to select target by http headers in request. The key-value pairs represent header name and header value pairs.

response_headers object (keys:string, values:string)

ResponseHeaders is a rule to select target by http headers in response. The key-value pairs represent header name and header value pairs.

TLS is the tls config, will override PodHttpChaos if there are multiple HTTPChaos experiments are applied

duration string

Duration represents the duration of the chaos action.

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

HTTPChaosStatus

Appears In:
Field Description

ChaosStatus ChaosStatus

instances object (keys:string, values:integer)

Instances always specifies podhttpchaos generation or empty

HTTPCommonSpec

Field Description

proxy_ports integer array

Composed with one of the port of HTTP connection, we will only attack HTTP connection with port inside proxy_ports

target string

HTTP target: Request or Response

port integer

The TCP port that the target service listens on

path string

Match path of Uri with wildcard matches

method string

HTTP method

code string

Code is a rule to select target by http status code in response

HTTPConfigSpec

Appears In:
Field Description

file_path string

The config file path

HTTPCriteria

Appears In:
Field Description

statusCode string

StatusCode defines the expected http status code for the request. A statusCode string could be a single code (e.g. 200), or an inclusive range (e.g. 200-400, both 200 and 400 are included).

HTTPDelaySpec

Appears In:
Field Description

HTTPCommonSpec HTTPCommonSpec

delay string

Delay represents the delay of the target request/response

HTTPRequestMethod (string)

Appears In:

HTTPRequestSpec

used for HTTP request, now only support GET

Appears In:
Field Description

url string

Request to send"

enable-conn-pool boolean

Enable connection pool

count integer

The number of requests to send

HTTPStatusCheck

Appears In:
Field Description

url string

headers object (keys:string, values:string array)

body string

criteria HTTPCriteria

Criteria defines how to determine the result of the status check.

IOChaos

IOChaos is the Schema for the iochaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

IOChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

status IOChaosStatus

IOChaosAction

IOChaosAction defines a possible action of IOChaos

Appears In:
Field Description

Filter Filter

faults IoFault array

Faults represents the fault to inject

latency string

Latency represents the latency to inject

AttrOverrideSpec AttrOverrideSpec

AttrOverride represents the attribution to override

mistake MistakeSpec

MistakeSpec represents the mistake to inject

source string

Source represents the source of current rules

IOChaosSpec

IOChaosSpec defines the desired state of IOChaos

Appears In:
Field Description

ContainerSelector ContainerSelector

action IOChaosType

Action defines the specific pod chaos action. Supported action: latency / fault / attrOverride / mistake

delay string

Delay defines the value of I/O chaos action delay. A delay string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

errno integer

Errno defines the error code that returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html

Attr defines the overrided attribution

mistake MistakeSpec

Mistake defines what types of incorrectness are injected to IO operations

path string

Path defines the path of files for injecting I/O chaos action.

methods IoMethod array

Methods defines the I/O methods for injecting I/O chaos action. default: all I/O methods.

percent integer

Percent defines the percentage of injection errors and provides a number from 0-100. default: 100.

volumePath string

VolumePath represents the mount path of injected volume

duration string

Duration represents the duration of the chaos action. It is required when the action is PodFailureAction. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

IOChaosStatus

IOChaosStatus defines the observed state of IOChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

instances object (keys:string, values:integer)

Instances always specifies podiochaos generation or empty

IOChaosType (string)

IOChaosType represents the type of IOChaos Action

IPSetType (string)

IPSetType represents the type of IP set

Appears In:

IoFault

IoFault represents the fault to inject and their weight

Appears In:
Field Description

errno integer

weight integer

IoMethod (string)

Appears In:

JVMChaos

JVMChaos is the Schema for the jvmchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

JVMChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

JVMChaosAction (string)

JVMChaosAction represents the chaos action about jvm

Appears In:

JVMChaosSpec

JVMChaosSpec defines the desired state of JVMChaos

Appears In:
Field Description

ContainerSelector ContainerSelector

duration string

Duration represents the duration of the chaos action

Action defines the specific jvm chaos action. Supported action: latency;return;exception;stress;gc;ruleData

JVMParameter JVMParameter

JVMParameter represents the detail about jvm chaos action definition

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

JVMChaosStatus

JVMChaosStatus defines the observed state of JVMChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

JVMClassMethodSpec

JVMClassMethodSpec is the specification for class and method

Field Description

class string

Java class

method string

the method in Java class

JVMCommonSpec

JVMCommonSpec is the common specification for JVMChaos

Field Description

port integer

the port of agent server, default 9277

pid integer

the pid of Java process which needs to attach

JVMExceptionSpec

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

JVMClassMethodSpec JVMClassMethodSpec

exception string

the exception which needs to throw for action exception

JVMGCSpec

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

JVMLatencySpec

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

JVMClassMethodSpec JVMClassMethodSpec

latency integer

the latency duration for action 'latency', unit ms

JVMMySQLSpec

JVMMySQLSpec is the specification of MySQL fault injection in JVM only when SQL match the Database, Table and SQLType, JVMChaos mesh will inject fault for examle: SQL is "select * from test.t1", only when Database == "test" || Database == "") && (Table == "t1" || Table == "") && (SQLType == "select" || SQLType == "" is true, JVMChaos will inject fault

Field Description

mysqlConnectorVersion string

the version of mysql-connector-java, only support 5.X.X(set to "5") and 8.X.X(set to "8") now

database string

the match database default value is "", means match all database

table string

the match table default value is "", means match all table

sqlType string

the match sql type default value is "", means match all SQL type. The value can be 'select', 'insert', 'update', 'delete', 'replace'.

JVMParameter

JVMParameter represents the detail about jvm chaos action definition

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

JVMClassMethodSpec JVMClassMethodSpec

JVMStressCfgSpec JVMStressCfgSpec

JVMMySQLSpec JVMMySQLSpec

name string

byteman rule name, should be unique, and will generate one if not set

value string

the return value for action 'return'

exception string

the exception which needs to throw for action exception or the exception message needs to throw in action mysql

latency integer

the latency duration for action 'latency', unit ms or the latency duration in action mysql

ruleData string

the byteman rule’s data for action 'ruleData'

JVMReturnSpec

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

JVMClassMethodSpec JVMClassMethodSpec

value string

the return value for action 'return'

JVMRuleDataSpec

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

rule-data string

RuleData used to save the rule file’s data, will use it when recover

JVMStressCfgSpec

JVMStressSpec is the specification for stress

Appears In:
Field Description

cpuCount integer

the CPU core number needs to use, only set it when action is stress

memType string

the memory type needs to locate, only set it when action is stress, the value can be 'stack' or 'heap'

JVMStressSpec

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

cpu-count integer

the CPU core number need to use, only set it when action is stress

mem-type string

the memory type need to locate, only set it when action is stress, the value can be 'stack' or 'heap'

KafkaCommonSpec

Field Description

topic string

The topic to attack

host string

The host of kafka server

port integer

The port of kafka server

username string

The username of kafka client

password string

The password of kafka client

KafkaFillSpec

Appears In:
Field Description

KafkaCommonSpec KafkaCommonSpec

messageSize integer

The size of each message

maxBytes integer

The max bytes to fill

reloadCommand string

The command to reload kafka config

KafkaFloodSpec

Appears In:
Field Description

KafkaCommonSpec KafkaCommonSpec

messageSize integer

The size of each message

threads integer

The number of worker threads

KafkaIOSpec

Appears In:
Field Description

topic string

The topic to attack

configFile string

The path of server config

nonReadable boolean

Make kafka cluster non-readable

nonWritable boolean

Make kafka cluster non-writable

KernelChaos

KernelChaos is the Schema for the kernelchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

KernelChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a kernel chaos experiment

Most recently observed status of the kernel chaos experiment

KernelChaosSpec

KernelChaosSpec defines the desired state of KernelChaos

Appears In:
Field Description

ContainerSelector ContainerSelector

failKernRequest FailKernRequest

FailKernRequest defines the request of kernel injection

duration string

Duration represents the duration of the chaos action

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

KernelChaosStatus

KernelChaosStatus defines the observed state of KernelChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

LossSpec

LossSpec defines detail of a loss action

Appears In:
Field Description

loss string

correlation string

MemoryStressor

MemoryStressor defines how to stress memory out

Appears In:
Field Description

Stressor Stressor

size string

Size specifies N bytes consumed per vm worker, default is the total available memory. One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB.

oomScoreAdj integer

OOMScoreAdj sets the oom_score_adj of the stress process. See man 5 proc to know more about this option.

options string array

extend stress-ng options

MistakeSpec

MistakeSpec represents one type of mistake

Field Description

filling FillingType

Filling determines what is filled in the mistake data.

maxOccurrences integer

There will be [1, MaxOccurrences] segments of wrong data.

maxLength integer

Max length of each wrong data segment in bytes

NetworkBandwidthSpec

Appears In:
Field Description

rate string

limit integer

buffer integer

peakrate integer

minburst integer

device string

ip-address string

hostname string

NetworkChaos

NetworkChaos is the Schema for the networkchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

NetworkChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a pod chaos experiment

Most recently observed status of the chaos experiment about pods

NetworkChaosAction (string)

NetworkChaosAction represents the chaos action about network.

Appears In:

NetworkChaosSpec

NetworkChaosSpec defines the desired state of NetworkChaos

Appears In:
Field Description

PodSelector PodSelector

Action defines the specific network chaos action. Supported action: partition, netem, delay, loss, duplicate, corrupt Default action: delay

device string

Device represents the network device to be affected.

duration string

Duration represents the duration of the chaos action

TcParameter TcParameter

TcParameter represents the traffic control definition

direction Direction

Direction represents the direction, this applies on netem and network partition action

target PodSelector

Target represents network target, this applies on netem and network partition action

targetDevice string

TargetDevice represents the network device to be affected in target scope.

externalTargets string array

ExternalTargets represents network targets outside k8s

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

NetworkChaosStatus

NetworkChaosStatus defines the observed state of NetworkChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

instances object (keys:string, values:integer)

Instances always specifies podnetworkchaos generation or empty

NetworkCommonSpec

Field Description

correlation string

correlation is percentage (10 is 10%)

device string

the network interface to impact

source-port string

only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010. it can only be used in conjunction with -p tcp or -p udp

egress-port string

only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010. it can only be used in conjunction with -p tcp or -p udp

ip-address string

only impact egress traffic to these IP addresses

ip-protocol string

only impact traffic using this IP protocol, supported: tcp, udp, icmp, all

hostname string

only impact traffic to these hostnames

NetworkCorruptSpec

Appears In:
Field Description

NetworkCommonSpec NetworkCommonSpec

percent string

percentage of packets to corrupt (10 is 10%)

NetworkDNSSpec

Appears In:
Field Description

dns-server string

update the DNS server in /etc/resolv.conf with this value

dns-ip string

map specified host to this IP address

dns-domain-name string

map this host to specified IP

NetworkDelaySpec

Appears In:
Field Description

NetworkCommonSpec NetworkCommonSpec

jitter string

jitter time, time units: ns, us (or µs), ms, s, m, h.

latency string

delay egress time, time units: ns, us (or µs), ms, s, m, h.

accept-tcp-flags string

only the packet which match the tcp flag can be accepted, others will be dropped. only set when the IPProtocol is tcp, used for partition.

NetworkDownSpec

Appears In:
Field Description

device string

The network interface to impact

duration string

NIC down time, time units: ns, us (or µs), ms, s, m, h.

NetworkDuplicateSpec

Appears In:
Field Description

NetworkCommonSpec NetworkCommonSpec

percent string

percentage of packets to duplicate (10 is 10%)

NetworkFloodSpec

Appears In:
Field Description

rate string

The speed of network traffic, allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second

ip-address string

Generate traffic to this IP address

port string

Generate traffic to this port on the IP address

parallel integer

The number of iperf parallel client threads to run

duration string

The number of seconds to run the iperf test

NetworkLossSpec

Appears In:
Field Description

NetworkCommonSpec NetworkCommonSpec

percent string

percentage of packets to loss (10 is 10%)

NetworkPartitionSpec

Appears In:
Field Description

device string

the network interface to impact

hostname string

only impact traffic to these hostnames

ip-address string

only impact egress traffic to these IP addresses

direction string

specifies the partition direction, values can be 'from', 'to'. 'from' means packets coming from the 'IPAddress' or 'Hostname' and going to your server, 'to' means packets originating from your server and going to the 'IPAddress' or 'Hostname'.

ip-protocol string

only impact egress traffic to these IP addresses

accept-tcp-flags string

only the packet which match the tcp flag can be accepted, others will be dropped. only set when the IPProtocol is tcp, used for partition.

PMJVMMySQLSpec

Appears In:
Field Description

JVMCommonSpec JVMCommonSpec

JVMMySQLSpec JVMMySQLSpec

exception string

The exception which needs to throw for action exception or the exception message needs to throw in action mysql

latency integer

The latency duration for action 'latency' or the latency duration in action mysql

Phase (string)

Appears In:

PhysicalMachine

PhysicalMachine is the Schema for the physical machine API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

PhysicalMachine

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a physical machine

PhysicalMachineChaos

PhysicalMachineChaos is the Schema for the physical machine chaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

PhysicalMachineChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a physical machine chaos experiment

Most recently observed status of the chaos experiment

PhysicalMachineChaosSpec

PhysicalMachineChaosSpec defines the desired state of PhysicalMachineChaos

Field Description

action PhysicalMachineChaosAction

PhysicalMachineSelector PhysicalMachineSelector

ExpInfo ExpInfo

ExpInfo string json:"expInfo"

duration string

Duration represents the duration of the chaos action

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

PhysicalMachineChaosStatus

PhysicalMachineChaosStatus defines the observed state of PhysicalMachineChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

PhysicalMachineSelector

Field Description

address string array

DEPRECATED: Use Selector instead. Only one of Address and Selector could be specified.

Selector is used to select physical machines that are used to inject chaos action.

Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent

value string

Value is required when the mode is set to FixedMode / FixedPercentMode / RandomMaxPercentMode. If FixedMode, provide an integer of physical machines to do chaos action. If FixedPercentMode, provide a number from 0-100 to specify the percent of physical machines the server can do chaos action. IF RandomMaxPercentMode, provide a number from 0-100 to specify the max percent of pods to do chaos action

PhysicalMachineSelectorSpec

PhysicalMachineSelectorSpec defines some selectors to select objects. If the all selectors are empty, all objects will be used in chaos experiment.

Field Description

GenericSelectorSpec GenericSelectorSpec

physicalMachines object (keys:string, values:string array)

PhysicalMachines is a map of string keys and a set values that used to select physical machines. The key defines the namespace which physical machine belong, and each value is a set of physical machine names.

PhysicalMachineSpec

PhysicalMachineSpec defines the desired state of PhysicalMachine

Appears In:
Field Description

address string

Address represents the address of the physical machine

PodChaos

PodChaos is the control script`s spec.

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

PodChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a pod chaos experiment

Most recently observed status of the chaos experiment about pods

PodChaosAction (string)

PodChaosAction represents the chaos action about pods.

Appears In:

PodChaosSpec

PodChaosSpec defines the attributes that a user creates on a chaos experiment about pods.

Appears In:
Field Description

ContainerSelector ContainerSelector

Action defines the specific pod chaos action. Supported action: pod-kill / pod-failure / container-kill Default action: pod-kill

duration string

Duration represents the duration of the chaos action. It is required when the action is PodFailureAction. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

gracePeriod integer

GracePeriod is used in pod-kill action. It represents the duration in seconds before the pod should be deleted. Value must be non-negative integer. The default value is zero that indicates delete immediately.

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

PodChaosStatus

PodChaosStatus represents the current status of the chaos experiment about pods.

Appears In:
Field Description

ChaosStatus ChaosStatus

PodHttpChaos

PodHttpChaos is the Schema for the podhttpchaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

PodHttpChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

PodHttpChaosActions

PodHttpChaosActions defines possible actions of HttpChaos.

Field Description

abort boolean

Abort is a rule to abort a http session.

delay string

Delay represents the delay of the target request/response. A duration string is a possibly unsigned sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

Replace is a rule to replace some contents in target.

Patch is a rule to patch some contents in target.

PodHttpChaosBaseRule

PodHttpChaosBaseRule defines the injection rule without source and port.

Appears In:
Field Description

Target is the object to be selected and injected, <Request

Response>.

Selector contains the rules to select target.

PodHttpChaosPatchActions

PodHttpChaosPatchActions defines possible patch-actions of HttpChaos.

Appears In:
Field Description

Body is a rule to patch message body of target.

queries string array array

Queries is a rule to append uri queries of target(Request only). For example: [["foo", "bar"], ["foo", "unknown"]].

headers string array array

Headers is a rule to append http headers of target. For example: [["Set-Cookie", "<one cookie>"], ["Set-Cookie", "<another cookie>"]].

PodHttpChaosPatchBodyAction

PodHttpChaosPatchBodyAction defines patch body action of HttpChaos.

Field Description

type string

Type represents the patch type, only support JSON as [merge patch json](https://tools.ietf.org/html/rfc7396) currently.

value string

Value is the patch contents.

PodHttpChaosReplaceActions

PodHttpChaosReplaceActions defines possible replace-actions of HttpChaos.

Appears In:
Field Description

path string

Path is rule to to replace uri path in http request.

method string

Method is a rule to replace http method in request.

code integer

Code is a rule to replace http status code in response.

body integer array

Body is a rule to replace http message body in target.

queries object (keys:string, values:string)

Queries is a rule to replace uri queries in http request. For example, with value { "foo": "unknown" }, the /?foo=bar will be altered to /?foo=unknown,

headers object (keys:string, values:string)

Headers is a rule to replace http headers of target. The key-value pairs represent header name and header value pairs.

PodHttpChaosRule

PodHttpChaosRule defines the injection rule for http.

Appears In:
Field Description

PodHttpChaosBaseRule PodHttpChaosBaseRule

source string

Source represents the source of current rules

port integer

Port represents the target port to be proxy of.

PodHttpChaosSelector

Appears In:
Field Description

port integer

Port is a rule to select server listening on specific port.

path string

Path is a rule to select target by uri path in http request.

method string

Method is a rule to select target by http method in request.

code integer

Code is a rule to select target by http status code in response.

request_headers object (keys:string, values:string)

RequestHeaders is a rule to select target by http headers in request. The key-value pairs represent header name and header value pairs.

response_headers object (keys:string, values:string)

ResponseHeaders is a rule to select target by http headers in response. The key-value pairs represent header name and header value pairs.

PodHttpChaosSpec

PodHttpChaosSpec defines the desired state of PodHttpChaos.

Appears In:
Field Description

rules PodHttpChaosRule array

Rules are a list of injection rule for http request.

TLS is the tls config, will be override if there are multiple HTTPChaos experiments are applied

PodHttpChaosStatus

PodHttpChaosStatus defines the actual state of PodHttpChaos.

Appears In:
Field Description

pid integer

Pid represents a running tproxy process id.

startTime integer

StartTime represents the start time of a tproxy process.

failedMessage string

observedGeneration integer

PodHttpChaosTLS

PodHttpChaosTLS contains the tls config for HTTPChaos

Field Description

secretName string

SecretName represents the name of required secret resource

secretNamespace string

SecretNamespace represents the namespace of required secret resource

certName string

CertName represents the data name of cert file in secret, tls.crt for example

keyName string

KeyName represents the data name of key file in secret, tls.key for example

caName string

CAName represents the data name of ca file in secret, ca.crt for example

PodHttpChaosTarget (string)

PodHttpChaosTarget represents the type of an HttpChaos Action

PodIOChaos

PodIOChaos is the Schema for the podiochaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

PodIOChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

PodIOChaosSpec

PodIOChaosSpec defines the desired state of IOChaos

Appears In:
Field Description

volumeMountPath string

VolumeMountPath represents the target mount path It must be a root of mount path now. TODO: search the mount parent of any path automatically. TODO: support multiple different volume mount path in one pod

container string

TODO: support multiple different container to inject in one pod

actions IOChaosAction array

Actions are a list of IOChaos actions

PodIOChaosStatus

Appears In:
Field Description

pid integer

Pid represents a running toda process id

startTime integer

StartTime represents the start time of a toda process

failedMessage string

observedGeneration integer

PodNetworkChaos

PodNetworkChaos is the Schema for the PodNetworkChaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

PodNetworkChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a pod chaos experiment

Most recently observed status of the chaos experiment about pods

PodNetworkChaosSpec

PodNetworkChaosSpec defines the desired state of PodNetworkChaos

Appears In:
Field Description

ipsets RawIPSet array

The ipset on the pod

iptables RawIptables array

The iptables rules on the pod

tcs RawTrafficControl array

The tc rules on the pod

PodNetworkChaosStatus

PodNetworkChaosStatus defines the observed state of PodNetworkChaos

Appears In:
Field Description

failedMessage string

observedGeneration integer

PodSelector

Field Description

selector PodSelectorSpec

Selector is used to select pods that are used to inject chaos action.

Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent

value string

Value is required when the mode is set to FixedMode / FixedPercentMode / RandomMaxPercentMode. If FixedMode, provide an integer of pods to do chaos action. If FixedPercentMode, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF RandomMaxPercentMode, provide a number from 0-100 to specify the max percent of pods to do chaos action

PodSelectorSpec

PodSelectorSpec defines the some selectors to select objects. If the all selectors are empty, all objects will be used in chaos experiment.

Appears In:
Field Description

GenericSelectorSpec GenericSelectorSpec

nodes string array

Nodes is a set of node name and objects must belong to these nodes.

pods object (keys:string, values:string array)

Pods is a map of string keys and a set values that used to select pods. The key defines the namespace which pods belong, and the each values is a set of pod names.

nodeSelectors object (keys:string, values:string)

Map of string keys and values that can be used to select nodes. Selector which must match a node’s labels, and objects must belong to these selected nodes.

podPhaseSelectors string array

PodPhaseSelectors is a set of condition of a pod at the current time. supported value: Pending / Running / Succeeded / Failed / Unknown

ProcessSpec

Appears In:
Field Description

process string

the process name or the process ID

signal integer

the signal number to send

recoverCmd string

the command to be run when recovering experiment

RateSpec

RateSpec defines details of rate limit.

Appears In:
Field Description

rate string

Rate is the speed knob. Allows bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means bytes per second.

RawIPSet

RawIPSet represents an ipset on specific pod

Appears In:
Field Description

name string

The name of ipset

ipsetType IPSetType

cidrs string array

The contents of ipset. Only available when IPSetType is NetIPSet.

cidrAndPorts CidrAndPort array

The contents of ipset. Only available when IPSetType is NetPortIPSet.

setNames string array

The contents of ipset. Only available when IPSetType is SetIPSet.

RawRuleSource RawRuleSource

The name and namespace of the source network chaos

RawIptables

RawIptables represents the iptables rules on specific pod

Appears In:
Field Description

name string

The name of iptables chain

ipsets string array

The name of related ipset

direction ChainDirection

The block direction of this iptables rule

device string

Device represents the network device to be affected.

RawRuleSource RawRuleSource

RawRuleSource

RawRuleSource represents the name and namespace of the source network chaos

Appears In:
Field Description

source string

RawTrafficControl

RawTrafficControl represents the traffic control chaos on specific pod

Appears In:
Field Description

type TcType

The type of traffic control

TcParameter TcParameter

ipset string

The name of target ipset

source string

The name and namespace of the source network chaos

device string

Device represents the network device to be affected.

Record

Appears In:
Field Description

id string

selectorKey string

phase Phase

injectedCount integer

InjectedCount is a counter to record the sum of successful injections

recoveredCount integer

RecoveredCount is a counter to record the sum of successful recoveries

events RecordEvent array

Events are the essential details about the injections and recoveries

RecordEvent

Appears In:
Field Description

Type means the stage of this event

Operation represents the operation we are doing, when we crate this event

message string

Message is the detail message, e.g. the reason why we failed to inject the chaos

timestamp Time

Timestamp is time when we create this event

RecordEventOperation (string)

Appears In:

RecordEventType (string)

Appears In:

RedisCacheLimitSpec

Appears In:
Field Description

RedisCommonSpec RedisCommonSpec

cacheSize string

The size of maxmemory

percent string

Specifies maxmemory as a percentage of the original value

RedisCommonSpec

Field Description

addr string

The adress of Redis server

password string

The password of Redis server

RedisExpirationSpec

Appears In:
Field Description

RedisCommonSpec RedisCommonSpec

expiration string

The expiration of the keys

key string

The keys to be expired

option string

Additional options for expiration

RedisPenetrationSpec

Appears In:
Field Description

RedisCommonSpec RedisCommonSpec

requestNum integer

The number of requests to be sent

RedisSentinelRestartSpec

Appears In:
Field Description

RedisCommonSpec RedisCommonSpec

conf string

The path of Sentinel conf

flushConfig boolean

The control flag determines whether to flush config

redisPath boolean

The path of redis-server command-line tool

RedisSentinelStopSpec

Appears In:
Field Description

RedisCommonSpec RedisCommonSpec

conf string

The path of Sentinel conf

flushConfig boolean

The control flag determines whether to flush config

redisPath boolean

The path of redis-server command-line tool

RemoteCluster

RemoteCluster defines a remote cluster

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

RemoteCluster

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

RemoteClusterCondition

Appears In:
Field Description

reason string

RemoteClusterConditionType (string)

RemoteClusterKubeConfig

RemoteClusterKubeConfig refers to a secret by which we’ll use to connect remote cluster

Appears In:
Field Description

RemoteClusterSecretRef

RemoteClusterSecretRef refers to a secret in any namespaces

Field Description

namespace string

name string

key string

RemoteClusterSpec

RemoteClusterSpec defines the specification of a remote cluster

Appears In:
Field Description

namespace string

version string

configOverride integer array

RemoteClusterStatus

Appears In:
Field Description

currentVersion string

conditions RemoteClusterCondition array

Conditions represents the current condition of the remote cluster

observedGeneration integer

ReorderSpec

ReorderSpec defines details of packet reorder.

Appears In:
Field Description

reorder string

correlation string

gap integer

Schedule

Schedule is the cronly schedule object

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

Schedule

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

ScheduleItem

Appears In:
Field Description

EmbedChaos EmbedChaos

workflow WorkflowSpec

ScheduleSpec

ScheduleSpec is the specification of a schedule object

Field Description

schedule string

startingDeadlineSeconds integer

concurrencyPolicy ConcurrencyPolicy

historyLimit integer

ScheduleItem ScheduleItem

ScheduleStatus

ScheduleStatus is the status of a schedule object

Appears In:
Field Description

active ObjectReference array

time Time

ScheduleTemplateType (string)

SelectorMode (string)

SelectorMode represents the mode to run chaos action.

StatusCheck

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

StatusCheck

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a status check

Most recently observed status of status check

StatusCheckCondition

Appears In:
Field Description

lastProbeTime Time

lastTransitionTime Time

StatusCheckConditionType (string)

Appears In:

StatusCheckMode (string)

Appears In:

StatusCheckOutcome (string)

Appears In:

StatusCheckReason (string)

Appears In:

StatusCheckRecord

Appears In:
Field Description

startTime Time

StatusCheckSpec

Field Description

Mode defines the execution mode of the status check. Support type: Synchronous / Continuous

Type defines the specific status check type. Support type: HTTP

duration string

Duration defines the duration of the whole status check if the number of failed execution does not exceed the failure threshold. Duration is available to both Synchronous and Continuous mode. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

timeoutSeconds integer

TimeoutSeconds defines the number of seconds after which an execution of status check times out.

intervalSeconds integer

IntervalSeconds defines how often (in seconds) to perform an execution of status check.

failureThreshold integer

FailureThreshold defines the minimum consecutive failure for the status check to be considered failed.

successThreshold integer

SuccessThreshold defines the minimum consecutive successes for the status check to be considered successful. SuccessThreshold only works for Synchronous mode.

recordsHistoryLimit integer

RecordsHistoryLimit defines the number of record to retain.

EmbedStatusCheck EmbedStatusCheck

StatusCheckStatus

Appears In:
Field Description

startTime Time

StartTime represents time when the status check started to execute.

completionTime Time

CompletionTime represents time when the status check was completed.

count integer

Count represents the total number of the status check executed.

conditions StatusCheckCondition array

Conditions represents the latest available observations of a StatusCheck’s current state.

records StatusCheckRecord array

Records contains the history of the execution of StatusCheck.

StatusCheckType (string)

Appears In:

StressCPUSpec

Appears In:
Field Description

load integer

specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading.

workers integer

specifies N workers to apply the stressor.

options string array

extend stress-ng options

StressChaos

StressChaos is the Schema for the stresschaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

StressChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a time chaos experiment

Most recently observed status of the time chaos experiment

StressChaosSpec

StressChaosSpec defines the desired state of StressChaos

Appears In:
Field Description

ContainerSelector ContainerSelector

stressors Stressors

Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified.

stressngStressors string

StressngStressors defines plenty of stressors just like Stressors except that it’s an experimental feature and more powerful. You can define stressors in stress-ng (see also man stress-ng) dialect, however not all of the supported stressors are well tested. It maybe retired in later releases. You should always use Stressors to define the stressors and use this only when you want more stressors unsupported by Stressors. When both StressngStressors and Stressors are defined, StressngStressors wins.

duration string

Duration represents the duration of the chaos action

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

StressChaosStatus

StressChaosStatus defines the observed state of StressChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

instances object (keys:string, values:StressInstance)

Instances always specifies stressing instances

StressInstance

StressInstance is an instance generates stresses

Appears In:
Field Description

uid string

UID is the stress-ng identifier

memoryUid string

MemoryUID is the memStress identifier

startTime Time

StartTime specifies when the stress-ng starts

memoryStartTime Time

MemoryStartTime specifies when the memStress starts

StressMemorySpec

Appears In:
Field Description

size string

specifies N bytes consumed per vm worker, default is the total available memory. One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB..

options string array

extend stress-ng options

Stressor

Stressor defines common configurations of a stressor

Field Description

workers integer

Workers specifies N workers to apply the stressor. Maximum 8192 workers can run by stress-ng

Stressors

Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses

Appears In:
Field Description

MemoryStressor stresses virtual memory out

CPUStressor stresses CPU out

Task

Field Description

container Container

Container is the main container image to run in the pod

volumes Volume array

Volumes is a list of volumes that can be mounted by containers in a template.

TcParameter

TcParameter represents the parameters for a traffic control chaos

Field Description

delay DelaySpec

Delay represents the detail about delay action

loss LossSpec

Loss represents the detail about loss action

duplicate DuplicateSpec

DuplicateSpec represents the detail about loss action

corrupt CorruptSpec

Corrupt represents the detail about corrupt action

bandwidth BandwidthSpec

Bandwidth represents the detail about bandwidth control action

rate RateSpec

Rate represents the detail about rate control action

TcType (string)

TcType the type of traffic control

Appears In:

Template

Appears In:
Field Description

name string

templateType TemplateType

deadline string

task Task

Task describes the behavior of the custom task. Only used when Type is TypeTask.

children string array

Children describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel.

conditionalBranches ConditionalBranch array

ConditionalBranches describes the conditional branches of custom tasks. Only used when Type is TypeTask.

EmbedChaos EmbedChaos

EmbedChaos describe the chaos to be injected with chaos nodes. Only used when Type is Type<Something>Chaos.

Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule.

statusCheck StatusCheckSpec

StatusCheck describe the behavior of StatusCheck. Only used when Type is TypeStatusCheck.

abortWithStatusCheck boolean

AbortWithStatusCheck describe whether to abort the workflow when the failure threshold of StatusCheck is exceeded. Only used when Type is TypeStatusCheck.

TemplateType (string)

TimeChaos

TimeChaos is the Schema for the timechaos API

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

TimeChaos

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a time chaos experiment

Most recently observed status of the time chaos experiment

TimeChaosSpec

TimeChaosSpec defines the desired state of TimeChaos

Appears In:
Field Description

ContainerSelector ContainerSelector

timeOffset string

TimeOffset defines the delta time of injected program. It’s a possibly signed sequence of decimal numbers, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

clockIds string array

ClockIds defines all affected clock id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"]

duration string

Duration represents the duration of the chaos action

remoteCluster string

RemoteCluster represents the remote cluster where the chaos will be deployed

TimeChaosStatus

TimeChaosStatus defines the observed state of TimeChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

Timespec

Timespec represents a time

Appears In:
Field Description

sec integer

nsec integer

UserDefinedSpec

Appears In:
Field Description

attackCmd string

The command to be executed when attack

recoverCmd string

The command to be executed when recover

VMSpec

Appears In:
Field Description

vm-name string

The name of the VM to be injected

Workflow

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

Workflow

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a workflow

Most recently observed status of the workflow

WorkflowCondition

Appears In:
Field Description

reason string

startTime Time

WorkflowConditionType (string)

Appears In:

WorkflowNode

Field Description

apiVersion string

chaos-mesh.org/v1alpha1

kind string

WorkflowNode

TypeMeta TypeMeta

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

Spec defines the behavior of a node of workflow

Most recently observed status of the workflow node

WorkflowNodeCondition

Appears In:
Field Description

reason string

WorkflowNodeConditionType (string)

Appears In:

WorkflowNodeSpec

Appears In:
Field Description

templateName string

workflowName string

startTime Time

deadline Time

task Task

children string array

conditionalBranches ConditionalBranch

EmbedChaos EmbedChaos

schedule ScheduleSpec

statusCheck StatusCheckSpec

StatusCheck describe the behavior of StatusCheck. Only used when Type is TypeStatusCheck.

abortWithStatusCheck boolean

AbortWithStatusCheck describe whether to abort the workflow when the failure threshold of StatusCheck is exceeded. Only used when Type is TypeStatusCheck.

WorkflowNodeStatus

Appears In:
Field Description

ChaosResource refs to the real chaos CR object.

conditionalBranchesStatus ConditionalBranchesStatus

ConditionalBranchesStatus records the evaluation result of each ConditionalBranch

activeChildren LocalObjectReference

ActiveChildren means the created children node

finishedChildren LocalObjectReference

Children is necessary for representing the order when replicated child template references by parent template.

conditions WorkflowNodeCondition array

Represents the latest available observations of a workflow node’s current state.

WorkflowSpec

Appears In:
Field Description

entry string

templates Template array

WorkflowStatus

Appears In:
Field Description

entryNode string

startTime Time

endTime Time

conditions WorkflowCondition array

Represents the latest available observations of a workflow’s current state.