API Reference

chaos-mesh.org/v1alpha1

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

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

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.

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about time.

secretName string

SecretName defines the name of kubernetes secret.

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.

endpoint string

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

AwsChaosStatus

AwsChaosStatus represents the status of an AwsChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

BandwidthSpec

BandwidthSpec defines detail of bandwidth limit.

Appears In:
Field Description

rate string

Rate is the speed knob. Allows 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.

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:

ChaosStatus

Field Description

failedMessage string

scheduler ScheduleStatus

experiment ExperimentStatus

Experiment records the last experiment state.

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. If RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

selector SelectorSpec

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

duration string

Duration represents the duration of the chaos action

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about network.

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"

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

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:

DuplicateSpec

DuplicateSpec defines detail of a duplicate action

Appears In:
Field Description

duplicate string

correlation string

ExperimentPhase (string)

ExperimentPhase is the current status of chaos experiment.

Appears In:

ExperimentStatus

Appears In:
Field Description

reason string

startTime Time

endTime Time

duration string

podRecords PodStatus array

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.

FileType (string)

FileType represents type of a 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.

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.

HTTPChaosAction (string)

HTTPChaosAction represents the chaos action about HTTP.

Appears In:

HTTPChaosSpec

Appears In:
Field Description

selector SelectorSpec

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

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about pods.

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

abort

mixed Default action: delay

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

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".

percent string

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

headers Matcher array

Specifies how the header match will be performed to route the request.

HTTPChaosStatus

Appears In:
Field Description

ChaosStatus ChaosStatus

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 an 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

selector SelectorSpec

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

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

containerName string

ContainerName indicates the target container to inject iochaos in

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about pods.

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".

IoChaosStatus

IoChaosStatus defines the observed state of IoChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

IoChaosType (string)

IoChaosType represents the type of an IoChaos Action

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the max % of pods the server can do chaos action. If RandomMaxPercentPodMod, provide a number from 0-100 to specify the % of pods to do chaos action

selector SelectorSpec

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

duration string

Duration represents the duration of the chaos action

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about time.

Action defines the specific jvm chaos action. Supported action: delay;return;script;cfl;oom;ccf;tce;cpf;tde;tpf

JVMParameter JVMParameter

JVMParameter represents the detail about jvm chaos action definition

Target defines the specific jvm chaos target. Supported target: servlet;psql;jvm;jedis;http;dubbo;rocketmq;tars;mysql;druid;redisson;rabbitmq;mongodb

JVMChaosStatus

JVMChaosStatus defines the observed state of JVMChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

JVMChaosTarget (string)

Appears In:

JVMParameter

JVMParameter represents the detail about jvm chaos action definition

Appears In:
Field Description

flags object (keys:string, values:string)

Flags represents the flags of action

matchers object (keys:string, values:string)

Matchers represents the matching rules for the target

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. If RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

selector SelectorSpec

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

failKernRequest FailKernRequest

FailKernRequest defines the request of kernel injection

duration string

Duration represents the duration of the chaos action

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about time.

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

Matcher

Appears In:
Field Description

name string

exact_match string

regex_match string

safe_regex_match string

range_match string

present_match string

prefix_match string

suffix_match string

invert_match 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.

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 miskate data.

maxOccurrences integer

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

maxLength integer

Max length of each wrong data segment in bytes

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

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. If RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

selector SelectorSpec

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

duration string

Duration represents the duration of the chaos action

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about network.

TcParameter TcParameter

TcParameter represents the traffic control definition

direction Direction

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

target Target

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

externalTargets string array

ExternalTargets represents network targets outside k8s

NetworkChaosStatus

NetworkChaosStatus defines the observed state of NetworkChaos

Appears In:
Field Description

ChaosStatus ChaosStatus

ParameterRules

ParameterRules defines the parameter validation rules

Appears In:
Field Description

Name string

Name represents the name of parameter

ParameterType ParameterType

ParameterType represents the parameter type

Required boolean

Required defines whether it is a required parameter

ParameterType (string)

ParameterType defines the parameter type

Appears In:

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

selector SelectorSpec

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

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about pods.

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

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".

containerName string

ContainerName indicates the name of the container. Needed in container-kill.

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.

PodChaosStatus

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

Appears In:
Field Description

ChaosStatus ChaosStatus

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

pid integer

Pid represents a running toda process id

startTime integer

StartTime represents the start time of a toda process

actions IoChaosAction array

Actions are a list of IoChaos actions

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

ChaosStatus ChaosStatus

PodStatus

PodStatus represents information about the status of a pod in chaos experiment.

Appears In:
Field Description

namespace string

name string

action string

hostIP string

podIP string

message string

A brief CamelCase message indicating details about the chaos action. e.g. "delete this pod" or "pause this pod duration 5m"

RawIPSet

RawIPSet represents an ipset on specific pod

Appears In:
Field Description

name string

The name of ipset

cidrs string array

The contents of ipset

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

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

ReorderSpec

ReorderSpec defines details of packet reorder.

Appears In:
Field Description

reorder string

correlation string

gap integer

ScheduleStatus

ScheduleStatus is the current status of chaos scheduler.

Appears In:
Field Description

nextStart Time

Next time when this action will be applied again

nextRecover Time

Next time when this action will be recovered

SchedulerSpec

SchedulerSpec defines information about schedule of the chaos experiment.

Field Description

cron string

Cron defines a cron job rule. Some rule examples: "0 30 * * * *" means to "Every hour on the half hour" "@hourly" means to "Every hour" "@every 1h30m" means to "Every hour thirty" More rule info: https://godoc.org/github.com/robfig/cron

SelectorSpec

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

Field Description

namespaces string array

Namespaces is a set of namespace to which objects belong.

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.

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.

podPhaseSelectors string array

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

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the max % of pods the server can do chaos action. If RandomMaxPercentPodMod, provide a number from 0-100 to specify the % of pods to do chaos action

selector SelectorSpec

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

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.

containerName string

ContainerName indicates the target container to inject stress in

duration string

Duration represents the duration of the chaos action

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about time.

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 instance identifier

startTime Time

StartTime specifies when the instance starts

Stressor

Stressor defines common configurations of a stressor

Field Description

workers integer

Workers specifies N workers to apply the stressor.

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

Target

Target represents network partition and netem action target.

Appears In:
Field Description

selector SelectorSpec

TargetSelector defines the target selector

mode PodMode

TargetMode defines the target selector mode

value string

TargetValue is required when the mode is set to FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. If RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

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

TcType (string)

TcType the type of traffic control

Appears In:

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

mode PodMode

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 FixedPodMode / FixedPercentPodMod / RandomMaxPercentPodMod. If FixedPodMode, provide an integer of pods to do chaos action. If FixedPercentPodMod, provide a number from 0-100 to specify the percent of pods the server can do chaos action. If RandomMaxPercentPodMod, provide a number from 0-100 to specify the max percent of pods to do chaos action

selector SelectorSpec

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

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"]

containerNames string array

ContainerName indicates the name of affected container. If not set, all containers will be injected

duration string

Duration represents the duration of the chaos action

scheduler SchedulerSpec

Scheduler defines some schedule rules to control the running time of the chaos experiment about time.

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