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 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AwsChaos
AwsChaos is the Schema for the awschaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
|
|
AwsChaosAction (string)
AwsChaosAction represents the chaos action about aws.
AwsChaosSpec
AwsChaosSpec is the content of the specification for an AwsChaos
Field | Description |
---|---|
|
Action defines the specific aws chaos action. Supported action: ec2-stop / ec2-restart / detach-volume Default action: ec2-stop |
|
Duration represents the duration of the chaos action. |
|
Scheduler defines some schedule rules to control the running time of the chaos experiment about time. |
|
SecretName defines the name of kubernetes secret. |
|
AwsRegion defines the region of aws. |
|
Ec2Instance indicates the ID of the ec2 instance. |
|
EbsVolume indicates the ID of the EBS volume. Needed in detach-volume. |
|
DeviceName indicates the name of the device. Needed in detach-volume. |
|
Endpoint indicates the endpoint of the aws server. Just used it in test now. |
AwsChaosStatus
AwsChaosStatus represents the status of an AwsChaos
Field | Description |
---|---|
|
BandwidthSpec
BandwidthSpec defines detail of bandwidth limit.
Field | Description |
---|---|
|
Rate is the speed knob. Allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second. |
|
Limit is the number of bytes that can be queued waiting for tokens to become available. |
|
Buffer is the maximum amount of bytes that tokens can be available for instantaneously. |
|
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 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
Field | Description |
---|---|
|
|
|
Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading. |
|
extend stress-ng options |
ChainDirection (string)
ChainDirection represents the direction of chain
ChaosStatus
Field | Description |
---|---|
|
|
|
|
|
Experiment records the last experiment state. |
CorruptSpec
CorruptSpec defines detail of a corrupt action
Field | Description |
---|---|
|
|
|
DNSChaos
DNSChaos is the Schema for the networkchaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
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
Field | Description |
---|---|
|
Action defines the specific DNS chaos action. Supported action: error, random Default action: error |
|
Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Selector is used to select pods that are used to inject chaos action. |
|
Duration represents the duration of the chaos action |
|
Scheduler defines some schedule rules to control the running time of the chaos experiment about network. |
|
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
Field | Description |
---|---|
|
DelaySpec
DelaySpec defines detail of a delay action
Field | Description |
---|---|
|
|
|
|
|
|
|
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.
DuplicateSpec
DuplicateSpec defines detail of a duplicate action
Field | Description |
---|---|
|
|
|
ExperimentPhase (string)
ExperimentPhase is the current status of chaos experiment.
ExperimentStatus
Field | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
FailKernRequest
FailKernRequest defines the injection conditions
Field | Description |
---|---|
|
FailType indicates what to fail, can be set to '0' / '1' / '2' If |
|
Headers indicates the appropriate kernel headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" and so on |
|
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 indicates the fails with probability. If you want 1%, please set this field with 1. |
|
Times indicates the max times of fails. |
FileType (string)
FileType represents type of a file
FillingType (string)
FillingType represents type of data is filled for incorrectness
Filter
Filter represents a filter of IoChaos action, which will define the scope of an IoChaosAction
Field | Description |
---|---|
|
Path represents a glob of injecting path |
|
Methods represents the method that the action will inject in |
|
Percent represents the percent probability of injecting this action |
Frame
Frame defines the function signature and predicate in function’s body
Field | Description |
---|---|
|
Funcname can be find from kernel source or |
|
Parameters is used with predicate, for example, if you want to inject slab error in |
|
Predicate will access the arguments of this Frame, example with Parameters’s, you can set it to |
HTTPChaos
HTTPChaos is the Schema for the HTTPchaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
|
|
HTTPChaosAction (string)
HTTPChaosAction represents the chaos action about HTTP.
HTTPChaosSpec
Field | Description |
---|---|
|
Selector is used to select pods that are used to inject chaos action. |
|
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 defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Duration represents the duration of the chaos action. It is required when the action is |
|
Percent defines the percentage of injection errors and provides a number from 0-100. default: 100. |
|
Specifies how the header match will be performed to route the request. |
HTTPChaosStatus
Field | Description |
---|---|
|
IoChaos
IoChaos is the Schema for the iochaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
|
|
IoChaosAction
IoChaosAction defines an possible action of IoChaos
Field | Description |
---|---|
|
|
|
|
|
Faults represents the fault to inject |
|
Latency represents the latency to inject |
|
AttrOverride represents the attribution to override |
|
MistakeSpec represents the mistake to inject |
|
Source represents the source of current rules |
IoChaosSpec
IoChaosSpec defines the desired state of IoChaos
Field | Description |
---|---|
|
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 is required when the mode is set to |
|
Action defines the specific pod chaos action. Supported action: latency / fault / attrOverride / mistake |
|
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 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 defines what types of incorrectness are injected to IO operations |
|
Path defines the path of files for injecting I/O chaos action. |
|
Methods defines the I/O methods for injecting I/O chaos action. default: all I/O methods. |
|
Percent defines the percentage of injection errors and provides a number from 0-100. default: 100. |
|
VolumePath represents the mount path of injected volume |
|
ContainerName indicates the target container to inject iochaos in |
|
Scheduler defines some schedule rules to control the running time of the chaos experiment about pods. |
|
Duration represents the duration of the chaos action. It is required when the action is |
IoChaosStatus
IoChaosStatus defines the observed state of IoChaos
Field | Description |
---|---|
|
IoChaosType (string)
IoChaosType represents the type of an IoChaos Action
IoFault
IoFault represents the fault to inject and their weight
Field | Description |
---|---|
|
|
|
IoMethod (string)
JVMChaos
JVMChaos is the Schema for the jvmchaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
|
|
JVMChaosAction (string)
JVMChaosAction represents the chaos action about jvm
JVMChaosSpec
JVMChaosSpec defines the desired state of JVMChaos
Field | Description |
---|---|
|
Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Selector is used to select pods that are used to inject chaos action. |
|
Duration represents the duration of the chaos action |
|
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 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
Field | Description |
---|---|
|
JVMChaosTarget (string)
JVMParameter
JVMParameter represents the detail about jvm chaos action definition
Field | Description |
---|---|
|
Flags represents the flags of action |
|
Matchers represents the matching rules for the target |
KernelChaos
KernelChaos is the Schema for the kernelchaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
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
Field | Description |
---|---|
|
Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Selector is used to select pods that are used to inject chaos action. |
|
FailKernRequest defines the request of kernel injection |
|
Duration represents the duration of the chaos action |
|
Scheduler defines some schedule rules to control the running time of the chaos experiment about time. |
KernelChaosStatus
KernelChaosStatus defines the observed state of KernelChaos
Field | Description |
---|---|
|
LossSpec
LossSpec defines detail of a loss action
Field | Description |
---|---|
|
|
|
Matcher
Field | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MemoryStressor
MemoryStressor defines how to stress memory out
Field | Description |
---|---|
|
|
|
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. |
|
extend stress-ng options |
MistakeSpec
MistakeSpec represents one type of mistake
Field | Description |
---|---|
|
Filling determines what is filled in the miskate data. |
|
There will be [1, MaxOccurrences] segments of wrong data. |
|
Max length of each wrong data segment in bytes |
NetworkChaos
NetworkChaos is the Schema for the networkchaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
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.
NetworkChaosSpec
NetworkChaosSpec defines the desired state of NetworkChaos
Field | Description |
---|---|
|
Action defines the specific network chaos action. Supported action: partition, netem, delay, loss, duplicate, corrupt Default action: delay |
|
Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Selector is used to select pods that are used to inject chaos action. |
|
Duration represents the duration of the chaos action |
|
Scheduler defines some schedule rules to control the running time of the chaos experiment about network. |
|
TcParameter represents the traffic control definition |
|
Direction represents the direction, this applies on netem and network partition action |
|
Target represents network target, this applies on netem and network partition action |
|
ExternalTargets represents network targets outside k8s |
NetworkChaosStatus
NetworkChaosStatus defines the observed state of NetworkChaos
Field | Description |
---|---|
|
ParameterRules
ParameterRules defines the parameter validation rules
Field | Description |
---|---|
|
Name represents the name of parameter |
|
ParameterType represents the parameter type |
|
Required defines whether it is a required parameter |
ParameterType (string)
ParameterType defines the parameter type
PodChaos
PodChaos is the control script`s spec.
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
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.
PodChaosSpec
PodChaosSpec defines the attributes that a user creates on a chaos experiment about pods.
Field | Description |
---|---|
|
Selector is used to select pods that are used to inject chaos action. |
|
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 defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Duration represents the duration of the chaos action. It is required when the action is |
|
ContainerName indicates the name of the container. Needed in container-kill. |
|
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.
Field | Description |
---|---|
|
PodIoChaos
PodIoChaos is the Schema for the podiochaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
PodIoChaosSpec
PodIoChaosSpec defines the desired state of IoChaos
Field | Description |
---|---|
|
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 |
|
TODO: support multiple different container to inject in one pod |
|
Pid represents a running toda process id |
|
StartTime represents the start time of a toda process |
|
Actions are a list of IoChaos actions |
PodNetworkChaos
PodNetworkChaos is the Schema for the PodNetworkChaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
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
Field | Description |
---|---|
|
The ipset on the pod |
|
The iptables rules on the pod |
|
The tc rules on the pod |
PodNetworkChaosStatus
PodNetworkChaosStatus defines the observed state of PodNetworkChaos
Field | Description |
---|---|
|
PodStatus
PodStatus represents information about the status of a pod in chaos experiment.
Field | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
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
Field | Description |
---|---|
|
The name of ipset |
|
The contents of ipset |
|
The name and namespace of the source network chaos |
RawIptables
RawIptables represents the iptables rules on specific pod
Field | Description |
---|---|
|
The name of iptables chain |
|
The name of related ipset |
|
The block direction of this iptables rule |
|
RawRuleSource
RawRuleSource represents the name and namespace of the source network chaos
Field | Description |
---|---|
|
RawTrafficControl
RawTrafficControl represents the traffic control chaos on specific pod
Field | Description |
---|---|
|
The type of traffic control |
|
|
|
The name of target ipset |
|
The name and namespace of the source network chaos |
ReorderSpec
ReorderSpec defines details of packet reorder.
Field | Description |
---|---|
|
|
|
|
|
ScheduleStatus
ScheduleStatus is the current status of chaos scheduler.
Field | Description |
---|---|
|
Next time when this action will be applied again |
|
Next time when this action will be recovered |
SchedulerSpec
SchedulerSpec defines information about schedule of the chaos experiment.
Field | Description |
---|---|
|
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 is a set of namespace to which objects belong. |
|
Nodes is a set of node name and objects must belong to these nodes. |
|
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. |
|
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. |
|
Map of string keys and values that can be used to select objects. A selector based on fields. |
|
Map of string keys and values that can be used to select objects. A selector based on labels. |
|
a slice of label selector expressions that can be used to select objects. A list of selectors based on set-based label expressions. |
|
Map of string keys and values that can be used to select objects. A selector based on annotations. |
|
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 |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
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
Field | Description |
---|---|
|
Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Selector is used to select pods that are used to inject chaos action. |
|
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 defines plenty of stressors just like |
|
ContainerName indicates the target container to inject stress in |
|
Duration represents the duration of the chaos action |
|
Scheduler defines some schedule rules to control the running time of the chaos experiment about time. |
StressChaosStatus
StressChaosStatus defines the observed state of StressChaos
Field | Description |
---|---|
|
|
|
Instances always specifies stressing instances |
StressInstance
StressInstance is an instance generates stresses
Field | Description |
---|---|
|
UID is the instance identifier |
|
StartTime specifies when the instance starts |
Stressor
Stressor defines common configurations of a stressor
Field | Description |
---|---|
|
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
Field | Description |
---|---|
|
MemoryStressor stresses virtual memory out |
|
CPUStressor stresses CPU out |
Target
Target represents network partition and netem action target.
Field | Description |
---|---|
|
TargetSelector defines the target selector |
|
TargetMode defines the target selector mode |
|
TargetValue is required when the mode is set to |
TcParameter
TcParameter represents the parameters for a traffic control chaos
Field | Description |
---|---|
|
Delay represents the detail about delay action |
|
Loss represents the detail about loss action |
|
DuplicateSpec represents the detail about loss action |
|
Corrupt represents the detail about corrupt action |
|
Bandwidth represents the detail about bandwidth control action |
TcType (string)
TcType the type of traffic control
TimeChaos
TimeChaos is the Schema for the timechaos API
Field | Description |
---|---|
|
|
|
|
|
|
|
Refer to Kubernetes API documentation for fields of |
|
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
Field | Description |
---|---|
|
Mode defines the mode to run chaos action. Supported mode: one / all / fixed / fixed-percent / random-max-percent |
|
Value is required when the mode is set to |
|
Selector is used to select pods that are used to inject chaos action. |
|
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 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"] |
|
ContainerName indicates the name of affected container. If not set, all containers will be injected |
|
Duration represents the duration of the chaos action |
|
Scheduler defines some schedule rules to control the running time of the chaos experiment about time. |
TimeChaosStatus
TimeChaosStatus defines the observed state of TimeChaos
Field | Description |
---|---|
|
Timespec
Timespec represents a time
Field | Description |
---|---|
|
|
|