fix: mode and value
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
This commit is contained in:
		
							parent
							
								
									33f942b5a8
								
							
						
					
					
						commit
						1dd9367b02
					
				| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
{
 | 
			
		||||
  "semi": false,
 | 
			
		||||
  "singleQuote": true,
 | 
			
		||||
  "printWidth": 120
 | 
			
		||||
  "printWidth": 120,
 | 
			
		||||
  "proseWrap": "never"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,14 +153,14 @@ Before you create an experiment using Chaos Dashboard, make sure the following r
 | 
			
		|||
 | 
			
		||||
The following table shows the fields in the YAML configuration file.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example              |
 | 
			
		||||
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | -------------------- |
 | 
			
		||||
| action      | string | Indicates the specific type of faults. Only ec2-stop, ec2-restore, and detain-volume are supported.                                                                                                                                                                                                                                                                         | ec2-stop      | Yes      | ec2-stop             |
 | 
			
		||||
| mode        | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`                  |
 | 
			
		||||
| value       | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                         | None          | No       | 2                    |
 | 
			
		||||
| secretName  | string | Specifies the name of the Kubernetes Secret that stores the AWS authentication information.                                                                                                                                                                                                                                                                                 | None          | No       | cloud-key-secret     |
 | 
			
		||||
| awsRegion   | string | Specifies the AWS region.                                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | us-east-2            |
 | 
			
		||||
| ec2Instance | string | Specifies the ID of the EC2 instance.                                                                                                                                                                                                                                                                                                                                       | None          | Yes      | your-ec2-instance-id |
 | 
			
		||||
| volumeID    | string | This is a required field when the `action` is `detach-volume`. This field specifies the EBS volume ID.                                                                                                                                                                                                                                                                      | None          | No       | your-volume-id       |
 | 
			
		||||
| deviceName  | string | This is a required field when the `action` is `detach-volume`. This field specifies the machine name.                                                                                                                                                                                                                                                                       | None          | No       | /dev/sdf             |
 | 
			
		||||
| duration    | string | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | 30s                  |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific type of faults. Only ec2-stop, ec2-restore, and detain-volume are supported. | ec2-stop | Yes | ec2-stop |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| secretName | string | Specifies the name of the Kubernetes Secret that stores the AWS authentication information. | None | No | cloud-key-secret |
 | 
			
		||||
| awsRegion | string | Specifies the AWS region. | None | Yes | us-east-2 |
 | 
			
		||||
| ec2Instance | string | Specifies the ID of the EC2 instance. | None | Yes | your-ec2-instance-id |
 | 
			
		||||
| volumeID | string | This is a required field when the `action` is `detach-volume`. This field specifies the EBS volume ID. | None | No | your-volume-id |
 | 
			
		||||
| deviceName | string | This is a required field when the `action` is `detach-volume`. This field specifies the machine name. | None | No | /dev/sdf |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. | None | Yes | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,13 +84,13 @@ Make sure that the Pod status is `Running`.
 | 
			
		|||
 | 
			
		||||
### Configuration Description
 | 
			
		||||
 | 
			
		||||
| Parameter | Type         | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example                                      |
 | 
			
		||||
| :-------- | :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ | :------- | :------------------------------------------- |
 | 
			
		||||
| action    | string       | Defines the behavior of DNS fault. The value can be `random` or `error`. When the value is `random`, DNS service will return a random IP address; when the value is `error`, DNS service will return an error.                                                                                                                                                              | None          | Yes      | `random` or `error`                          |
 | 
			
		||||
| patterns  | String array | Selects a domain template that matches faults. Placeholder `?` and wildcard are supported. `*`                                                                                                                                                                                                                                                                              | []            | No       | `google.com`, `chaos-mesh.org`, `github.com` |
 | 
			
		||||
| mode      | string       | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`                                          |
 | 
			
		||||
| value     | string       | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                        | None          | No       | 2                                            |
 | 
			
		||||
| selector  | struct       | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                | None          | Yes      |                                              |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| :-- | :-- | :-- | :-- | :-- | :-- |
 | 
			
		||||
| action | string | Defines the behavior of DNS fault. The value can be `random` or `error`. When the value is `random`, DNS service will return a random IP address; when the value is `error`, DNS service will return an error. | None | Yes | `random` or `error` |
 | 
			
		||||
| patterns | String array | Selects a domain template that matches faults. Placeholder `?` and wildcard are supported. `*` | [] | No | `google.com`, `chaos-mesh.org`, `github.com` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
 | 
			
		||||
:::note
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,14 +160,14 @@ Before you create an experiment using Chaos Dashboard, make sure the following r
 | 
			
		|||
 | 
			
		||||
The following table shows the fields in the YAML configuration file.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type     | Descpription                                                                                                                                                                                                                                                                                                                                               | Default value | Required | Example              |
 | 
			
		||||
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | -------------------- |
 | 
			
		||||
| action      | string   | Indicates the specific type of faults. The available fault types include node-stop, node-reset, and disk-loss.                                                                                                                                                                                                                                             | node-stop     | Yes      | node-stop            |
 | 
			
		||||
| mode        | string   | Indicates the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None          | Yes      | `one`                |
 | 
			
		||||
| value       | string   | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of pods.                                                                                                                                                                                       | None          | No       | 2                    |
 | 
			
		||||
| secretName  | string   | Indicates the name of the Kubernetes secret that stores the GCP authentication information.                                                                                                                                                                                                                                                                | None          | No       | cloud-key-secret     |
 | 
			
		||||
| project     | string   | Indicates the name of GCP project.                                                                                                                                                                                                                                                                                                                         | None          | Yes      | your-project         |
 | 
			
		||||
| zone        | string   | Indicates the region of GCP instance.                                                                                                                                                                                                                                                                                                                      | None          | Yes      | us-central1-a        |
 | 
			
		||||
| instance    | string   | Indicates the ID of GCP instance.                                                                                                                                                                                                                                                                                                                          | None          | Yes      | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | This is a required field when the `action` is `disk-loss`. This field specifies the machine disk ID.                                                                                                                                                                                                                                                       | None          | no       | ["your-disk-id"]     |
 | 
			
		||||
| duration    | string   | Indicates the duration of the experiment.                                                                                                                                                                                                                                                                                                                  | None          | Yes      | 30s                  |
 | 
			
		||||
| Parameter | Type | Descpription | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific type of faults. The available fault types include node-stop, node-reset, and disk-loss. | node-stop | Yes | node-stop |
 | 
			
		||||
| mode | string | Indicates the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of pods. | None | No | 1 |
 | 
			
		||||
| secretName | string | Indicates the name of the Kubernetes secret that stores the GCP authentication information. | None | No | cloud-key-secret |
 | 
			
		||||
| project | string | Indicates the name of GCP project. | None | Yes | your-project |
 | 
			
		||||
| zone | string | Indicates the region of GCP instance. | None | Yes | us-central1-a |
 | 
			
		||||
| instance | string | Indicates the ID of GCP instance. | None | Yes | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | This is a required field when the `action` is `disk-loss`. This field specifies the machine disk ID. | None | no | ["your-disk-id"] |
 | 
			
		||||
| duration | string | Indicates the duration of the experiment. | None | Yes | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,15 +57,15 @@ You can create experiments using either Chaos Dashboard or the YAML configuratio
 | 
			
		|||
 | 
			
		||||
The fields in the YAML configuration file are described in the following table:
 | 
			
		||||
 | 
			
		||||
| Parameter         | Type                    | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example     |
 | 
			
		||||
| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ----------- |
 | 
			
		||||
| duration          | string                  | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | `30s`       |
 | 
			
		||||
| stressors         | [Stressors](#stressors) | Specifies the stress of CPU or memory                                                                                                                                                                                                                                                                                                                                       | None          | No       |             |
 | 
			
		||||
| stressngStressors | string                  | Specifies the stres-ng parameter to reach richer stress injection                                                                                                                                                                                                                                                                                                           | None          | No       | `--clone 2` |
 | 
			
		||||
| mode              | string                  | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`         |
 | 
			
		||||
| value             | string                  | Provides a parameter for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                        | None          | No       | `2`         |
 | 
			
		||||
| containerNames    | []string                | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                                       | None          | No       | `["nginx"]` |
 | 
			
		||||
| selector          | struct                  | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                | None          | Yes      |             |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. | None | Yes | `30s` |
 | 
			
		||||
| stressors | [Stressors](#stressors) | Specifies the stress of CPU or memory | None | No |  |
 | 
			
		||||
| stressngStressors | string | Specifies the stres-ng parameter to reach richer stress injection | None | No | `--clone 2` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides a parameter for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected. | None | No | `["nginx"]` |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
 | 
			
		||||
#### Stressors
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -83,7 +83,7 @@ The fields in the YAML configuration file are described in the following table:
 | 
			
		|||
 | 
			
		||||
##### CPUStressor
 | 
			
		||||
 | 
			
		||||
| Parameter | Type | Description                                                                            | Default value | Required | Example |
 | 
			
		||||
| --------- | ---- | -------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| workers   | int  | Specifies the number of threads that apply memory stress                               |               | Yes      | `1`     |
 | 
			
		||||
| load      | int  | Specifies the percentage of CPU occupied0 means sleep and no load; 100 means full load |               | No       | `50`    |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| workers | int | Specifies the number of threads that apply memory stress |  | Yes | `1` |
 | 
			
		||||
| load | int | Specifies the percentage of CPU occupied0 means sleep and no load; 100 means full load |  | No | `50` |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,24 +110,24 @@ Currently, Chaos Mesh only supports using YAML configuration files to create HTT
 | 
			
		|||
 | 
			
		||||
Common fields are meaningful when the `target` of fault injection is `Request` or `Response`.
 | 
			
		||||
 | 
			
		||||
| Parameter        | Type              | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value                             | Required | Example                        |
 | 
			
		||||
| ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | -------- | ------------------------------ |
 | 
			
		||||
| mode             | string            | Specifies the mode of the experiment. The mode options include `one` (selecting a random pod), `all` (selecting all eligible pods), `fixed` (selecting a specified number of eligible pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible pods). |                                           | yes      | one                            |
 | 
			
		||||
| value            | string            | Provides parameters for the `mode` configuration depending on the value of `mode`.                                                                                                                                                                                                                                                                                          |                                           | no       | 2                              |
 | 
			
		||||
| target           | string            | Specifies whether the target of fault injuection is `Request` or `Response`. The [`target`-related fields](#Description-for-`target`-related-fields) should be configured at the same time.                                                                                                                                                                                 |                                           | yes      | Request                        |
 | 
			
		||||
| port             | int32             | The TCP port that the target service listens on.                                                                                                                                                                                                                                                                                                                            |                                           | yes      | 80                             |
 | 
			
		||||
| method           | string            | The HTTP method of the target request method.                                                                                                                                                                                                                                                                                                                               | Takes effect for all methods by default.  | no       | GET                            |
 | 
			
		||||
| path             | string            | The URI path of the target request which supports [Matching wildcards](https://www.wikiwand.com/en/Matching_wildcards).                                                                                                                                                                                                                                                     | Takes effect on all paths by default.     | no       | /api/\*                        |
 | 
			
		||||
| request_headers  | map[string]string | Matches request headers to the target service.                                                                                                                                                                                                                                                                                                                              | Takes effect for all requests by default. | no       | Content-Type: application/json |
 | 
			
		||||
| abort            | bool              | Indicates whether to inject the fault that interrupts server connection.                                                                                                                                                                                                                                                                                                    | false                                     | no       | true                           |
 | 
			
		||||
| delay            | string            | Specifies the time for a latency fault.                                                                                                                                                                                                                                                                                                                                     | 0                                         | no       | 10s                            |
 | 
			
		||||
| replace.header   | map[string]string | Specifies the key pair used to replace the request header or response header.                                                                                                                                                                                                                                                                                               |                                           | no       | Content-Type: application/xml  |
 | 
			
		||||
| replace.body     | []byte            | Specifies request body or response body to replace the fault (Base64 encoded).                                                                                                                                                                                                                                                                                              |                                           | no       | eyJmb28iOiAiYmFyIn0K           |
 | 
			
		||||
| patch.header     | [][]string        | Specifies the attached key pair of the request header or response header with patch faults.                                                                                                                                                                                                                                                                                 |                                           | no       | - [Set-Cookie, one cookie]     |
 | 
			
		||||
| patch.body.type  | string            | Specifies the type of patch faults of the request body or response body. Currently, it only supports [`JSON`](https://tools.ietf.org/html/rfc7396).                                                                                                                                                                                                                         |                                           | no       | JSON                           |
 | 
			
		||||
| patch.body.value | string            | Specifies the fault of the request body or response body with patch faults.                                                                                                                                                                                                                                                                                                 |                                           | no       | "{"foo": "bar"}"               |
 | 
			
		||||
| duration         | string            | Specifies the duration of a specific experiment.                                                                                                                                                                                                                                                                                                                            |                                           | yes      | 30s                            |
 | 
			
		||||
| scheduler        | string            | Specifies the scheduling rules for the time of a specific experiment.                                                                                                                                                                                                                                                                                                       |                                           | no       | 5 \* \* \* \*                  |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random pod), `all` (selecting all eligible pods), `fixed` (selecting a specified number of eligible pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible pods). |  | yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration depending on the value of `mode`. |  | no | 1 |
 | 
			
		||||
| target | string | Specifies whether the target of fault injuection is `Request` or `Response`. The [`target`-related fields](#Description-for-`target`-related-fields) should be configured at the same time. |  | yes | Request |
 | 
			
		||||
| port | int32 | The TCP port that the target service listens on. |  | yes | 80 |
 | 
			
		||||
| method | string | The HTTP method of the target request method. | Takes effect for all methods by default. | no | GET |
 | 
			
		||||
| path | string | The URI path of the target request which supports [Matching wildcards](https://www.wikiwand.com/en/Matching_wildcards). | Takes effect on all paths by default. | no | /api/\* |
 | 
			
		||||
| request_headers | map[string]string | Matches request headers to the target service. | Takes effect for all requests by default. | no | Content-Type: application/json |
 | 
			
		||||
| abort | bool | Indicates whether to inject the fault that interrupts server connection. | false | no | true |
 | 
			
		||||
| delay | string | Specifies the time for a latency fault. | 0 | no | 10s |
 | 
			
		||||
| replace.header | map[string]string | Specifies the key pair used to replace the request header or response header. |  | no | Content-Type: application/xml |
 | 
			
		||||
| replace.body | []byte | Specifies request body or response body to replace the fault (Base64 encoded). |  | no | eyJmb28iOiAiYmFyIn0K |
 | 
			
		||||
| patch.header | [][]string | Specifies the attached key pair of the request header or response header with patch faults. |  | no | - [Set-Cookie, one cookie] |
 | 
			
		||||
| patch.body.type | string | Specifies the type of patch faults of the request body or response body. Currently, it only supports [`JSON`](https://tools.ietf.org/html/rfc7396). |  | no | JSON |
 | 
			
		||||
| patch.body.value | string | Specifies the fault of the request body or response body with patch faults. |  | no | "{"foo": "bar"}" |
 | 
			
		||||
| duration | string | Specifies the duration of a specific experiment. |  | yes | 30s |
 | 
			
		||||
| scheduler | string | Specifies the scheduling rules for the time of a specific experiment. |  | no | 5 \* \* \* \* |
 | 
			
		||||
 | 
			
		||||
### Description for `target`-related fields
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -135,22 +135,22 @@ Common fields are meaningful when the `target` of fault injection is `Request` o
 | 
			
		|||
 | 
			
		||||
The `Request` field is a meaningful when the `target` set to `Request` during the fault injection.
 | 
			
		||||
 | 
			
		||||
| Parameter       | Type              | Description                                                         | Default value | Required | Example      |
 | 
			
		||||
| --------------- | ----------------- | ------------------------------------------------------------------- | ------------- | -------- | ------------ |
 | 
			
		||||
| replace.path    | string            | Specifies the URI path used to replace content.                     |               | no       | /api/v2/     |
 | 
			
		||||
| replace.method  | string            | Specifies the replaced content of the HTTP request method.          |               | no       | DELETE       |
 | 
			
		||||
| replace.queries | map[string]string | Specifies the replaced key pair of the URI query.                   |               | no       | foo: bar     |
 | 
			
		||||
| patch.queries   | [][]string        | Specifies the attached key pair of the URI query with patch faults. |               | no       | - [foo, bar] |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| replace.path | string | Specifies the URI path used to replace content. |  | no | /api/v2/ |
 | 
			
		||||
| replace.method | string | Specifies the replaced content of the HTTP request method. |  | no | DELETE |
 | 
			
		||||
| replace.queries | map[string]string | Specifies the replaced key pair of the URI query. |  | no | foo: bar |
 | 
			
		||||
| patch.queries | [][]string | Specifies the attached key pair of the URI query with patch faults. |  | no | - [foo, bar] |
 | 
			
		||||
 | 
			
		||||
#### `Respond`-related fields
 | 
			
		||||
 | 
			
		||||
The `Response` is a meaningful when the `target` set to `Response` during the fault injection.
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type              | Description                                                 | Default value                                 | Required | Example                        |
 | 
			
		||||
| -------------- | ----------------- | ----------------------------------------------------------- | --------------------------------------------- | -------- | ------------------------------ |
 | 
			
		||||
| code           | int32             | Specifies the status code responded by `target`.            | Takes effect for all status codes by default. | no       | 200                            |
 | 
			
		||||
| response_heads | map[string]string | Matches request headers to `target`.                        | Takes effect for all responses by default.    | no       | Content-Type: application/json |
 | 
			
		||||
| replace.code   | int32             | Specifies the replaced content of the response status code. |                                               | no       | 404                            |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| code | int32 | Specifies the status code responded by `target`. | Takes effect for all status codes by default. | no | 200 |
 | 
			
		||||
| response_heads | map[string]string | Matches request headers to `target`. | Takes effect for all responses by default. | no | Content-Type: application/json |
 | 
			
		||||
| replace.code | int32 | Specifies the replaced content of the response status code. |  | no | 404 |
 | 
			
		||||
 | 
			
		||||
## Local debugging
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -174,18 +174,18 @@ For specific features, refer to [Create experiments using the YAML files](#creat
 | 
			
		|||
 | 
			
		||||
#### General fields
 | 
			
		||||
 | 
			
		||||
| Parameter     | Type     | Description                                                                                                                                                                                                                                                                                                                                                | Default value                  | Required | Example             |
 | 
			
		||||
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -------- | ------------------- |
 | 
			
		||||
| action        | string   | Indicates the specific type of faults. Only latency, fault, attrOverride, and mistake are supported.                                                                                                                                                                                                                                                       |                                | Yes      | latency             |
 | 
			
		||||
| mode          | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None                           | Yes      | 1                   |
 | 
			
		||||
| selector      | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                         | None                           | Yes      |                     |
 | 
			
		||||
| value         | string   | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                       |                                | No       | 2                   |
 | 
			
		||||
| volumePath    | string   | The mount point of volume in the target container. Must be the root directory of the mount.                                                                                                                                                                                                                                                                |                                | Yes      | /var/run/etcd       |
 | 
			
		||||
| path          | string   | The valid range of fault injections, either a wildcard or a single file.                                                                                                                                                                                                                                                                                   | Valid for all files by default | No       | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods       | string[] | Type of the file system call that requires injecting fault. For more information about supported types, refer to [Appendix A](#appendix-a: methods-type).                                                                                                                                                                                                  | All Types                      | No       | READ                |
 | 
			
		||||
| percent       | int      | Probability of failure per operation, in %.                                                                                                                                                                                                                                                                                                                | 100                            | No       | 100                 |
 | 
			
		||||
| ContainerName | string   | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                      |                                | No       |                     |
 | 
			
		||||
| duration      | string   | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                  |                                | Yes      | 30s                 |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific type of faults. Only latency, fault, attrOverride, and mistake are supported. |  | Yes | latency |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. |  | No | 1 |
 | 
			
		||||
| volumePath | string | The mount point of volume in the target container. Must be the root directory of the mount. |  | Yes | /var/run/etcd |
 | 
			
		||||
| path | string | The valid range of fault injections, either a wildcard or a single file. | Valid for all files by default | No | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods | string[] | Type of the file system call that requires injecting fault. For more information about supported types, refer to [Appendix A](#appendix-a: methods-type). | All Types | No | READ |
 | 
			
		||||
| percent | int | Probability of failure per operation, in %. | 100 | No | 100 |
 | 
			
		||||
| ContainerName | string | Specifies the name of the container into which the fault is injected. |  | No |  |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. |  | Yes | 30s |
 | 
			
		||||
 | 
			
		||||
#### Fields related to action
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -213,20 +213,20 @@ The following are specific information about fields corresponding to action:
 | 
			
		|||
 | 
			
		||||
  AttrOverrideSpec is defined as follows:
 | 
			
		||||
 | 
			
		||||
  | Parameter | Type     | Description                                                                            | Default value | Required | Example           |
 | 
			
		||||
  | --------- | -------- | -------------------------------------------------------------------------------------- | ------------- | -------- | ----------------- |
 | 
			
		||||
  | ino       | int      | ino number                                                                             |               | No       |                   |
 | 
			
		||||
  | size      | int      | File size                                                                              |               | No       |                   |
 | 
			
		||||
  | blocks    | int      | Number of blocks that the file uses                                                    |               | No       |                   |
 | 
			
		||||
  | atime     | TimeSpec | Last access time                                                                       |               | No       |                   |
 | 
			
		||||
  | mtime     | TimeSpec | Last modified time                                                                     |               | No       |                   |
 | 
			
		||||
  | ctime     | TimeSpec | Last status change time                                                                |               | No       |                   |
 | 
			
		||||
  | kind      | string   | File type, see [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |               | No       |                   |
 | 
			
		||||
  | perm      | int      | File permissions in decimal                                                            |               | No       | 72 (110 in octal) |
 | 
			
		||||
  | nlink     | int      | Number of hard links                                                                   |               | No       |                   |
 | 
			
		||||
  | uid       | int      | User ID of the owner                                                                   |               | No       |                   |
 | 
			
		||||
  | gid       | int      | Group ID of the owner                                                                  |               | No       |                   |
 | 
			
		||||
  | rdev      | int      | Device ID                                                                              |               | No       |                   |
 | 
			
		||||
  | Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | ino | int | ino number |  | No |  |
 | 
			
		||||
  | size | int | File size |  | No |  |
 | 
			
		||||
  | blocks | int | Number of blocks that the file uses |  | No |  |
 | 
			
		||||
  | atime | TimeSpec | Last access time |  | No |  |
 | 
			
		||||
  | mtime | TimeSpec | Last modified time |  | No |  |
 | 
			
		||||
  | ctime | TimeSpec | Last status change time |  | No |  |
 | 
			
		||||
  | kind | string | File type, see [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |  | No |  |
 | 
			
		||||
  | perm | int | File permissions in decimal |  | No | 72 (110 in octal) |
 | 
			
		||||
  | nlink | int | Number of hard links |  | No |  |
 | 
			
		||||
  | uid | int | User ID of the owner |  | No |  |
 | 
			
		||||
  | gid | int | Group ID of the owner |  | No |  |
 | 
			
		||||
  | rdev | int | Device ID |  | No |  |
 | 
			
		||||
 | 
			
		||||
  TimeSpec is defined as follows:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -245,11 +245,11 @@ The following are specific information about fields corresponding to action:
 | 
			
		|||
 | 
			
		||||
  MistakeSpec is defined as follows:
 | 
			
		||||
 | 
			
		||||
  | Parameter      | Type   | Description                                                                                  | Default value | Required | Example |
 | 
			
		||||
  | -------------- | ------ | -------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
  | filling        | string | The wrong data to be filled. Only zero (fill 0) or random (fill random bytes) are supported. |               | Yes      |         |
 | 
			
		||||
  | maxOccurrences | int    | Maximum number of errors in each operation.                                                  |               | Yes      | 1       |
 | 
			
		||||
  | maxLength      | int    | Maximum length of each error (in bytes).                                                     |               | Yes      | 1       |
 | 
			
		||||
  | Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | filling | string | The wrong data to be filled. Only zero (fill 0) or random (fill random bytes) are supported. |  | Yes |  |
 | 
			
		||||
  | maxOccurrences | int | Maximum number of errors in each operation. |  | Yes | 1 |
 | 
			
		||||
  | maxLength | int | Maximum length of each error (in bytes). |  | Yes | 1 |
 | 
			
		||||
 | 
			
		||||
::warning It is suggested that you only use mistake on READ and WRITE file system calls. Using mistake on other file system calls may lead to unexpected consequences, including but not limited to file system damage and program crashes. :::
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -157,14 +157,14 @@ hello chaos mesh!
 | 
			
		|||
 | 
			
		||||
## Field description
 | 
			
		||||
 | 
			
		||||
| Parameter | Type              | Description                                                                                                                                                                                         | Default value | Required | Example |
 | 
			
		||||
| --------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| action    | string            | Indicates the specific fault type. The available fault types include return, script, cfl, oom, ccf, tce, tcf, cpf, tde, and tpf.                                                                    | None          | Yes      | return  |
 | 
			
		||||
| mode      | string            | Indicates how to select Pod. The supported modes include one, all, fixed, fixed-percent, and random-max-percent.                                                                                    | None          | Yes      | 1       |
 | 
			
		||||
| value     | string            | Provides parameters for the `mode` configuration, depending on `mode`.                                                                                                                              | None          | No       | 2       |
 | 
			
		||||
| target    | string            | Indicates the parameter passed to `chaosblade-exec-jvm`, representing JVMChaos targets, supporting servlet, psql, jvm, jedis, http, dubbo, rocketmq, tars, mysql, ruid, redisson, rabbitmq, monodb. | None          | Yes      | jvm     |
 | 
			
		||||
| flags     | map[string]string | Indicates parameters passed to `chaosblade-exec-jvm` and represents the flags of action.                                                                                                            | None          | No       |         |
 | 
			
		||||
| matchers  | map[string]string | Indicates parameters passed to `chaosblade-execu-jvm` and represents the matching of injection points.                                                                                              | None          | No       |         |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific fault type. The available fault types include return, script, cfl, oom, ccf, tce, tcf, cpf, tde, and tpf. | None | Yes | return |
 | 
			
		||||
| mode | string | Indicates how to select Pod. The supported modes include one, all, fixed, fixed-percent, and random-max-percent. | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. | None | No | 1 |
 | 
			
		||||
| target | string | Indicates the parameter passed to `chaosblade-exec-jvm`, representing JVMChaos targets, supporting servlet, psql, jvm, jedis, http, dubbo, rocketmq, tars, mysql, ruid, redisson, rabbitmq, monodb. | None | Yes | jvm |
 | 
			
		||||
| flags | map[string]string | Indicates parameters passed to `chaosblade-exec-jvm` and represents the flags of action. | None | No |  |
 | 
			
		||||
| matchers | map[string]string | Indicates parameters passed to `chaosblade-execu-jvm` and represents the matching of injection points. | None | No |  |
 | 
			
		||||
 | 
			
		||||
For the meaning of the value of action, refer to:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -138,15 +138,15 @@ Before creating NetworkChaos experiments, ensure the following:
 | 
			
		|||
 | 
			
		||||
## Field description
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                        | Default value | Required | Example   |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | --------- |
 | 
			
		||||
| action         | string   | Indicates the specific fault type. Available types include: `netem`, `delay` (network delay), `loss` (packet loss), `duplicate` (packet duplicating), `corrupt` (packet corrupt), `partition` (network partition), and `bandwidth` (network bandwidth limit).After you specify `action` field, refer to [Description for `action`-related fields](#description-for-action-related-fields) for other necessary field configuration. | None          | Yes      | Partition |
 | 
			
		||||
| target         | Selector | Used in combination with direction, making Chaos only effective for some packets.                                                                                                                                                                                                                                                                                                                                                  | None          | No       |           |
 | 
			
		||||
| direction      | enum     | Indicates the direction of `target` packets. Available vaules include `from` (the packets from `target`), `to` (the packets to `target`), and `both` ( the packets from or to `target`). This parameter makes Chaos only take effect for a specific direction of packets.                                                                                                                                                          | to            | No       | both      |
 | 
			
		||||
| mode           | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods).                                                        | None          | Yes      | `1`       |
 | 
			
		||||
| value          | string   | Provides a parameter for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                                                                              | None          | No       | 2         |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                                                                                              | None          | No       | ["nginx"] |
 | 
			
		||||
| selector       | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                                                                                 | None          | Yes      |           |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific fault type. Available types include: `netem`, `delay` (network delay), `loss` (packet loss), `duplicate` (packet duplicating), `corrupt` (packet corrupt), `partition` (network partition), and `bandwidth` (network bandwidth limit).After you specify `action` field, refer to [Description for `action`-related fields](#description-for-action-related-fields) for other necessary field configuration. | None | Yes | Partition |
 | 
			
		||||
| target | Selector | Used in combination with direction, making Chaos only effective for some packets. | None | No |  |
 | 
			
		||||
| direction | enum | Indicates the direction of `target` packets. Available vaules include `from` (the packets from `target`), `to` (the packets to `target`), and `both` ( the packets from or to `target`). This parameter makes Chaos only take effect for a specific direction of packets. | to | No | both |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides a parameter for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected. | None | No | ["nginx"] |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
 | 
			
		||||
### Description for `action`-related fields
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -159,12 +159,12 @@ For the Net Emulation and Bandwidth fault types, you can further configure the `
 | 
			
		|||
 | 
			
		||||
Setting `action` to `delay` means simulating network delay fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type              | Description                                                                 | Required | Required | Example |
 | 
			
		||||
| ----------- | ----------------- | --------------------------------------------------------------------------- | -------- | -------- | ------- |
 | 
			
		||||
| latency     | string            | Indicates the network latency                                               | No       | No       | 2ms     |
 | 
			
		||||
| correlation | string            | Indicates the correlation between the current latency and the previous one. | No       | No       | 0.5     |
 | 
			
		||||
| jitter      | string            | Indicates the range of the network latency                                  | No       | No       | 1ms     |
 | 
			
		||||
| reorder     | Reorder(#Reorder) | Indicates the status of network packet reordering                           |          | No       |         |
 | 
			
		||||
| Parameter | Type | Description | Required | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| latency | string | Indicates the network latency | No | No | 2ms |
 | 
			
		||||
| correlation | string | Indicates the correlation between the current latency and the previous one. | No | No | 0.5 |
 | 
			
		||||
| jitter | string | Indicates the range of the network latency | No | No | 1ms |
 | 
			
		||||
| reorder | Reorder(#Reorder) | Indicates the status of network packet reordering |  | No |  |
 | 
			
		||||
 | 
			
		||||
The computational model for `correlation` is as follows:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -188,38 +188,38 @@ The computational model for `correlation` is as follows:
 | 
			
		|||
 | 
			
		||||
Setting `action` to `reorder` means simulating network packet reordering fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                     | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| reorder     | string | Indicates the probability to reorder                                                                            | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between this time's length of delay time and the previous time's length of delay time | 0             | No       | 0.5     |
 | 
			
		||||
| gap         | int    | Indicates the gap before and after packet reordering                                                            | 0             | No       | 5       |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| reorder | string | Indicates the probability to reorder | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between this time's length of delay time and the previous time's length of delay time | 0 | No | 0.5 |
 | 
			
		||||
| gap | int | Indicates the gap before and after packet reordering | 0 | No | 5 |
 | 
			
		||||
 | 
			
		||||
#### loss
 | 
			
		||||
 | 
			
		||||
Setting `action` to `loss` means simulating packet loss fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                  | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------ | ------------- | -------- | ------- |
 | 
			
		||||
| loss        | string | Indicates the probability of packet loss                                                                     | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet loss and the previous time's packet loss | 0             | No       | 0.5     |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| loss | string | Indicates the probability of packet loss | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet loss and the previous time's packet loss | 0 | No | 0.5 |
 | 
			
		||||
 | 
			
		||||
#### duplicate
 | 
			
		||||
 | 
			
		||||
Set `action` to `duplicate`, meaning simulating package duplication. At this point, you can also set the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                                | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| duplicate   | string | Indicates the probability of packet duplicating                                                                            | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet duplicating and the previous time's packet duplicating | 0             | No       | 0.5     |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| duplicate | string | Indicates the probability of packet duplicating | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet duplicating and the previous time's packet duplicating | 0 | No | 0.5 |
 | 
			
		||||
 | 
			
		||||
#### corrupt
 | 
			
		||||
 | 
			
		||||
Setting `action` to `corrupt` means simulating package corruption fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                              | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------ | ------------- | -------- | ------- |
 | 
			
		||||
| corrupt     | string | Indicates the probability of packet corruption                                                                           | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet corruption and the previous time's packet corruption | 0             | No       | 0.5     |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| corrupt | string | Indicates the probability of packet corruption | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet corruption and the previous time's packet corruption | 0 | No | 0.5 |
 | 
			
		||||
 | 
			
		||||
For occasional events such as `reorder`, `loss`, `duplicate`, and `corrupt`, the `correlation` is more complicated. For specific model description, refer to [NetemCLG](http://web.archive.org/web/20200120162102/http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG).
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -227,12 +227,12 @@ For occasional events such as `reorder`, `loss`, `duplicate`, and `corrupt`, the
 | 
			
		|||
 | 
			
		||||
Setting `action` to `bandwidth` means simulating bandwidth limit fault. You also need to configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter | Type   | Description                                                            | Default value | Required | Example |
 | 
			
		||||
| --------- | ------ | ---------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| rate      | string | Indicates the rate of bandwidth limit                                  |               | Yes      | 1mbps   |
 | 
			
		||||
| limit     | string | Indicates the number of bytes waiting in queue                         |               | Yes      | 1       |
 | 
			
		||||
| buffer    | uint32 | Indicates the maximum number of bytes that can be sent instantaneously |               | Yes      | 1       |
 | 
			
		||||
| peakrate  | uint64 | Indicates the maximum consumption of `bucket` (usually not set)        |               | No       | 1       |
 | 
			
		||||
| minburst  | uint32 | Indicates the size of `peakrate bucket` (usually not set)              |               | No       | 1       |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| rate | string | Indicates the rate of bandwidth limit |  | Yes | 1mbps |
 | 
			
		||||
| limit | string | Indicates the number of bytes waiting in queue |  | Yes | 1 |
 | 
			
		||||
| buffer | uint32 | Indicates the maximum number of bytes that can be sent instantaneously |  | Yes | 1 |
 | 
			
		||||
| peakrate | uint64 | Indicates the maximum consumption of `bucket` (usually not set) |  | No | 1 |
 | 
			
		||||
| minburst | uint32 | Indicates the size of `peakrate bucket` (usually not set) |  | No | 1 |
 | 
			
		||||
 | 
			
		||||
For more details of these fields, you can refer to [tc-tbf document](https://man7.org/linux/man-pages/man8/tc-tbf.8.html).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -132,12 +132,12 @@ Before create experiments using Chaos Dashboard, ensure the following:
 | 
			
		|||
 | 
			
		||||
The following table describes the fields in the YAML configuration file.
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example        |
 | 
			
		||||
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | -------------- |
 | 
			
		||||
| action         | string   | Specifies the fault type to inject. The supported types include `pod-failure`, `pod-kill`, and `container-kill`.                                                                                                                                                                                                                                                            | None          | Yes      | `pod-kill`     |
 | 
			
		||||
| mode           | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`            |
 | 
			
		||||
| value          | string   | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                         | None          | No       | 2              |
 | 
			
		||||
| selector       | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                          | None          | Yes      |                |
 | 
			
		||||
| containerNames | []string | When you configure `action` to `container-killed`, this configuration is mandatory to specify the target container name for injecting faults.                                                                                                                                                                                                                               | None          | No       | ['prometheus'] |
 | 
			
		||||
| gracePeriod    | int64    | When you configure `action` to `pod-kill`, this configuration is mandatory to specify the duration before deleting Pod.                                                                                                                                                                                                                                                     | 0             | No       | 0              |
 | 
			
		||||
| duration       | string   | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | 30s            |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Specifies the fault type to inject. The supported types include `pod-failure`, `pod-kill`, and `container-kill`. | None | Yes | `pod-kill` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
| containerNames | []string | When you configure `action` to `container-killed`, this configuration is mandatory to specify the target container name for injecting faults. | None | No | ['prometheus'] |
 | 
			
		||||
| gracePeriod | int64 | When you configure `action` to `pod-kill`, this configuration is mandatory to specify the duration before deleting Pod. | 0 | No | 0 |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. | None | Yes | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,11 +52,11 @@ You can create experiments in Chaos Dashboard or using the YAML configuration fi
 | 
			
		|||
 | 
			
		||||
The fields in the YAML configuration file are described in the following table:
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type     | Note                                                                                                                                                                                                                                                                                                                                                                        | Default value        | Required | Example                                 |
 | 
			
		||||
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------- | --------------------------------------- |
 | 
			
		||||
| timeOffset     | string   | Specifies the length of time offset.                                                                                                                                                                                                                                                                                                                                        | None                 | Yes      | `-5m`                                   |
 | 
			
		||||
| clockIds       | []string | Specifies the ID of clock that will be offset. See the [<clock>clock_gettime</clock> documentation](https://man7.org/linux/man-pages/man2/clock_gettime.2.html) for details.                                                                                                                                                                                                | `["CLOCK_REALTIME"]` | No       | `["CLOCK_REALTIME", "CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode           | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None                 | Yes      | `1`                                     |
 | 
			
		||||
| value          | string   | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                         | None                 | No       | 2                                       |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                                       | None                 | No       | `["nginx"]`                             |
 | 
			
		||||
| selector       | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                          | None                 | Yes      |                                         |
 | 
			
		||||
| Parameter | Type | Note | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| timeOffset | string | Specifies the length of time offset. | None | Yes | `-5m` |
 | 
			
		||||
| clockIds | []string | Specifies the ID of clock that will be offset. See the [<clock>clock_gettime</clock> documentation](https://man7.org/linux/man-pages/man2/clock_gettime.2.html) for details. | `["CLOCK_REALTIME"]` | No | `["CLOCK_REALTIME", "CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected. | None | No | `["nginx"]` |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,14 +153,14 @@ stringData:
 | 
			
		|||
 | 
			
		||||
下表介绍以上 YAML 配置文件中的字段。
 | 
			
		||||
 | 
			
		||||
| 参数        | 类型   | 说明                                                                                                                                                                                                                                                                                                       | 默认值   | 是否必填 | 示例                 |
 | 
			
		||||
| ----------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------------------- |
 | 
			
		||||
| action      | string | 表示具体的故障类型,仅支持 ec2-stop、ec2-restart、detach-volume                                                                                                                                                                                                                                            | ec2-stop | 是       | ec2-stop             |
 | 
			
		||||
| mode        | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无       | 是       | `one`                |
 | 
			
		||||
| value       | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。                                                                                                                                                                             | 无       | 否       | 2                    |
 | 
			
		||||
| secretName  | string | 指定存储 AWS 认证信息的 Kubernetes Secret 名字                                                                                                                                                                                                                                                             | 无       | 否       | cloud-key-secret     |
 | 
			
		||||
| awsRegion   | string | 指定 AWS 区域                                                                                                                                                                                                                                                                                              | 无       | 是       | us-east-2            |
 | 
			
		||||
| ec2Instance | string | 指定 EC2 实例的 ID                                                                                                                                                                                                                                                                                         | 无       | 是       | your-ec2-instance-id |
 | 
			
		||||
| volumeID    | string | 当 action 为 detach-volume 必填,指定 EBS 卷的 ID                                                                                                                                                                                                                                                          | 无       | 否       | your-volume-id       |
 | 
			
		||||
| deviceName  | string | 当 action 为 detach-volume 必填,指定设备名                                                                                                                                                                                                                                                                | 无       | 否       | /dev/sdf             |
 | 
			
		||||
| duration    | string | 指定实验的持续时间                                                                                                                                                                                                                                                                                         | 无       | 是       | 30s                  |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型,仅支持 ec2-stop、ec2-restart、detach-volume | ec2-stop | 是 | ec2-stop |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。 | 无 | 否 | 1 |
 | 
			
		||||
| secretName | string | 指定存储 AWS 认证信息的 Kubernetes Secret 名字 | 无 | 否 | cloud-key-secret |
 | 
			
		||||
| awsRegion | string | 指定 AWS 区域 | 无 | 是 | us-east-2 |
 | 
			
		||||
| ec2Instance | string | 指定 EC2 实例的 ID | 无 | 是 | your-ec2-instance-id |
 | 
			
		||||
| volumeID | string | 当 action 为 detach-volume 必填,指定 EBS 卷的 ID | 无 | 否 | your-volume-id |
 | 
			
		||||
| deviceName | string | 当 action 为 detach-volume 必填,指定设备名 | 无 | 否 | /dev/sdf |
 | 
			
		||||
| duration | string | 指定实验的持续时间 | 无 | 是 | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,13 +84,13 @@ kubectl get pods -n chaos-testing -l app.kubernetes.io/component=chaos-dns-serve
 | 
			
		|||
 | 
			
		||||
### 配置说明
 | 
			
		||||
 | 
			
		||||
| 参数     | 类型        | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例                                         |
 | 
			
		||||
| :------- | :---------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----- | :------- | :------------------------------------------- |
 | 
			
		||||
| action   | string      | 定义 DNS 故障的行为,值可以为 `random` 或 `error`。当值为 `random` 时, DNS 服务返回随机的 IP 地址;当值为 `error` 时 DNS 服务返回错误                                                                                                                                                                     | 无     | 是       | `random` 或 `error`                          |
 | 
			
		||||
| patterns | string 数组 | 选择匹配故障行为的域名模版, 支持占位符 `?` 以及通配符 `*`                                                                                                                                                                                                                                                 | []     | 否       | `google.com`,`chaos-mesh.org`,`github.com` |
 | 
			
		||||
| mode     | string      | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`                                        |
 | 
			
		||||
| value    | string      | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无     | 否       | 2                                            |
 | 
			
		||||
| selector | struct      | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |                                              |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| :-- | :-- | :-- | :-- | :-- | :-- |
 | 
			
		||||
| action | string | 定义 DNS 故障的行为,值可以为 `random` 或 `error`。当值为 `random` 时, DNS 服务返回随机的 IP 地址;当值为 `error` 时 DNS 服务返回错误 | 无 | 是 | `random` 或 `error` |
 | 
			
		||||
| patterns | string 数组 | 选择匹配故障行为的域名模版, 支持占位符 `?` 以及通配符 `*` | [] | 否 | `google.com`,`chaos-mesh.org`,`github.com` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
 | 
			
		||||
:::note 注意
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,14 +160,14 @@ stringData:
 | 
			
		|||
 | 
			
		||||
下表介绍以上 YAML 配置文件中的字段。
 | 
			
		||||
 | 
			
		||||
| 参数        | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值    | 是否必填 | 示例                 |
 | 
			
		||||
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | -------------------- |
 | 
			
		||||
| action      | string   | 指定故障类型,可选择的类型包括:node-stop、node-reset、disk-loss                                                                                                                                                                                                                                           | node-stop | 是       | node-stop            |
 | 
			
		||||
| mode        | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无        | 是       | `one`                |
 | 
			
		||||
| value       | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。                                                                                                                                                                             | 无        | 否       | 2                    |
 | 
			
		||||
| secretName  | string   | 指定存储 GCP 认证信息的 Kubernetes Secret 名字                                                                                                                                                                                                                                                             | 无        | 否       | cloud-key-secret     |
 | 
			
		||||
| project     | string   | 指定 GCP 项目名                                                                                                                                                                                                                                                                                            | 无        | 是       | your-project         |
 | 
			
		||||
| zone        | string   | 指定 GCP 实例区域                                                                                                                                                                                                                                                                                          | 无        | 是       | us-central1-a        |
 | 
			
		||||
| instance    | string   | 指定 GCP 实例的 ID                                                                                                                                                                                                                                                                                         | 无        | 是       | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | 当 action 为 disk-loss 必填,指定设备磁盘 ID                                                                                                                                                                                                                                                               | 无        | 否       | ["your-disk-id"]     |
 | 
			
		||||
| duration    | string   | 指定实验的持续时间                                                                                                                                                                                                                                                                                         | 无        | 是       | 30s                  |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 指定故障类型,可选择的类型包括:node-stop、node-reset、disk-loss | node-stop | 是 | node-stop |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。 | 无 | 否 | 1 |
 | 
			
		||||
| secretName | string | 指定存储 GCP 认证信息的 Kubernetes Secret 名字 | 无 | 否 | cloud-key-secret |
 | 
			
		||||
| project | string | 指定 GCP 项目名 | 无 | 是 | your-project |
 | 
			
		||||
| zone | string | 指定 GCP 实例区域 | 无 | 是 | us-central1-a |
 | 
			
		||||
| instance | string | 指定 GCP 实例的 ID | 无 | 是 | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | 当 action 为 disk-loss 必填,指定设备磁盘 ID | 无 | 否 | ["your-disk-id"] |
 | 
			
		||||
| duration | string | 指定实验的持续时间 | 无 | 是 | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,15 +57,15 @@ Chaos Mesh 提供的 StressChaos 实验类型可用于模拟容器内压力的
 | 
			
		|||
 | 
			
		||||
以上 YAML 配置文件中的字段说明如下:
 | 
			
		||||
 | 
			
		||||
| 参数              | 类型                    | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例        |
 | 
			
		||||
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ----------- |
 | 
			
		||||
| duration          | string                  | 指定具体实验的持续时间                                                                                                                                                                                                                                                                                     | 无     | 是       | `30s`       |
 | 
			
		||||
| stressors         | [Stressors](#stressors) | 指定 CPU 或内存压力的参数                                                                                                                                                                                                                                                                                  | 无     | 否       |             |
 | 
			
		||||
| stressngStressors | string                  | 指定 stress-ng 的参数来达到更丰富的压力注入                                                                                                                                                                                                                                                                | 无     | 否       | `--clone 2` |
 | 
			
		||||
| mode              | string                  | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`       |
 | 
			
		||||
| value             | string                  | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无     | 否       | `2`         |
 | 
			
		||||
| containerNames    | []string                | 指定注入的容器名称                                                                                                                                                                                                                                                                                         | 无     | 否       | `["nginx"]` |
 | 
			
		||||
| selector          | struct                  | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |             |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| duration | string | 指定具体实验的持续时间 | 无 | 是 | `30s` |
 | 
			
		||||
| stressors | [Stressors](#stressors) | 指定 CPU 或内存压力的参数 | 无 | 否 |  |
 | 
			
		||||
| stressngStressors | string | 指定 stress-ng 的参数来达到更丰富的压力注入 | 无 | 否 | `--clone 2` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称 | 无 | 否 | `["nginx"]` |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
 | 
			
		||||
#### Stressors
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,24 +110,24 @@ Chaos Mesh 目前仅支持使用 YAML 配置文件创建 HTTPChaos 实验。在
 | 
			
		|||
 | 
			
		||||
通用字段指故障注入的目标过程为 Request 或 Response 时均有意义的字段。
 | 
			
		||||
 | 
			
		||||
| 参数             | 类型              | 说明                                                                                                                                                                                                                                                                                                       | 默认值             | 是否必填 | 示例                           |
 | 
			
		||||
| ---------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------- | ------------------------------ |
 | 
			
		||||
| mode             | string            | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) |                    | 是       | one                            |
 | 
			
		||||
| value            | string            | 取决于 `mode` 的取值,为 `mode` 提供参数                                                                                                                                                                                                                                                                   |                    | 否       | 2                              |
 | 
			
		||||
| target           | string            | 指定故障注入的目标过程为 `Request` 或 `Response`,需要同时配置[与 `target` 相关的字段](#与-target-相关的字段说明)                                                                                                                                                                                          |                    | 是       | Request                        |
 | 
			
		||||
| port             | int32             | 目标服务监听的 TCP 端口                                                                                                                                                                                                                                                                                    |                    | 是       | 80                             |
 | 
			
		||||
| method           | string            | 目标请求的 HTTP method                                                                                                                                                                                                                                                                                     | 默认对所有方法生效 | 否       | GET                            |
 | 
			
		||||
| path             | string            | 目标请求的 URI 路径,支持[通配符](https://www.wikiwand.com/en/Matching_wildcards)                                                                                                                                                                                                                          | 默认对所有路径生效 | 否       | /api/\*                        |
 | 
			
		||||
| request_headers  | map[string]string | 目标请求的请求头匹配                                                                                                                                                                                                                                                                                       | 默认对所有请求生效 | 否       | Content-Type: application/json |
 | 
			
		||||
| abort            | bool              | 是否注入连接中断故障                                                                                                                                                                                                                                                                                       | false              | 否       | true                           |
 | 
			
		||||
| delay            | string            | 指定延迟故障的时间                                                                                                                                                                                                                                                                                         | 0                  | 否       | 10s                            |
 | 
			
		||||
| replace.header   | map[string]string | 指定请求头或响应头替换故障中用于替换的键值对                                                                                                                                                                                                                                                               |                    | 否       | Content-Type: application/xml  |
 | 
			
		||||
| replace.body     | []byte            | 指定请求体或响应体替换故障的内容(base64 编码)                                                                                                                                                                                                                                                            |                    | 否       | eyJmb28iOiAiYmFyIn0K           |
 | 
			
		||||
| patch.header     | [][]string        | 指定请求头或响应头附加故障中附加的键值对                                                                                                                                                                                                                                                                   |                    | 否       | - [Set-Cookie, one cookie]     |
 | 
			
		||||
| patch.body.type  | string            | 指定请求体或响应体附加故障的类型,目前只支持 [`JSON`](https://tools.ietf.org/html/rfc7396)                                                                                                                                                                                                                 |                    | 否       | JSON                           |
 | 
			
		||||
| patch.body.value | string            | 指定请求体或响应体附加故障的故障内容                                                                                                                                                                                                                                                                       |                    | 否       | "{"foo": "bar"}"               |
 | 
			
		||||
| duration         | string            | 指定具体实验的持续时间                                                                                                                                                                                                                                                                                     |                    | 是       | 30s                            |
 | 
			
		||||
| scheduler        | string            | 指定具体实验的运行时间调度规则                                                                                                                                                                                                                                                                             |                    | 否       | 5 \* \* \* \*                  |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 `mode` 的取值,为 `mode` 提供参数 | 无 | 否 | 1 |
 | 
			
		||||
| target | string | 指定故障注入的目标过程为 `Request` 或 `Response`,需要同时配置[与 `target` 相关的字段](#与-target-相关的字段说明) |  | 是 | Request |
 | 
			
		||||
| port | int32 | 目标服务监听的 TCP 端口 |  | 是 | 80 |
 | 
			
		||||
| method | string | 目标请求的 HTTP method | 默认对所有方法生效 | 否 | GET |
 | 
			
		||||
| path | string | 目标请求的 URI 路径,支持[通配符](https://www.wikiwand.com/en/Matching_wildcards) | 默认对所有路径生效 | 否 | /api/\* |
 | 
			
		||||
| request_headers | map[string]string | 目标请求的请求头匹配 | 默认对所有请求生效 | 否 | Content-Type: application/json |
 | 
			
		||||
| abort | bool | 是否注入连接中断故障 | false | 否 | true |
 | 
			
		||||
| delay | string | 指定延迟故障的时间 | 0 | 否 | 10s |
 | 
			
		||||
| replace.header | map[string]string | 指定请求头或响应头替换故障中用于替换的键值对 |  | 否 | Content-Type: application/xml |
 | 
			
		||||
| replace.body | []byte | 指定请求体或响应体替换故障的内容(base64 编码) |  | 否 | eyJmb28iOiAiYmFyIn0K |
 | 
			
		||||
| patch.header | [][]string | 指定请求头或响应头附加故障中附加的键值对 |  | 否 | - [Set-Cookie, one cookie] |
 | 
			
		||||
| patch.body.type | string | 指定请求体或响应体附加故障的类型,目前只支持 [`JSON`](https://tools.ietf.org/html/rfc7396) |  | 否 | JSON |
 | 
			
		||||
| patch.body.value | string | 指定请求体或响应体附加故障的故障内容 |  | 否 | "{"foo": "bar"}" |
 | 
			
		||||
| duration | string | 指定具体实验的持续时间 |  | 是 | 30s |
 | 
			
		||||
| scheduler | string | 指定具体实验的运行时间调度规则 |  | 否 | 5 \* \* \* \* |
 | 
			
		||||
 | 
			
		||||
### 与 `target` 相关的字段说明
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -146,11 +146,11 @@ Request 专用字段是指故障注入的目标过程为 Request (即 `target`
 | 
			
		|||
 | 
			
		||||
Response 专用字段是指故障注入的目标过程为 Response (即 `target` 设置为 `Response`) 时有意义的字段。
 | 
			
		||||
 | 
			
		||||
| 参数             | 类型              | 说明                     | 默认值               | 是否必填 | 示例                           |
 | 
			
		||||
| ---------------- | ----------------- | ------------------------ | -------------------- | -------- | ------------------------------ |
 | 
			
		||||
| code             | int32             | 目标响应的状态码         | 默认对所有状态码生效 | 否       | 200                            |
 | 
			
		||||
| response_headers | map[string]string | 目标响应的响应头匹配     | 默认对所有响应生效   | 否       | Content-Type: application/json |
 | 
			
		||||
| replace.code     | int32             | 指定响应状态码的替换内容 |                      | 否       | 404                            |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| code | int32 | 目标响应的状态码 | 默认对所有状态码生效 | 否 | 200 |
 | 
			
		||||
| response_headers | map[string]string | 目标响应的响应头匹配 | 默认对所有响应生效 | 否 | Content-Type: application/json |
 | 
			
		||||
| replace.code | int32 | 指定响应状态码的替换内容 |  | 否 | 404 |
 | 
			
		||||
 | 
			
		||||
## 本地调试
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -178,18 +178,18 @@ IOChaos 是 Chaos Mesh 中的一种故障类型。通过创建 IOChaos 类型的
 | 
			
		|||
 | 
			
		||||
#### 通用字段
 | 
			
		||||
 | 
			
		||||
| 参数          | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值             | 是否必填 | 示例                |
 | 
			
		||||
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------- | ------------------- |
 | 
			
		||||
| action        | string   | 表示具体的故障类型,仅支持 latency、fault、attrOverride、mistake                                                                                                                                                                                                                                           |                    | 是       | latency             |
 | 
			
		||||
| mode          | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无                 | 是       | one                 |
 | 
			
		||||
| selector      | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无                 | 是       |                     |
 | 
			
		||||
| value         | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               |                    | 否       | 2                   |
 | 
			
		||||
| volumePath    | string   | volume 在目标容器内的挂载点,必须为挂载的根目录                                                                                                                                                                                                                                                            |                    | 是       | /var/run/etcd       |
 | 
			
		||||
| path          | string   | 注入错误的生效范围,可以是通配符,也可以是单个文件                                                                                                                                                                                                                                                         | 默认对所有文件生效 | 否       | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods       | string[] | 需要注入故障的文件系统调用类型,具体支持的类型见[附录 A](#附录-a:methods-类型)                                                                                                                                                                                                                            | 所有类型           | 否       | READ                |
 | 
			
		||||
| percent       | int      | 每次操作发生故障的概率,单位为%                                                                                                                                                                                                                                                                            | 100                | 否       | 100                 |
 | 
			
		||||
| containerName | string   | 指定注入的容器名                                                                                                                                                                                                                                                                                           |                    | 否       |                     |
 | 
			
		||||
| duration      | string   | 指定具体实验的持续时间                                                                                                                                                                                                                                                                                     |                    | 是       | 30s                 |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型,仅支持 latency、fault、attrOverride、mistake |  | 是 | latency |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| volumePath | string | volume 在目标容器内的挂载点,必须为挂载的根目录 |  | 是 | /var/run/etcd |
 | 
			
		||||
| path | string | 注入错误的生效范围,可以是通配符,也可以是单个文件 | 默认对所有文件生效 | 否 | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods | string[] | 需要注入故障的文件系统调用类型,具体支持的类型见[附录 A](#附录-a:methods-类型) | 所有类型 | 否 | READ |
 | 
			
		||||
| percent | int | 每次操作发生故障的概率,单位为% | 100 | 否 | 100 |
 | 
			
		||||
| containerName | string | 指定注入的容器名 |  | 否 |  |
 | 
			
		||||
| duration | string | 指定具体实验的持续时间 |  | 是 | 30s |
 | 
			
		||||
 | 
			
		||||
#### 与 action 相关的字段
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -217,20 +217,20 @@ IOChaos 是 Chaos Mesh 中的一种故障类型。通过创建 IOChaos 类型的
 | 
			
		|||
 | 
			
		||||
  AttrOverrideSpec 定义如下
 | 
			
		||||
 | 
			
		||||
  | 参数   | 类型     | 说明                                                                                   | 默认值 | 是否必填 | 示例                 |
 | 
			
		||||
  | ------ | -------- | -------------------------------------------------------------------------------------- | ------ | -------- | -------------------- |
 | 
			
		||||
  | ino    | int      | ino 的号                                                                               |        | 否       |                      |
 | 
			
		||||
  | size   | int      | 文件大小                                                                               |        | 否       |                      |
 | 
			
		||||
  | blocks | int      | 文件占用块数                                                                           |        | 否       |                      |
 | 
			
		||||
  | atime  | TimeSpec | 最后访问时间                                                                           |        | 否       |                      |
 | 
			
		||||
  | mtime  | TimeSpec | 最后修改时间                                                                           |        | 否       |                      |
 | 
			
		||||
  | ctime  | TimeSpec | 最后状态变更时间                                                                       |        | 否       |                      |
 | 
			
		||||
  | kind   | string   | 文件类型,详见 [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |        | 否       |                      |
 | 
			
		||||
  | perm   | int      | 文件权限的十进制表示                                                                   |        | 否       | 72(八进制下为 110) |
 | 
			
		||||
  | nlink  | int      | 硬链接数量                                                                             |        | 否       |                      |
 | 
			
		||||
  | uid    | int      | 所有者的用户 ID                                                                        |        | 否       |                      |
 | 
			
		||||
  | gid    | int      | 所有者的组 ID                                                                          |        | 否       |                      |
 | 
			
		||||
  | rdev   | int      | 设备 ID                                                                                |        | 否       |                      |
 | 
			
		||||
  | 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | ino | int | ino 的号 |  | 否 |  |
 | 
			
		||||
  | size | int | 文件大小 |  | 否 |  |
 | 
			
		||||
  | blocks | int | 文件占用块数 |  | 否 |  |
 | 
			
		||||
  | atime | TimeSpec | 最后访问时间 |  | 否 |  |
 | 
			
		||||
  | mtime | TimeSpec | 最后修改时间 |  | 否 |  |
 | 
			
		||||
  | ctime | TimeSpec | 最后状态变更时间 |  | 否 |  |
 | 
			
		||||
  | kind | string | 文件类型,详见 [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |  | 否 |  |
 | 
			
		||||
  | perm | int | 文件权限的十进制表示 |  | 否 | 72(八进制下为 110) |
 | 
			
		||||
  | nlink | int | 硬链接数量 |  | 否 |  |
 | 
			
		||||
  | uid | int | 所有者的用户 ID |  | 否 |  |
 | 
			
		||||
  | gid | int | 所有者的组 ID |  | 否 |  |
 | 
			
		||||
  | rdev | int | 设备 ID |  | 否 |  |
 | 
			
		||||
 | 
			
		||||
  TimeSpec 定义如下
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -249,15 +249,13 @@ IOChaos 是 Chaos Mesh 中的一种故障类型。通过创建 IOChaos 类型的
 | 
			
		|||
 | 
			
		||||
  MistakeSpec 定义如下
 | 
			
		||||
 | 
			
		||||
  | 参数           | 类型   | 说明                                                               | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
  | -------------- | ------ | ------------------------------------------------------------------ | ------ | -------- | ---- |
 | 
			
		||||
  | filling        | string | 错误数据的填充内容,只能为 zero(填充 0)或 random(填充随机字节) |        | 是       |      |
 | 
			
		||||
  | maxOccurrences | int    | 错误在每一次操作中最多出现次数                                     |        | 是       | 1    |
 | 
			
		||||
  | maxLength      | int    | 每次错误的最大长度(单位为字节)                                   |        | 是       | 1    |
 | 
			
		||||
  | 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | filling | string | 错误数据的填充内容,只能为 zero(填充 0)或 random(填充随机字节) |  | 是 |  |
 | 
			
		||||
  | maxOccurrences | int | 错误在每一次操作中最多出现次数 |  | 是 | 1 |
 | 
			
		||||
  | maxLength | int | 每次错误的最大长度(单位为字节) |  | 是 | 1 |
 | 
			
		||||
 | 
			
		||||
:::warning 警告
 | 
			
		||||
不推荐在除了 READ 和 WRITE 之外的文件系统调用上使用 mistake 错误。这可能会导致预期之外的结果,包括但不限于文件系统损坏、程序崩溃等。
 | 
			
		||||
:::
 | 
			
		||||
:::warning 警告不推荐在除了 READ 和 WRITE 之外的文件系统调用上使用 mistake 错误。这可能会导致预期之外的结果,包括但不限于文件系统损坏、程序崩溃等。 :::
 | 
			
		||||
 | 
			
		||||
## 本地调试
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -157,14 +157,14 @@ hello chaos mesh!
 | 
			
		|||
 | 
			
		||||
## 字段说明
 | 
			
		||||
 | 
			
		||||
| 参数     | 类型              | 说明                                                                                                                                                                | 默认值 | 是否必填 | 示例   |
 | 
			
		||||
| -------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ------ |
 | 
			
		||||
| action   | string            | 表示具体的故障类型,支持 delay、return、script、cfl、oom、ccf、tce、cpf、tde、tpf。                                                                                 | 无     | 是       | return |
 | 
			
		||||
| mode     | string            | 表示选择 Pod 的方式,支持 one、all、fixed、fixed-percent、random-max-percent。                                                                                      | 无     | 是       | one    |
 | 
			
		||||
| value    | string            | 取决于 mode 的取值,为 mode 提供参数                                                                                                                                | 无     | 否       | 2      |
 | 
			
		||||
| target   | string            | 传递给 `chaosblade-exec-jvm` 的参数,代表 JVMChaos 的目标,支持 servlet、psql、jvm、jedis、http、dubbo、rocketmq、tars、mysql、druid、redisson、rabbitmq、mongodb。 | 无     | 是       | jvm    |
 | 
			
		||||
| flags    | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表 action 的 flags                                                                                                           | 无     | 否       |        |
 | 
			
		||||
| matchers | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表注入点的匹配方式                                                                                                           | 无     | 否       |        |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型,支持 delay、return、script、cfl、oom、ccf、tce、cpf、tde、tpf。 | 无 | 是 | return |
 | 
			
		||||
| mode | string | 表示选择 Pod 的方式,支持 one、all、fixed、fixed-percent、random-max-percent。 | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 mode 的取值,为 mode 提供参数 | 无 | 否 | 1 |
 | 
			
		||||
| target | string | 传递给 `chaosblade-exec-jvm` 的参数,代表 JVMChaos 的目标,支持 servlet、psql、jvm、jedis、http、dubbo、rocketmq、tars、mysql、druid、redisson、rabbitmq、mongodb。 | 无 | 是 | jvm |
 | 
			
		||||
| flags | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表 action 的 flags | 无 | 否 |  |
 | 
			
		||||
| matchers | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表注入点的匹配方式 | 无 | 否 |  |
 | 
			
		||||
 | 
			
		||||
关于 action 的取值的含义,可参考:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,15 +136,15 @@ NetworkChaos 用于模拟集群中网络故障的场景,目前支持以下几
 | 
			
		|||
 | 
			
		||||
### 字段说明
 | 
			
		||||
 | 
			
		||||
| 参数           | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例      |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | --------- |
 | 
			
		||||
| action         | string   | 表示具体的故障类型。netem,delay,loss,duplicate,corrupt 对应 net emulation 类型;partition 表示网络分区;bandwidth 表示限制带宽                                                                                                                                                                         | 无     | 是       | partition |
 | 
			
		||||
| target         | Selector | 与 direction 组合使用,使得 Chaos 只对部分包生效                                                                                                                                                                                                                                                           | 无     | 否       |           |
 | 
			
		||||
| direction      | enum     | 值为 `from`,`to` 或 `both`。用于指定选出“来自 target 的包”,“发往 target 的包”,或者“全部选中”                                                                                                                                                                                                            | to     | 否       | both      |
 | 
			
		||||
| mode           | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`     |
 | 
			
		||||
| value          | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无     | 否       | 2         |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称                                                                                                                                                                                                                                                                                         | 无     | 否       | ["nginx"] |
 | 
			
		||||
| selector       | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |           |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型。netem,delay,loss,duplicate,corrupt 对应 net emulation 类型;partition 表示网络分区;bandwidth 表示限制带宽 | 无 | 是 | partition |
 | 
			
		||||
| target | Selector | 与 direction 组合使用,使得 Chaos 只对部分包生效 | 无 | 否 |  |
 | 
			
		||||
| direction | enum | 值为 `from`,`to` 或 `both`。用于指定选出“来自 target 的包”,“发往 target 的包”,或者“全部选中” | to | 否 | both |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称 | 无 | 否 | ["nginx"] |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
 | 
			
		||||
针对不同的 `action`,还有不同的配置项可以填写。
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -138,12 +138,12 @@ PodChaos 是 Chaos Mesh 中的一种故障类型,通过创建 PodChaos 类型
 | 
			
		|||
 | 
			
		||||
下表介绍以上 YAML 配置文件中的字段。
 | 
			
		||||
 | 
			
		||||
| 参数           | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例           |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------------- |
 | 
			
		||||
| action         | string   | 指定要注入的故障类型,仅支持 `pod-failure`、`pod-kill`、`container-kill`                                                                                                                                                                                                                                   | 无     | 是       | `pod-kill`     |
 | 
			
		||||
| mode           | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`          |
 | 
			
		||||
| value          | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。                                                                                                                                                                             | 无     | 否       | 2              |
 | 
			
		||||
| selector       | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |                |
 | 
			
		||||
| containerNames | []string | 当你将 `action` 配置为 `container-kill` 时,此配置为必填,用于指定注入故障的目标 container 名                                                                                                                                                                                                              | 无     | 否       | ['prometheus'] |
 | 
			
		||||
| gracePeriod    | int64    | 当你将 `action` 配置为 `pod-kill` 时,需要填写此项,用于指定删除 Pod 之前的持续时间                                                                                                                                                                                                                        | 0      | 否       | 0              |
 | 
			
		||||
| duration       | string   | 指定实验的持续时间                                                                                                                                                                                                                                                                                         | 无     | 是       | 30s            |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 指定要注入的故障类型,仅支持 `pod-failure`、`pod-kill`、`container-kill` | 无 | 是 | `pod-kill` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。 | 无 | 否 | 1 |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
| containerNames | []string | 当你将 `action` 配置为 `container-kill` 时,此配置为必填,用于指定注入故障的目标 container 名 | 无 | 否 | ['prometheus'] |
 | 
			
		||||
| gracePeriod | int64 | 当你将 `action` 配置为 `pod-kill` 时,需要填写此项,用于指定删除 Pod 之前的持续时间 | 0 | 否 | 0 |
 | 
			
		||||
| duration | string | 指定实验的持续时间 | 无 | 是 | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,11 +52,11 @@ Chaos Mesh 提供的 TimeChaos 实验类型可用于模拟时间偏移的场景
 | 
			
		|||
 | 
			
		||||
以上 YAML 配置文件中的字段说明如下:
 | 
			
		||||
 | 
			
		||||
| 参数           | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值               | 是否必填 | 示例                                   |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------- | -------------------------------------- |
 | 
			
		||||
| timeOffset     | string   | 指定时间偏移的长度                                                                                                                                                                                                                                                                                         | 无                   | 是       | `-5m`                                  |
 | 
			
		||||
| clockIds       | []string | 指定时间偏移作用的时钟,详见 [`clock_gettime` 文档](https://man7.org/linux/man-pages/man2/clock_gettime.2.html)                                                                                                                                                                                            | `["CLOCK_REALTIME"]` | 否       | `["CLOCK_REALTIME","CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode           | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无                   | 是       | `one`                                  |
 | 
			
		||||
| value          | string   | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无                   | 否       | 2                                      |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称                                                                                                                                                                                                                                                                                         | 无                   | 否       | `["nginx"]`                            |
 | 
			
		||||
| selector       | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无                   | 是       |                                        |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| timeOffset | string | 指定时间偏移的长度 | 无 | 是 | `-5m` |
 | 
			
		||||
| clockIds | []string | 指定时间偏移作用的时钟,详见 [`clock_gettime` 文档](https://man7.org/linux/man-pages/man2/clock_gettime.2.html) | `["CLOCK_REALTIME"]` | 否 | `["CLOCK_REALTIME","CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称 | 无 | 否 | `["nginx"]` |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,14 +153,14 @@ stringData:
 | 
			
		|||
 | 
			
		||||
下表介绍以上 YAML 配置文件中的字段。
 | 
			
		||||
 | 
			
		||||
| 参数        | 类型   | 说明                                                                                                                                                                                                                                                                                                       | 默认值   | 是否必填 | 示例                 |
 | 
			
		||||
| ----------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------------------- |
 | 
			
		||||
| action      | string | 表示具体的故障类型,仅支持 ec2-stop、ec2-restart、detach-volume                                                                                                                                                                                                                                            | ec2-stop | 是       | ec2-stop             |
 | 
			
		||||
| mode        | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无       | 是       | `one`                |
 | 
			
		||||
| value       | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。                                                                                                                                                                             | 无       | 否       | 2                    |
 | 
			
		||||
| secretName  | string | 指定存储 AWS 认证信息的 Kubernetes Secret 名字                                                                                                                                                                                                                                                             | 无       | 否       | cloud-key-secret     |
 | 
			
		||||
| awsRegion   | string | 指定 AWS 区域                                                                                                                                                                                                                                                                                              | 无       | 是       | us-east-2            |
 | 
			
		||||
| ec2Instance | string | 指定 EC2 实例的 ID                                                                                                                                                                                                                                                                                         | 无       | 是       | your-ec2-instance-id |
 | 
			
		||||
| volumeID    | string | 当 action 为 detach-volume 必填,指定 EBS 卷的 ID                                                                                                                                                                                                                                                          | 无       | 否       | your-volume-id       |
 | 
			
		||||
| deviceName  | string | 当 action 为 detach-volume 必填,指定设备名                                                                                                                                                                                                                                                                | 无       | 否       | /dev/sdf             |
 | 
			
		||||
| duration    | string | 指定实验的持续时间                                                                                                                                                                                                                                                                                         | 无       | 是       | 30s                  |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型,仅支持 ec2-stop、ec2-restart、detach-volume | ec2-stop | 是 | ec2-stop |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。 | 无 | 否 | 1 |
 | 
			
		||||
| secretName | string | 指定存储 AWS 认证信息的 Kubernetes Secret 名字 | 无 | 否 | cloud-key-secret |
 | 
			
		||||
| awsRegion | string | 指定 AWS 区域 | 无 | 是 | us-east-2 |
 | 
			
		||||
| ec2Instance | string | 指定 EC2 实例的 ID | 无 | 是 | your-ec2-instance-id |
 | 
			
		||||
| volumeID | string | 当 action 为 detach-volume 必填,指定 EBS 卷的 ID | 无 | 否 | your-volume-id |
 | 
			
		||||
| deviceName | string | 当 action 为 detach-volume 必填,指定设备名 | 无 | 否 | /dev/sdf |
 | 
			
		||||
| duration | string | 指定实验的持续时间 | 无 | 是 | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,13 +84,13 @@ kubectl get pods -n chaos-testing -l app.kubernetes.io/component=chaos-dns-serve
 | 
			
		|||
 | 
			
		||||
### 配置说明
 | 
			
		||||
 | 
			
		||||
| 参数     | 类型        | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例                                         |
 | 
			
		||||
| :------- | :---------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----- | :------- | :------------------------------------------- |
 | 
			
		||||
| action   | string      | 定义 DNS 故障的行为,值可以为 `random` 或 `error`。当值为 `random` 时, DNS 服务返回随机的 IP 地址;当值为 `error` 时 DNS 服务返回错误                                                                                                                                                                     | 无     | 是       | `random` 或 `error`                          |
 | 
			
		||||
| patterns | string 数组 | 选择匹配故障行为的域名模版, 支持占位符 `?` 以及通配符 `*`                                                                                                                                                                                                                                                 | []     | 否       | `google.com`,`chaos-mesh.org`,`github.com` |
 | 
			
		||||
| mode     | string      | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`                                        |
 | 
			
		||||
| value    | string      | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无     | 否       | 2                                            |
 | 
			
		||||
| selector | struct      | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |                                              |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| :-- | :-- | :-- | :-- | :-- | :-- |
 | 
			
		||||
| action | string | 定义 DNS 故障的行为,值可以为 `random` 或 `error`。当值为 `random` 时, DNS 服务返回随机的 IP 地址;当值为 `error` 时 DNS 服务返回错误 | 无 | 是 | `random` 或 `error` |
 | 
			
		||||
| patterns | string 数组 | 选择匹配故障行为的域名模版, 支持占位符 `?` 以及通配符 `*` | [] | 否 | `google.com`,`chaos-mesh.org`,`github.com` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `fixed` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
 | 
			
		||||
:::note 注意
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,14 +160,14 @@ stringData:
 | 
			
		|||
 | 
			
		||||
下表介绍以上 YAML 配置文件中的字段。
 | 
			
		||||
 | 
			
		||||
| 参数        | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值    | 是否必填 | 示例                 |
 | 
			
		||||
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | -------------------- |
 | 
			
		||||
| action      | string   | 指定故障类型,可选择的类型包括:node-stop、node-reset、disk-loss                                                                                                                                                                                                                                           | node-stop | 是       | node-stop            |
 | 
			
		||||
| mode        | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无        | 是       | `one`                |
 | 
			
		||||
| value       | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。                                                                                                                                                                             | 无        | 否       | 2                    |
 | 
			
		||||
| secretName  | string   | 指定存储 GCP 认证信息的 Kubernetes Secret 名字                                                                                                                                                                                                                                                             | 无        | 否       | cloud-key-secret     |
 | 
			
		||||
| project     | string   | 指定 GCP 项目名                                                                                                                                                                                                                                                                                            | 无        | 是       | your-project         |
 | 
			
		||||
| zone        | string   | 指定 GCP 实例区域                                                                                                                                                                                                                                                                                          | 无        | 是       | us-central1-a        |
 | 
			
		||||
| instance    | string   | 指定 GCP 实例的 ID                                                                                                                                                                                                                                                                                         | 无        | 是       | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | 当 action 为 disk-loss 必填,指定设备磁盘 ID                                                                                                                                                                                                                                                               | 无        | 否       | ["your-disk-id"]     |
 | 
			
		||||
| duration    | string   | 指定实验的持续时间                                                                                                                                                                                                                                                                                         | 无        | 是       | 30s                  |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 指定故障类型,可选择的类型包括:node-stop、node-reset、disk-loss | node-stop | 是 | node-stop |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。 | 无 | 否 | 1 |
 | 
			
		||||
| secretName | string | 指定存储 GCP 认证信息的 Kubernetes Secret 名字 | 无 | 否 | cloud-key-secret |
 | 
			
		||||
| project | string | 指定 GCP 项目名 | 无 | 是 | your-project |
 | 
			
		||||
| zone | string | 指定 GCP 实例区域 | 无 | 是 | us-central1-a |
 | 
			
		||||
| instance | string | 指定 GCP 实例的 ID | 无 | 是 | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | 当 action 为 disk-loss 必填,指定设备磁盘 ID | 无 | 否 | ["your-disk-id"] |
 | 
			
		||||
| duration | string | 指定实验的持续时间 | 无 | 是 | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,15 +57,15 @@ Chaos Mesh 提供的 StressChaos 实验类型可用于模拟容器内压力的
 | 
			
		|||
 | 
			
		||||
以上 YAML 配置文件中的字段说明如下:
 | 
			
		||||
 | 
			
		||||
| 参数              | 类型                    | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例        |
 | 
			
		||||
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ----------- |
 | 
			
		||||
| duration          | string                  | 指定具体实验的持续时间                                                                                                                                                                                                                                                                                     | 无     | 是       | `30s`       |
 | 
			
		||||
| stressors         | [Stressors](#stressors) | 指定 CPU 或内存压力的参数                                                                                                                                                                                                                                                                                  | 无     | 否       |             |
 | 
			
		||||
| stressngStressors | string                  | 指定 stress-ng 的参数来达到更丰富的压力注入                                                                                                                                                                                                                                                                | 无     | 否       | `--clone 2` |
 | 
			
		||||
| mode              | string                  | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`       |
 | 
			
		||||
| value             | string                  | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无     | 否       | `2`         |
 | 
			
		||||
| containerNames    | []string                | 指定注入的容器名称                                                                                                                                                                                                                                                                                         | 无     | 否       | `["nginx"]` |
 | 
			
		||||
| selector          | struct                  | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |             |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| duration | string | 指定具体实验的持续时间 | 无 | 是 | `30s` |
 | 
			
		||||
| stressors | [Stressors](#stressors) | 指定 CPU 或内存压力的参数 | 无 | 否 |  |
 | 
			
		||||
| stressngStressors | string | 指定 stress-ng 的参数来达到更丰富的压力注入 | 无 | 否 | `--clone 2` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称 | 无 | 否 | `["nginx"]` |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
 | 
			
		||||
#### Stressors
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,24 +110,24 @@ Chaos Mesh 目前仅支持使用 YAML 配置文件创建 HTTPChaos 实验。在
 | 
			
		|||
 | 
			
		||||
通用字段指故障注入的目标过程为 Request 或 Response 时均有意义的字段。
 | 
			
		||||
 | 
			
		||||
| 参数             | 类型              | 说明                                                                                                                                                                                                                                                                                                       | 默认值             | 是否必填 | 示例                           |
 | 
			
		||||
| ---------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------- | ------------------------------ |
 | 
			
		||||
| mode             | string            | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) |                    | 是       | one                            |
 | 
			
		||||
| value            | string            | 取决于 `mode` 的取值,为 `mode` 提供参数                                                                                                                                                                                                                                                                   |                    | 否       | 2                              |
 | 
			
		||||
| target           | string            | 指定故障注入的目标过程为 `Request` 或 `Response`,需要同时配置[与 `target` 相关的字段](#与-target-相关的字段说明)                                                                                                                                                                                          |                    | 是       | Request                        |
 | 
			
		||||
| port             | int32             | 目标服务监听的 TCP 端口                                                                                                                                                                                                                                                                                    |                    | 是       | 80                             |
 | 
			
		||||
| method           | string            | 目标请求的 HTTP method                                                                                                                                                                                                                                                                                     | 默认对所有方法生效 | 否       | GET                            |
 | 
			
		||||
| path             | string            | 目标请求的 URI 路径,支持[通配符](https://www.wikiwand.com/en/Matching_wildcards)                                                                                                                                                                                                                          | 默认对所有路径生效 | 否       | /api/\*                        |
 | 
			
		||||
| request_headers  | map[string]string | 目标请求的请求头匹配                                                                                                                                                                                                                                                                                       | 默认对所有请求生效 | 否       | Content-Type: application/json |
 | 
			
		||||
| abort            | bool              | 是否注入连接中断故障                                                                                                                                                                                                                                                                                       | false              | 否       | true                           |
 | 
			
		||||
| delay            | string            | 指定延迟故障的时间                                                                                                                                                                                                                                                                                         | 0                  | 否       | 10s                            |
 | 
			
		||||
| replace.header   | map[string]string | 指定请求头或响应头替换故障中用于替换的键值对                                                                                                                                                                                                                                                               |                    | 否       | Content-Type: application/xml  |
 | 
			
		||||
| replace.body     | []byte            | 指定请求体或响应体替换故障的内容(base64 编码)                                                                                                                                                                                                                                                            |                    | 否       | eyJmb28iOiAiYmFyIn0K           |
 | 
			
		||||
| patch.header     | [][]string        | 指定请求头或响应头附加故障中附加的键值对                                                                                                                                                                                                                                                                   |                    | 否       | - [Set-Cookie, one cookie]     |
 | 
			
		||||
| patch.body.type  | string            | 指定请求体或响应体附加故障的类型,目前只支持 [`JSON`](https://tools.ietf.org/html/rfc7396)                                                                                                                                                                                                                 |                    | 否       | JSON                           |
 | 
			
		||||
| patch.body.value | string            | 指定请求体或响应体附加故障的故障内容                                                                                                                                                                                                                                                                       |                    | 否       | "{"foo": "bar"}"               |
 | 
			
		||||
| duration         | string            | 指定具体实验的持续时间                                                                                                                                                                                                                                                                                     |                    | 是       | 30s                            |
 | 
			
		||||
| scheduler        | string            | 指定具体实验的运行时间调度规则                                                                                                                                                                                                                                                                             |                    | 否       | 5 \* \* \* \*                  |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 `mode` 的取值,为 `mode` 提供参数 | 无 | 否 | 1 |
 | 
			
		||||
| target | string | 指定故障注入的目标过程为 `Request` 或 `Response`,需要同时配置[与 `target` 相关的字段](#与-target-相关的字段说明) |  | 是 | Request |
 | 
			
		||||
| port | int32 | 目标服务监听的 TCP 端口 |  | 是 | 80 |
 | 
			
		||||
| method | string | 目标请求的 HTTP method | 默认对所有方法生效 | 否 | GET |
 | 
			
		||||
| path | string | 目标请求的 URI 路径,支持[通配符](https://www.wikiwand.com/en/Matching_wildcards) | 默认对所有路径生效 | 否 | /api/\* |
 | 
			
		||||
| request_headers | map[string]string | 目标请求的请求头匹配 | 默认对所有请求生效 | 否 | Content-Type: application/json |
 | 
			
		||||
| abort | bool | 是否注入连接中断故障 | false | 否 | true |
 | 
			
		||||
| delay | string | 指定延迟故障的时间 | 0 | 否 | 10s |
 | 
			
		||||
| replace.header | map[string]string | 指定请求头或响应头替换故障中用于替换的键值对 |  | 否 | Content-Type: application/xml |
 | 
			
		||||
| replace.body | []byte | 指定请求体或响应体替换故障的内容(base64 编码) |  | 否 | eyJmb28iOiAiYmFyIn0K |
 | 
			
		||||
| patch.header | [][]string | 指定请求头或响应头附加故障中附加的键值对 |  | 否 | - [Set-Cookie, one cookie] |
 | 
			
		||||
| patch.body.type | string | 指定请求体或响应体附加故障的类型,目前只支持 [`JSON`](https://tools.ietf.org/html/rfc7396) |  | 否 | JSON |
 | 
			
		||||
| patch.body.value | string | 指定请求体或响应体附加故障的故障内容 |  | 否 | "{"foo": "bar"}" |
 | 
			
		||||
| duration | string | 指定具体实验的持续时间 |  | 是 | 30s |
 | 
			
		||||
| scheduler | string | 指定具体实验的运行时间调度规则 |  | 否 | 5 \* \* \* \* |
 | 
			
		||||
 | 
			
		||||
### 与 `target` 相关的字段说明
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -146,11 +146,11 @@ Request 专用字段是指故障注入的目标过程为 Request (即 `target`
 | 
			
		|||
 | 
			
		||||
Response 专用字段是指故障注入的目标过程为 Response (即 `target` 设置为 `Response`) 时有意义的字段。
 | 
			
		||||
 | 
			
		||||
| 参数             | 类型              | 说明                     | 默认值               | 是否必填 | 示例                           |
 | 
			
		||||
| ---------------- | ----------------- | ------------------------ | -------------------- | -------- | ------------------------------ |
 | 
			
		||||
| code             | int32             | 目标响应的状态码         | 默认对所有状态码生效 | 否       | 200                            |
 | 
			
		||||
| response_headers | map[string]string | 目标响应的响应头匹配     | 默认对所有响应生效   | 否       | Content-Type: application/json |
 | 
			
		||||
| replace.code     | int32             | 指定响应状态码的替换内容 |                      | 否       | 404                            |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| code | int32 | 目标响应的状态码 | 默认对所有状态码生效 | 否 | 200 |
 | 
			
		||||
| response_headers | map[string]string | 目标响应的响应头匹配 | 默认对所有响应生效 | 否 | Content-Type: application/json |
 | 
			
		||||
| replace.code | int32 | 指定响应状态码的替换内容 |  | 否 | 404 |
 | 
			
		||||
 | 
			
		||||
## 本地调试
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -178,18 +178,18 @@ IOChaos 是 Chaos Mesh 中的一种故障类型。通过创建 IOChaos 类型的
 | 
			
		|||
 | 
			
		||||
#### 通用字段
 | 
			
		||||
 | 
			
		||||
| 参数          | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值             | 是否必填 | 示例                |
 | 
			
		||||
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------- | ------------------- |
 | 
			
		||||
| action        | string   | 表示具体的故障类型,仅支持 latency、fault、attrOverride、mistake                                                                                                                                                                                                                                           |                    | 是       | latency             |
 | 
			
		||||
| mode          | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无                 | 是       | one                 |
 | 
			
		||||
| selector      | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无                 | 是       |                     |
 | 
			
		||||
| value         | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               |                    | 否       | 2                   |
 | 
			
		||||
| volumePath    | string   | volume 在目标容器内的挂载点,必须为挂载的根目录                                                                                                                                                                                                                                                            |                    | 是       | /var/run/etcd       |
 | 
			
		||||
| path          | string   | 注入错误的生效范围,可以是通配符,也可以是单个文件                                                                                                                                                                                                                                                         | 默认对所有文件生效 | 否       | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods       | string[] | 需要注入故障的文件系统调用类型,具体支持的类型见[附录 A](#附录-a:methods-类型)                                                                                                                                                                                                                            | 所有类型           | 否       | READ                |
 | 
			
		||||
| percent       | int      | 每次操作发生故障的概率,单位为%                                                                                                                                                                                                                                                                            | 100                | 否       | 100                 |
 | 
			
		||||
| containerName | string   | 指定注入的容器名                                                                                                                                                                                                                                                                                           |                    | 否       |                     |
 | 
			
		||||
| duration      | string   | 指定具体实验的持续时间                                                                                                                                                                                                                                                                                     |                    | 是       | 30s                 |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型,仅支持 latency、fault、attrOverride、mistake |  | 是 | latency |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 |  | 否 | 1 |
 | 
			
		||||
| volumePath | string | volume 在目标容器内的挂载点,必须为挂载的根目录 |  | 是 | /var/run/etcd |
 | 
			
		||||
| path | string | 注入错误的生效范围,可以是通配符,也可以是单个文件 | 默认对所有文件生效 | 否 | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods | string[] | 需要注入故障的文件系统调用类型,具体支持的类型见[附录 A](#附录-a:methods-类型) | 所有类型 | 否 | READ |
 | 
			
		||||
| percent | int | 每次操作发生故障的概率,单位为% | 100 | 否 | 100 |
 | 
			
		||||
| containerName | string | 指定注入的容器名 |  | 否 |  |
 | 
			
		||||
| duration | string | 指定具体实验的持续时间 |  | 是 | 30s |
 | 
			
		||||
 | 
			
		||||
#### 与 action 相关的字段
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -217,20 +217,20 @@ IOChaos 是 Chaos Mesh 中的一种故障类型。通过创建 IOChaos 类型的
 | 
			
		|||
 | 
			
		||||
  AttrOverrideSpec 定义如下
 | 
			
		||||
 | 
			
		||||
  | 参数   | 类型     | 说明                                                                                   | 默认值 | 是否必填 | 示例                 |
 | 
			
		||||
  | ------ | -------- | -------------------------------------------------------------------------------------- | ------ | -------- | -------------------- |
 | 
			
		||||
  | ino    | int      | ino 的号                                                                               |        | 否       |                      |
 | 
			
		||||
  | size   | int      | 文件大小                                                                               |        | 否       |                      |
 | 
			
		||||
  | blocks | int      | 文件占用块数                                                                           |        | 否       |                      |
 | 
			
		||||
  | atime  | TimeSpec | 最后访问时间                                                                           |        | 否       |                      |
 | 
			
		||||
  | mtime  | TimeSpec | 最后修改时间                                                                           |        | 否       |                      |
 | 
			
		||||
  | ctime  | TimeSpec | 最后状态变更时间                                                                       |        | 否       |                      |
 | 
			
		||||
  | kind   | string   | 文件类型,详见 [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |        | 否       |                      |
 | 
			
		||||
  | perm   | int      | 文件权限的十进制表示                                                                   |        | 否       | 72(八进制下为 110) |
 | 
			
		||||
  | nlink  | int      | 硬链接数量                                                                             |        | 否       |                      |
 | 
			
		||||
  | uid    | int      | 所有者的用户 ID                                                                        |        | 否       |                      |
 | 
			
		||||
  | gid    | int      | 所有者的组 ID                                                                          |        | 否       |                      |
 | 
			
		||||
  | rdev   | int      | 设备 ID                                                                                |        | 否       |                      |
 | 
			
		||||
  | 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | ino | int | ino 的号 |  | 否 |  |
 | 
			
		||||
  | size | int | 文件大小 |  | 否 |  |
 | 
			
		||||
  | blocks | int | 文件占用块数 |  | 否 |  |
 | 
			
		||||
  | atime | TimeSpec | 最后访问时间 |  | 否 |  |
 | 
			
		||||
  | mtime | TimeSpec | 最后修改时间 |  | 否 |  |
 | 
			
		||||
  | ctime | TimeSpec | 最后状态变更时间 |  | 否 |  |
 | 
			
		||||
  | kind | string | 文件类型,详见 [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |  | 否 |  |
 | 
			
		||||
  | perm | int | 文件权限的十进制表示 |  | 否 | 72(八进制下为 110) |
 | 
			
		||||
  | nlink | int | 硬链接数量 |  | 否 |  |
 | 
			
		||||
  | uid | int | 所有者的用户 ID |  | 否 |  |
 | 
			
		||||
  | gid | int | 所有者的组 ID |  | 否 |  |
 | 
			
		||||
  | rdev | int | 设备 ID |  | 否 |  |
 | 
			
		||||
 | 
			
		||||
  TimeSpec 定义如下
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -249,15 +249,13 @@ IOChaos 是 Chaos Mesh 中的一种故障类型。通过创建 IOChaos 类型的
 | 
			
		|||
 | 
			
		||||
  MistakeSpec 定义如下
 | 
			
		||||
 | 
			
		||||
  | 参数           | 类型   | 说明                                                               | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
  | -------------- | ------ | ------------------------------------------------------------------ | ------ | -------- | ---- |
 | 
			
		||||
  | filling        | string | 错误数据的填充内容,只能为 zero(填充 0)或 random(填充随机字节) |        | 是       |      |
 | 
			
		||||
  | maxOccurrences | int    | 错误在每一次操作中最多出现次数                                     |        | 是       | 1    |
 | 
			
		||||
  | maxLength      | int    | 每次错误的最大长度(单位为字节)                                   |        | 是       | 1    |
 | 
			
		||||
  | 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | filling | string | 错误数据的填充内容,只能为 zero(填充 0)或 random(填充随机字节) |  | 是 |  |
 | 
			
		||||
  | maxOccurrences | int | 错误在每一次操作中最多出现次数 |  | 是 | 1 |
 | 
			
		||||
  | maxLength | int | 每次错误的最大长度(单位为字节) |  | 是 | 1 |
 | 
			
		||||
 | 
			
		||||
:::warning 警告
 | 
			
		||||
不推荐在除了 READ 和 WRITE 之外的文件系统调用上使用 mistake 错误。这可能会导致预期之外的结果,包括但不限于文件系统损坏、程序崩溃等。
 | 
			
		||||
:::
 | 
			
		||||
:::warning 警告不推荐在除了 READ 和 WRITE 之外的文件系统调用上使用 mistake 错误。这可能会导致预期之外的结果,包括但不限于文件系统损坏、程序崩溃等。 :::
 | 
			
		||||
 | 
			
		||||
## 本地调试
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -157,14 +157,14 @@ hello chaos mesh!
 | 
			
		|||
 | 
			
		||||
## 字段说明
 | 
			
		||||
 | 
			
		||||
| 参数     | 类型              | 说明                                                                                                                                                                | 默认值 | 是否必填 | 示例   |
 | 
			
		||||
| -------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ------ |
 | 
			
		||||
| action   | string            | 表示具体的故障类型,支持 delay、return、script、cfl、oom、ccf、tce、cpf、tde、tpf。                                                                                 | 无     | 是       | return |
 | 
			
		||||
| mode     | string            | 表示选择 Pod 的方式,支持 one、all、fixed、fixed-percent、random-max-percent。                                                                                      | 无     | 是       | one    |
 | 
			
		||||
| value    | string            | 取决于 mode 的取值,为 mode 提供参数                                                                                                                                | 无     | 否       | 2      |
 | 
			
		||||
| target   | string            | 传递给 `chaosblade-exec-jvm` 的参数,代表 JVMChaos 的目标,支持 servlet、psql、jvm、jedis、http、dubbo、rocketmq、tars、mysql、druid、redisson、rabbitmq、mongodb。 | 无     | 是       | jvm    |
 | 
			
		||||
| flags    | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表 action 的 flags                                                                                                           | 无     | 否       |        |
 | 
			
		||||
| matchers | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表注入点的匹配方式                                                                                                           | 无     | 否       |        |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型,支持 delay、return、script、cfl、oom、ccf、tce、cpf、tde、tpf。 | 无 | 是 | return |
 | 
			
		||||
| mode | string | 表示选择 Pod 的方式,支持 one、all、fixed、fixed-percent、random-max-percent。 | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 mode 的取值,为 mode 提供参数 | 无 | 否 | 1 |
 | 
			
		||||
| target | string | 传递给 `chaosblade-exec-jvm` 的参数,代表 JVMChaos 的目标,支持 servlet、psql、jvm、jedis、http、dubbo、rocketmq、tars、mysql、druid、redisson、rabbitmq、mongodb。 | 无 | 是 | jvm |
 | 
			
		||||
| flags | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表 action 的 flags | 无 | 否 |  |
 | 
			
		||||
| matchers | map[string]string | 传递给 `chaosblade-exec-jvm` 的参数,代表注入点的匹配方式 | 无 | 否 |  |
 | 
			
		||||
 | 
			
		||||
关于 action 的取值的含义,可参考:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,15 +136,15 @@ NetworkChaos 用于模拟集群中网络故障的场景,目前支持以下几
 | 
			
		|||
 | 
			
		||||
### 字段说明
 | 
			
		||||
 | 
			
		||||
| 参数           | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例      |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | --------- |
 | 
			
		||||
| action         | string   | 表示具体的故障类型。netem,delay,loss,duplicate,corrupt 对应 net emulation 类型;partition 表示网络分区;bandwidth 表示限制带宽                                                                                                                                                                         | 无     | 是       | partition |
 | 
			
		||||
| target         | Selector | 与 direction 组合使用,使得 Chaos 只对部分包生效                                                                                                                                                                                                                                                           | 无     | 否       |           |
 | 
			
		||||
| direction      | enum     | 值为 `from`,`to` 或 `both`。用于指定选出“来自 target 的包”,“发往 target 的包”,或者“全部选中”                                                                                                                                                                                                            | to     | 否       | both      |
 | 
			
		||||
| mode           | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`     |
 | 
			
		||||
| value          | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无     | 否       | 2         |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称                                                                                                                                                                                                                                                                                         | 无     | 否       | ["nginx"] |
 | 
			
		||||
| selector       | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |           |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 表示具体的故障类型。netem,delay,loss,duplicate,corrupt 对应 net emulation 类型;partition 表示网络分区;bandwidth 表示限制带宽 | 无 | 是 | partition |
 | 
			
		||||
| target | Selector | 与 direction 组合使用,使得 Chaos 只对部分包生效 | 无 | 否 |  |
 | 
			
		||||
| direction | enum | 值为 `from`,`to` 或 `both`。用于指定选出“来自 target 的包”,“发往 target 的包”,或者“全部选中” | to | 否 | both |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称 | 无 | 否 | ["nginx"] |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
 | 
			
		||||
针对不同的 `action`,还有不同的配置项可以填写。
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -138,12 +138,12 @@ PodChaos 是 Chaos Mesh 中的一种故障类型,通过创建 PodChaos 类型
 | 
			
		|||
 | 
			
		||||
下表介绍以上 YAML 配置文件中的字段。
 | 
			
		||||
 | 
			
		||||
| 参数           | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值 | 是否必填 | 示例           |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------------- |
 | 
			
		||||
| action         | string   | 指定要注入的故障类型,仅支持 `pod-failure`、`pod-kill`、`container-kill`                                                                                                                                                                                                                                   | 无     | 是       | `pod-kill`     |
 | 
			
		||||
| mode           | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无     | 是       | `one`          |
 | 
			
		||||
| value          | string   | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。                                                                                                                                                                             | 无     | 否       | 2              |
 | 
			
		||||
| selector       | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无     | 是       |                |
 | 
			
		||||
| containerNames | []string | 当你将 `action` 配置为 `container-kill` 时,此配置为必填,用于指定注入故障的目标 container 名                                                                                                                                                                                                              | 无     | 否       | ['prometheus'] |
 | 
			
		||||
| gracePeriod    | int64    | 当你将 `action` 配置为 `pod-kill` 时,需要填写此项,用于指定删除 Pod 之前的持续时间                                                                                                                                                                                                                        | 0      | 否       | 0              |
 | 
			
		||||
| duration       | string   | 指定实验的持续时间                                                                                                                                                                                                                                                                                         | 无     | 是       | 30s            |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | 指定要注入的故障类型,仅支持 `pod-failure`、`pod-kill`、`container-kill` | 无 | 是 | `pod-kill` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决与 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比。 | 无 | 否 | 1 |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
| containerNames | []string | 当你将 `action` 配置为 `container-kill` 时,此配置为必填,用于指定注入故障的目标 container 名 | 无 | 否 | ['prometheus'] |
 | 
			
		||||
| gracePeriod | int64 | 当你将 `action` 配置为 `pod-kill` 时,需要填写此项,用于指定删除 Pod 之前的持续时间 | 0 | 否 | 0 |
 | 
			
		||||
| duration | string | 指定实验的持续时间 | 无 | 是 | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,11 +52,11 @@ Chaos Mesh 提供的 TimeChaos 实验类型可用于模拟时间偏移的场景
 | 
			
		|||
 | 
			
		||||
以上 YAML 配置文件中的字段说明如下:
 | 
			
		||||
 | 
			
		||||
| 参数           | 类型     | 说明                                                                                                                                                                                                                                                                                                       | 默认值               | 是否必填 | 示例                                   |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------- | -------------------------------------- |
 | 
			
		||||
| timeOffset     | string   | 指定时间偏移的长度                                                                                                                                                                                                                                                                                         | 无                   | 是       | `-5m`                                  |
 | 
			
		||||
| clockIds       | []string | 指定时间偏移作用的时钟,详见 [`clock_gettime` 文档](https://man7.org/linux/man-pages/man2/clock_gettime.2.html)                                                                                                                                                                                            | `["CLOCK_REALTIME"]` | 否       | `["CLOCK_REALTIME","CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode           | string   | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无                   | 是       | `one`                                  |
 | 
			
		||||
| value          | string   | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比                                                                                                                                                                               | 无                   | 否       | 2                                      |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称                                                                                                                                                                                                                                                                                         | 无                   | 否       | `["nginx"]`                            |
 | 
			
		||||
| selector       | struct   | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md)                                                                                                                                                                                                                       | 无                   | 是       |                                        |
 | 
			
		||||
| 参数 | 类型 | 说明 | 默认值 | 是否必填 | 示例 |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| timeOffset | string | 指定时间偏移的长度 | 无 | 是 | `-5m` |
 | 
			
		||||
| clockIds | []string | 指定时间偏移作用的时钟,详见 [`clock_gettime` 文档](https://man7.org/linux/man-pages/man2/clock_gettime.2.html) | `["CLOCK_REALTIME"]` | 否 | `["CLOCK_REALTIME","CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode | string | 指定实验的运行方式,可选择的方式包括:`one`(表示随机选出一个符合条件的 Pod)、`all`(表示选出所有符合条件的 Pod)、`fixed`(表示选出指定数量且符合条件的 Pod)、`fixed-percent`(表示选出占符合条件的 Pod 中指定百分比的 Pod)、`random-max-percent`(表示选出占符合条件的 Pod 中不超过指定百分比的 Pod) | 无 | 是 | `one` |
 | 
			
		||||
| value | string | 取决于 `mode` 的配置,为 `mode` 提供对应的参数。例如,当你将 `mode` 配置为 `fixed-percent` 时,`value` 用于指定 Pod 的百分比 | 无 | 否 | 1 |
 | 
			
		||||
| containerNames | []string | 指定注入的容器名称 | 无 | 否 | `["nginx"]` |
 | 
			
		||||
| selector | struct | 指定注入故障的目标 Pod,详情请参考[定义实验范围](./define-chaos-experiment-scope.md) | 无 | 是 |  |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,14 +153,14 @@ Before you create an experiment using Chaos Dashboard, make sure the following r
 | 
			
		|||
 | 
			
		||||
The following table shows the fields in the YAML configuration file.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example              |
 | 
			
		||||
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | -------------------- |
 | 
			
		||||
| action      | string | Indicates the specific type of faults. Only ec2-stop, ec2-restore, and detain-volume are supported.                                                                                                                                                                                                                                                                         | ec2-stop      | Yes      | ec2-stop             |
 | 
			
		||||
| mode        | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`                  |
 | 
			
		||||
| value       | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                         | None          | No       | 2                    |
 | 
			
		||||
| secretName  | string | Specifies the name of the Kubernetes Secret that stores the AWS authentication information.                                                                                                                                                                                                                                                                                 | None          | No       | cloud-key-secret     |
 | 
			
		||||
| awsRegion   | string | Specifies the AWS region.                                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | us-east-2            |
 | 
			
		||||
| ec2Instance | string | Specifies the ID of the EC2 instance.                                                                                                                                                                                                                                                                                                                                       | None          | Yes      | your-ec2-instance-id |
 | 
			
		||||
| volumeID    | string | This is a required field when the `action` is `detach-volume`. This field specifies the EBS volume ID.                                                                                                                                                                                                                                                                      | None          | No       | your-volume-id       |
 | 
			
		||||
| deviceName  | string | This is a required field when the `action` is `detach-volume`. This field specifies the machine name.                                                                                                                                                                                                                                                                       | None          | No       | /dev/sdf             |
 | 
			
		||||
| duration    | string | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | 30s                  |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific type of faults. Only ec2-stop, ec2-restore, and detain-volume are supported. | ec2-stop | Yes | ec2-stop |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| secretName | string | Specifies the name of the Kubernetes Secret that stores the AWS authentication information. | None | No | cloud-key-secret |
 | 
			
		||||
| awsRegion | string | Specifies the AWS region. | None | Yes | us-east-2 |
 | 
			
		||||
| ec2Instance | string | Specifies the ID of the EC2 instance. | None | Yes | your-ec2-instance-id |
 | 
			
		||||
| volumeID | string | This is a required field when the `action` is `detach-volume`. This field specifies the EBS volume ID. | None | No | your-volume-id |
 | 
			
		||||
| deviceName | string | This is a required field when the `action` is `detach-volume`. This field specifies the machine name. | None | No | /dev/sdf |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. | None | Yes | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,13 +84,13 @@ Make sure that the Pod status is `Running`.
 | 
			
		|||
 | 
			
		||||
### Configuration Description
 | 
			
		||||
 | 
			
		||||
| Parameter | Type         | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example                                      |
 | 
			
		||||
| :-------- | :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ | :------- | :------------------------------------------- |
 | 
			
		||||
| action    | string       | Defines the behavior of DNS fault. The value can be `random` or `error`. When the value is `random`, DNS service will return a random IP address; when the value is `error`, DNS service will return an error.                                                                                                                                                              | None          | Yes      | `random` or `error`                          |
 | 
			
		||||
| patterns  | String array | Selects a domain template that matches faults. Placeholder `?` and wildcard are supported. `*`                                                                                                                                                                                                                                                                              | []            | No       | `google.com`, `chaos-mesh.org`, `github.com` |
 | 
			
		||||
| mode      | string       | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`                                          |
 | 
			
		||||
| value     | string       | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                        | None          | No       | 2                                            |
 | 
			
		||||
| selector  | struct       | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                | None          | Yes      |                                              |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| :-- | :-- | :-- | :-- | :-- | :-- |
 | 
			
		||||
| action | string | Defines the behavior of DNS fault. The value can be `random` or `error`. When the value is `random`, DNS service will return a random IP address; when the value is `error`, DNS service will return an error. | None | Yes | `random` or `error` |
 | 
			
		||||
| patterns | String array | Selects a domain template that matches faults. Placeholder `?` and wildcard are supported. `*` | [] | No | `google.com`, `chaos-mesh.org`, `github.com` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
 | 
			
		||||
:::note
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,14 +160,14 @@ Before you create an experiment using Chaos Dashboard, make sure the following r
 | 
			
		|||
 | 
			
		||||
The following table shows the fields in the YAML configuration file.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type     | Descpription                                                                                                                                                                                                                                                                                                                                               | Default value | Required | Example              |
 | 
			
		||||
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | -------------------- |
 | 
			
		||||
| action      | string   | Indicates the specific type of faults. The available fault types include node-stop, node-reset, and disk-loss.                                                                                                                                                                                                                                             | node-stop     | Yes      | node-stop            |
 | 
			
		||||
| mode        | string   | Indicates the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None          | Yes      | `one`                |
 | 
			
		||||
| value       | string   | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of pods.                                                                                                                                                                                       | None          | No       | 2                    |
 | 
			
		||||
| secretName  | string   | Indicates the name of the Kubernetes secret that stores the GCP authentication information.                                                                                                                                                                                                                                                                | None          | No       | cloud-key-secret     |
 | 
			
		||||
| project     | string   | Indicates the name of GCP project.                                                                                                                                                                                                                                                                                                                         | None          | Yes      | your-project         |
 | 
			
		||||
| zone        | string   | Indicates the region of GCP instance.                                                                                                                                                                                                                                                                                                                      | None          | Yes      | us-central1-a        |
 | 
			
		||||
| instance    | string   | Indicates the ID of GCP instance.                                                                                                                                                                                                                                                                                                                          | None          | Yes      | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | This is a required field when the `action` is `disk-loss`. This field specifies the machine disk ID.                                                                                                                                                                                                                                                       | None          | no       | ["your-disk-id"]     |
 | 
			
		||||
| duration    | string   | Indicates the duration of the experiment.                                                                                                                                                                                                                                                                                                                  | None          | Yes      | 30s                  |
 | 
			
		||||
| Parameter | Type | Descpription | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific type of faults. The available fault types include node-stop, node-reset, and disk-loss. | node-stop | Yes | node-stop |
 | 
			
		||||
| mode | string | Indicates the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of pods. | None | No | 1 |
 | 
			
		||||
| secretName | string | Indicates the name of the Kubernetes secret that stores the GCP authentication information. | None | No | cloud-key-secret |
 | 
			
		||||
| project | string | Indicates the name of GCP project. | None | Yes | your-project |
 | 
			
		||||
| zone | string | Indicates the region of GCP instance. | None | Yes | us-central1-a |
 | 
			
		||||
| instance | string | Indicates the ID of GCP instance. | None | Yes | your-gcp-instance-id |
 | 
			
		||||
| deviceNames | []string | This is a required field when the `action` is `disk-loss`. This field specifies the machine disk ID. | None | no | ["your-disk-id"] |
 | 
			
		||||
| duration | string | Indicates the duration of the experiment. | None | Yes | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,15 +57,15 @@ You can create experiments using either Chaos Dashboard or the YAML configuratio
 | 
			
		|||
 | 
			
		||||
The fields in the YAML configuration file are described in the following table:
 | 
			
		||||
 | 
			
		||||
| Parameter         | Type                    | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example     |
 | 
			
		||||
| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ----------- |
 | 
			
		||||
| duration          | string                  | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | `30s`       |
 | 
			
		||||
| stressors         | [Stressors](#stressors) | Specifies the stress of CPU or memory                                                                                                                                                                                                                                                                                                                                       | None          | No       |             |
 | 
			
		||||
| stressngStressors | string                  | Specifies the stres-ng parameter to reach richer stress injection                                                                                                                                                                                                                                                                                                           | None          | No       | `--clone 2` |
 | 
			
		||||
| mode              | string                  | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`         |
 | 
			
		||||
| value             | string                  | Provides a parameter for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                        | None          | No       | `2`         |
 | 
			
		||||
| containerNames    | []string                | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                                       | None          | No       | `["nginx"]` |
 | 
			
		||||
| selector          | struct                  | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                | None          | Yes      |             |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. | None | Yes | `30s` |
 | 
			
		||||
| stressors | [Stressors](#stressors) | Specifies the stress of CPU or memory | None | No |  |
 | 
			
		||||
| stressngStressors | string | Specifies the stres-ng parameter to reach richer stress injection | None | No | `--clone 2` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides a parameter for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected. | None | No | `["nginx"]` |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the Scope of Chaos Experiments](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
 | 
			
		||||
#### Stressors
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -83,7 +83,7 @@ The fields in the YAML configuration file are described in the following table:
 | 
			
		|||
 | 
			
		||||
##### CPUStressor
 | 
			
		||||
 | 
			
		||||
| Parameter | Type | Description                                                                            | Default value | Required | Example |
 | 
			
		||||
| --------- | ---- | -------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| workers   | int  | Specifies the number of threads that apply memory stress                               |               | Yes      | `1`     |
 | 
			
		||||
| load      | int  | Specifies the percentage of CPU occupied0 means sleep and no load; 100 means full load |               | No       | `50`    |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| workers | int | Specifies the number of threads that apply memory stress |  | Yes | `1` |
 | 
			
		||||
| load | int | Specifies the percentage of CPU occupied0 means sleep and no load; 100 means full load |  | No | `50` |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,24 +110,24 @@ Currently, Chaos Mesh only supports using YAML configuration files to create HTT
 | 
			
		|||
 | 
			
		||||
Common fields are meaningful when the `target` of fault injection is `Request` or `Response`.
 | 
			
		||||
 | 
			
		||||
| Parameter        | Type              | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value                             | Required | Example                        |
 | 
			
		||||
| ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | -------- | ------------------------------ |
 | 
			
		||||
| mode             | string            | Specifies the mode of the experiment. The mode options include `one` (selecting a random pod), `all` (selecting all eligible pods), `fixed` (selecting a specified number of eligible pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible pods). |                                           | yes      | one                            |
 | 
			
		||||
| value            | string            | Provides parameters for the `mode` configuration depending on the value of `mode`.                                                                                                                                                                                                                                                                                          |                                           | no       | 2                              |
 | 
			
		||||
| target           | string            | Specifies whether the target of fault injuection is `Request` or `Response`. The [`target`-related fields](#Description-for-`target`-related-fields) should be configured at the same time.                                                                                                                                                                                 |                                           | yes      | Request                        |
 | 
			
		||||
| port             | int32             | The TCP port that the target service listens on.                                                                                                                                                                                                                                                                                                                            |                                           | yes      | 80                             |
 | 
			
		||||
| method           | string            | The HTTP method of the target request method.                                                                                                                                                                                                                                                                                                                               | Takes effect for all methods by default.  | no       | GET                            |
 | 
			
		||||
| path             | string            | The URI path of the target request which supports [Matching wildcards](https://www.wikiwand.com/en/Matching_wildcards).                                                                                                                                                                                                                                                     | Takes effect on all paths by default.     | no       | /api/\*                        |
 | 
			
		||||
| request_headers  | map[string]string | Matches request headers to the target service.                                                                                                                                                                                                                                                                                                                              | Takes effect for all requests by default. | no       | Content-Type: application/json |
 | 
			
		||||
| abort            | bool              | Indicates whether to inject the fault that interrupts server connection.                                                                                                                                                                                                                                                                                                    | false                                     | no       | true                           |
 | 
			
		||||
| delay            | string            | Specifies the time for a latency fault.                                                                                                                                                                                                                                                                                                                                     | 0                                         | no       | 10s                            |
 | 
			
		||||
| replace.header   | map[string]string | Specifies the key pair used to replace the request header or response header.                                                                                                                                                                                                                                                                                               |                                           | no       | Content-Type: application/xml  |
 | 
			
		||||
| replace.body     | []byte            | Specifies request body or response body to replace the fault (Base64 encoded).                                                                                                                                                                                                                                                                                              |                                           | no       | eyJmb28iOiAiYmFyIn0K           |
 | 
			
		||||
| patch.header     | [][]string        | Specifies the attached key pair of the request header or response header with patch faults.                                                                                                                                                                                                                                                                                 |                                           | no       | - [Set-Cookie, one cookie]     |
 | 
			
		||||
| patch.body.type  | string            | Specifies the type of patch faults of the request body or response body. Currently, it only supports [`JSON`](https://tools.ietf.org/html/rfc7396).                                                                                                                                                                                                                         |                                           | no       | JSON                           |
 | 
			
		||||
| patch.body.value | string            | Specifies the fault of the request body or response body with patch faults.                                                                                                                                                                                                                                                                                                 |                                           | no       | "{"foo": "bar"}"               |
 | 
			
		||||
| duration         | string            | Specifies the duration of a specific experiment.                                                                                                                                                                                                                                                                                                                            |                                           | yes      | 30s                            |
 | 
			
		||||
| scheduler        | string            | Specifies the scheduling rules for the time of a specific experiment.                                                                                                                                                                                                                                                                                                       |                                           | no       | 5 \* \* \* \*                  |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random pod), `all` (selecting all eligible pods), `fixed` (selecting a specified number of eligible pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible pods). |  | yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration depending on the value of `mode`. |  | no | 1 |
 | 
			
		||||
| target | string | Specifies whether the target of fault injuection is `Request` or `Response`. The [`target`-related fields](#Description-for-`target`-related-fields) should be configured at the same time. |  | yes | Request |
 | 
			
		||||
| port | int32 | The TCP port that the target service listens on. |  | yes | 80 |
 | 
			
		||||
| method | string | The HTTP method of the target request method. | Takes effect for all methods by default. | no | GET |
 | 
			
		||||
| path | string | The URI path of the target request which supports [Matching wildcards](https://www.wikiwand.com/en/Matching_wildcards). | Takes effect on all paths by default. | no | /api/\* |
 | 
			
		||||
| request_headers | map[string]string | Matches request headers to the target service. | Takes effect for all requests by default. | no | Content-Type: application/json |
 | 
			
		||||
| abort | bool | Indicates whether to inject the fault that interrupts server connection. | false | no | true |
 | 
			
		||||
| delay | string | Specifies the time for a latency fault. | 0 | no | 10s |
 | 
			
		||||
| replace.header | map[string]string | Specifies the key pair used to replace the request header or response header. |  | no | Content-Type: application/xml |
 | 
			
		||||
| replace.body | []byte | Specifies request body or response body to replace the fault (Base64 encoded). |  | no | eyJmb28iOiAiYmFyIn0K |
 | 
			
		||||
| patch.header | [][]string | Specifies the attached key pair of the request header or response header with patch faults. |  | no | - [Set-Cookie, one cookie] |
 | 
			
		||||
| patch.body.type | string | Specifies the type of patch faults of the request body or response body. Currently, it only supports [`JSON`](https://tools.ietf.org/html/rfc7396). |  | no | JSON |
 | 
			
		||||
| patch.body.value | string | Specifies the fault of the request body or response body with patch faults. |  | no | "{"foo": "bar"}" |
 | 
			
		||||
| duration | string | Specifies the duration of a specific experiment. |  | yes | 30s |
 | 
			
		||||
| scheduler | string | Specifies the scheduling rules for the time of a specific experiment. |  | no | 5 \* \* \* \* |
 | 
			
		||||
 | 
			
		||||
### Description for `target`-related fields
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -135,22 +135,22 @@ Common fields are meaningful when the `target` of fault injection is `Request` o
 | 
			
		|||
 | 
			
		||||
The `Request` field is a meaningful when the `target` set to `Request` during the fault injection.
 | 
			
		||||
 | 
			
		||||
| Parameter       | Type              | Description                                                         | Default value | Required | Example      |
 | 
			
		||||
| --------------- | ----------------- | ------------------------------------------------------------------- | ------------- | -------- | ------------ |
 | 
			
		||||
| replace.path    | string            | Specifies the URI path used to replace content.                     |               | no       | /api/v2/     |
 | 
			
		||||
| replace.method  | string            | Specifies the replaced content of the HTTP request method.          |               | no       | DELETE       |
 | 
			
		||||
| replace.queries | map[string]string | Specifies the replaced key pair of the URI query.                   |               | no       | foo: bar     |
 | 
			
		||||
| patch.queries   | [][]string        | Specifies the attached key pair of the URI query with patch faults. |               | no       | - [foo, bar] |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| replace.path | string | Specifies the URI path used to replace content. |  | no | /api/v2/ |
 | 
			
		||||
| replace.method | string | Specifies the replaced content of the HTTP request method. |  | no | DELETE |
 | 
			
		||||
| replace.queries | map[string]string | Specifies the replaced key pair of the URI query. |  | no | foo: bar |
 | 
			
		||||
| patch.queries | [][]string | Specifies the attached key pair of the URI query with patch faults. |  | no | - [foo, bar] |
 | 
			
		||||
 | 
			
		||||
#### `Respond`-related fields
 | 
			
		||||
 | 
			
		||||
The `Response` is a meaningful when the `target` set to `Response` during the fault injection.
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type              | Description                                                 | Default value                                 | Required | Example                        |
 | 
			
		||||
| -------------- | ----------------- | ----------------------------------------------------------- | --------------------------------------------- | -------- | ------------------------------ |
 | 
			
		||||
| code           | int32             | Specifies the status code responded by `target`.            | Takes effect for all status codes by default. | no       | 200                            |
 | 
			
		||||
| response_heads | map[string]string | Matches request headers to `target`.                        | Takes effect for all responses by default.    | no       | Content-Type: application/json |
 | 
			
		||||
| replace.code   | int32             | Specifies the replaced content of the response status code. |                                               | no       | 404                            |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| code | int32 | Specifies the status code responded by `target`. | Takes effect for all status codes by default. | no | 200 |
 | 
			
		||||
| response_heads | map[string]string | Matches request headers to `target`. | Takes effect for all responses by default. | no | Content-Type: application/json |
 | 
			
		||||
| replace.code | int32 | Specifies the replaced content of the response status code. |  | no | 404 |
 | 
			
		||||
 | 
			
		||||
## Local debugging
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -174,18 +174,18 @@ For specific features, refer to [Create experiments using the YAML files](#creat
 | 
			
		|||
 | 
			
		||||
#### General fields
 | 
			
		||||
 | 
			
		||||
| Parameter     | Type     | Description                                                                                                                                                                                                                                                                                                                                                | Default value                  | Required | Example             |
 | 
			
		||||
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -------- | ------------------- |
 | 
			
		||||
| action        | string   | Indicates the specific type of faults. Only latency, fault, attrOverride, and mistake are supported.                                                                                                                                                                                                                                                       |                                | Yes      | latency             |
 | 
			
		||||
| mode          | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None                           | Yes      | 1                   |
 | 
			
		||||
| selector      | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                         | None                           | Yes      |                     |
 | 
			
		||||
| value         | string   | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                       |                                | No       | 2                   |
 | 
			
		||||
| volumePath    | string   | The mount point of volume in the target container. Must be the root directory of the mount.                                                                                                                                                                                                                                                                |                                | Yes      | /var/run/etcd       |
 | 
			
		||||
| path          | string   | The valid range of fault injections, either a wildcard or a single file.                                                                                                                                                                                                                                                                                   | Valid for all files by default | No       | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods       | string[] | Type of the file system call that requires injecting fault. For more information about supported types, refer to [Appendix A](#appendix-a: methods-type).                                                                                                                                                                                                  | All Types                      | No       | READ                |
 | 
			
		||||
| percent       | int      | Probability of failure per operation, in %.                                                                                                                                                                                                                                                                                                                | 100                            | No       | 100                 |
 | 
			
		||||
| ContainerName | string   | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                      |                                | No       |                     |
 | 
			
		||||
| duration      | string   | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                  |                                | Yes      | 30s                 |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific type of faults. Only latency, fault, attrOverride, and mistake are supported. |  | Yes | latency |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a Pod at random), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of the eligible Pods), and `random-max-percent` (selecting the maximum percentage of the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. |  | No | 1 |
 | 
			
		||||
| volumePath | string | The mount point of volume in the target container. Must be the root directory of the mount. |  | Yes | /var/run/etcd |
 | 
			
		||||
| path | string | The valid range of fault injections, either a wildcard or a single file. | Valid for all files by default | No | /var/run/etcd/\*_/_ |
 | 
			
		||||
| methods | string[] | Type of the file system call that requires injecting fault. For more information about supported types, refer to [Appendix A](#appendix-a: methods-type). | All Types | No | READ |
 | 
			
		||||
| percent | int | Probability of failure per operation, in %. | 100 | No | 100 |
 | 
			
		||||
| ContainerName | string | Specifies the name of the container into which the fault is injected. |  | No |  |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. |  | Yes | 30s |
 | 
			
		||||
 | 
			
		||||
#### Fields related to action
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -213,20 +213,20 @@ The following are specific information about fields corresponding to action:
 | 
			
		|||
 | 
			
		||||
  AttrOverrideSpec is defined as follows:
 | 
			
		||||
 | 
			
		||||
  | Parameter | Type     | Description                                                                            | Default value | Required | Example           |
 | 
			
		||||
  | --------- | -------- | -------------------------------------------------------------------------------------- | ------------- | -------- | ----------------- |
 | 
			
		||||
  | ino       | int      | ino number                                                                             |               | No       |                   |
 | 
			
		||||
  | size      | int      | File size                                                                              |               | No       |                   |
 | 
			
		||||
  | blocks    | int      | Number of blocks that the file uses                                                    |               | No       |                   |
 | 
			
		||||
  | atime     | TimeSpec | Last access time                                                                       |               | No       |                   |
 | 
			
		||||
  | mtime     | TimeSpec | Last modified time                                                                     |               | No       |                   |
 | 
			
		||||
  | ctime     | TimeSpec | Last status change time                                                                |               | No       |                   |
 | 
			
		||||
  | kind      | string   | File type, see [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |               | No       |                   |
 | 
			
		||||
  | perm      | int      | File permissions in decimal                                                            |               | No       | 72 (110 in octal) |
 | 
			
		||||
  | nlink     | int      | Number of hard links                                                                   |               | No       |                   |
 | 
			
		||||
  | uid       | int      | User ID of the owner                                                                   |               | No       |                   |
 | 
			
		||||
  | gid       | int      | Group ID of the owner                                                                  |               | No       |                   |
 | 
			
		||||
  | rdev      | int      | Device ID                                                                              |               | No       |                   |
 | 
			
		||||
  | Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | ino | int | ino number |  | No |  |
 | 
			
		||||
  | size | int | File size |  | No |  |
 | 
			
		||||
  | blocks | int | Number of blocks that the file uses |  | No |  |
 | 
			
		||||
  | atime | TimeSpec | Last access time |  | No |  |
 | 
			
		||||
  | mtime | TimeSpec | Last modified time |  | No |  |
 | 
			
		||||
  | ctime | TimeSpec | Last status change time |  | No |  |
 | 
			
		||||
  | kind | string | File type, see [fuser::FileType](https://docs.rs/fuser/0.7.0/fuser/enum.FileType.html) |  | No |  |
 | 
			
		||||
  | perm | int | File permissions in decimal |  | No | 72 (110 in octal) |
 | 
			
		||||
  | nlink | int | Number of hard links |  | No |  |
 | 
			
		||||
  | uid | int | User ID of the owner |  | No |  |
 | 
			
		||||
  | gid | int | Group ID of the owner |  | No |  |
 | 
			
		||||
  | rdev | int | Device ID |  | No |  |
 | 
			
		||||
 | 
			
		||||
  TimeSpec is defined as follows:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -245,11 +245,11 @@ The following are specific information about fields corresponding to action:
 | 
			
		|||
 | 
			
		||||
  MistakeSpec is defined as follows:
 | 
			
		||||
 | 
			
		||||
  | Parameter      | Type   | Description                                                                                  | Default value | Required | Example |
 | 
			
		||||
  | -------------- | ------ | -------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
  | filling        | string | The wrong data to be filled. Only zero (fill 0) or random (fill random bytes) are supported. |               | Yes      |         |
 | 
			
		||||
  | maxOccurrences | int    | Maximum number of errors in each operation.                                                  |               | Yes      | 1       |
 | 
			
		||||
  | maxLength      | int    | Maximum length of each error (in bytes).                                                     |               | Yes      | 1       |
 | 
			
		||||
  | Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
  | --- | --- | --- | --- | --- | --- |
 | 
			
		||||
  | filling | string | The wrong data to be filled. Only zero (fill 0) or random (fill random bytes) are supported. |  | Yes |  |
 | 
			
		||||
  | maxOccurrences | int | Maximum number of errors in each operation. |  | Yes | 1 |
 | 
			
		||||
  | maxLength | int | Maximum length of each error (in bytes). |  | Yes | 1 |
 | 
			
		||||
 | 
			
		||||
::warning It is suggested that you only use mistake on READ and WRITE file system calls. Using mistake on other file system calls may lead to unexpected consequences, including but not limited to file system damage and program crashes. :::
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -157,14 +157,14 @@ hello chaos mesh!
 | 
			
		|||
 | 
			
		||||
## Field description
 | 
			
		||||
 | 
			
		||||
| Parameter | Type              | Description                                                                                                                                                                                         | Default value | Required | Example |
 | 
			
		||||
| --------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| action    | string            | Indicates the specific fault type. The available fault types include return, script, cfl, oom, ccf, tce, tcf, cpf, tde, and tpf.                                                                    | None          | Yes      | return  |
 | 
			
		||||
| mode      | string            | Indicates how to select Pod. The supported modes include one, all, fixed, fixed-percent, and random-max-percent.                                                                                    | None          | Yes      | 1       |
 | 
			
		||||
| value     | string            | Provides parameters for the `mode` configuration, depending on `mode`.                                                                                                                              | None          | No       | 2       |
 | 
			
		||||
| target    | string            | Indicates the parameter passed to `chaosblade-exec-jvm`, representing JVMChaos targets, supporting servlet, psql, jvm, jedis, http, dubbo, rocketmq, tars, mysql, ruid, redisson, rabbitmq, monodb. | None          | Yes      | jvm     |
 | 
			
		||||
| flags     | map[string]string | Indicates parameters passed to `chaosblade-exec-jvm` and represents the flags of action.                                                                                                            | None          | No       |         |
 | 
			
		||||
| matchers  | map[string]string | Indicates parameters passed to `chaosblade-execu-jvm` and represents the matching of injection points.                                                                                              | None          | No       |         |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific fault type. The available fault types include return, script, cfl, oom, ccf, tce, tcf, cpf, tde, and tpf. | None | Yes | return |
 | 
			
		||||
| mode | string | Indicates how to select Pod. The supported modes include one, all, fixed, fixed-percent, and random-max-percent. | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`. | None | No | 1 |
 | 
			
		||||
| target | string | Indicates the parameter passed to `chaosblade-exec-jvm`, representing JVMChaos targets, supporting servlet, psql, jvm, jedis, http, dubbo, rocketmq, tars, mysql, ruid, redisson, rabbitmq, monodb. | None | Yes | jvm |
 | 
			
		||||
| flags | map[string]string | Indicates parameters passed to `chaosblade-exec-jvm` and represents the flags of action. | None | No |  |
 | 
			
		||||
| matchers | map[string]string | Indicates parameters passed to `chaosblade-execu-jvm` and represents the matching of injection points. | None | No |  |
 | 
			
		||||
 | 
			
		||||
For the meaning of the value of action, refer to:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -138,15 +138,15 @@ Before creating NetworkChaos experiments, ensure the following:
 | 
			
		|||
 | 
			
		||||
## Field description
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                        | Default value | Required | Example   |
 | 
			
		||||
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | --------- |
 | 
			
		||||
| action         | string   | Indicates the specific fault type. Available types include: `netem`, `delay` (network delay), `loss` (packet loss), `duplicate` (packet duplicating), `corrupt` (packet corrupt), `partition` (network partition), and `bandwidth` (network bandwidth limit).After you specify `action` field, refer to [Description for `action`-related fields](#description-for-action-related-fields) for other necessary field configuration. | None          | Yes      | Partition |
 | 
			
		||||
| target         | Selector | Used in combination with direction, making Chaos only effective for some packets.                                                                                                                                                                                                                                                                                                                                                  | None          | No       |           |
 | 
			
		||||
| direction      | enum     | Indicates the direction of `target` packets. Available vaules include `from` (the packets from `target`), `to` (the packets to `target`), and `both` ( the packets from or to `target`). This parameter makes Chaos only take effect for a specific direction of packets.                                                                                                                                                          | to            | No       | both      |
 | 
			
		||||
| mode           | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods).                                                        | None          | Yes      | `1`       |
 | 
			
		||||
| value          | string   | Provides a parameter for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                                                                              | None          | No       | 2         |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                                                                                              | None          | No       | ["nginx"] |
 | 
			
		||||
| selector       | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                                                                                 | None          | Yes      |           |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Indicates the specific fault type. Available types include: `netem`, `delay` (network delay), `loss` (packet loss), `duplicate` (packet duplicating), `corrupt` (packet corrupt), `partition` (network partition), and `bandwidth` (network bandwidth limit).After you specify `action` field, refer to [Description for `action`-related fields](#description-for-action-related-fields) for other necessary field configuration. | None | Yes | Partition |
 | 
			
		||||
| target | Selector | Used in combination with direction, making Chaos only effective for some packets. | None | No |  |
 | 
			
		||||
| direction | enum | Indicates the direction of `target` packets. Available vaules include `from` (the packets from `target`), `to` (the packets to `target`), and `both` ( the packets from or to `target`). This parameter makes Chaos only take effect for a specific direction of packets. | to | No | both |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides a parameter for the `mode` configuration, depending on `mode`. For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected. | None | No | ["nginx"] |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
 | 
			
		||||
### Description for `action`-related fields
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -159,12 +159,12 @@ For the Net Emulation and Bandwidth fault types, you can further configure the `
 | 
			
		|||
 | 
			
		||||
Setting `action` to `delay` means simulating network delay fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type              | Description                                                                 | Required | Required | Example |
 | 
			
		||||
| ----------- | ----------------- | --------------------------------------------------------------------------- | -------- | -------- | ------- |
 | 
			
		||||
| latency     | string            | Indicates the network latency                                               | No       | No       | 2ms     |
 | 
			
		||||
| correlation | string            | Indicates the correlation between the current latency and the previous one. | No       | No       | 0.5     |
 | 
			
		||||
| jitter      | string            | Indicates the range of the network latency                                  | No       | No       | 1ms     |
 | 
			
		||||
| reorder     | Reorder(#Reorder) | Indicates the status of network packet reordering                           |          | No       |         |
 | 
			
		||||
| Parameter | Type | Description | Required | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| latency | string | Indicates the network latency | No | No | 2ms |
 | 
			
		||||
| correlation | string | Indicates the correlation between the current latency and the previous one. | No | No | 0.5 |
 | 
			
		||||
| jitter | string | Indicates the range of the network latency | No | No | 1ms |
 | 
			
		||||
| reorder | Reorder(#Reorder) | Indicates the status of network packet reordering |  | No |  |
 | 
			
		||||
 | 
			
		||||
The computational model for `correlation` is as follows:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -188,38 +188,38 @@ The computational model for `correlation` is as follows:
 | 
			
		|||
 | 
			
		||||
Setting `action` to `reorder` means simulating network packet reordering fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                     | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| reorder     | string | Indicates the probability to reorder                                                                            | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between this time's length of delay time and the previous time's length of delay time | 0             | No       | 0.5     |
 | 
			
		||||
| gap         | int    | Indicates the gap before and after packet reordering                                                            | 0             | No       | 5       |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| reorder | string | Indicates the probability to reorder | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between this time's length of delay time and the previous time's length of delay time | 0 | No | 0.5 |
 | 
			
		||||
| gap | int | Indicates the gap before and after packet reordering | 0 | No | 5 |
 | 
			
		||||
 | 
			
		||||
#### loss
 | 
			
		||||
 | 
			
		||||
Setting `action` to `loss` means simulating packet loss fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                  | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------ | ------------- | -------- | ------- |
 | 
			
		||||
| loss        | string | Indicates the probability of packet loss                                                                     | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet loss and the previous time's packet loss | 0             | No       | 0.5     |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| loss | string | Indicates the probability of packet loss | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet loss and the previous time's packet loss | 0 | No | 0.5 |
 | 
			
		||||
 | 
			
		||||
#### duplicate
 | 
			
		||||
 | 
			
		||||
Set `action` to `duplicate`, meaning simulating package duplication. At this point, you can also set the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                                | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| duplicate   | string | Indicates the probability of packet duplicating                                                                            | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet duplicating and the previous time's packet duplicating | 0             | No       | 0.5     |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| duplicate | string | Indicates the probability of packet duplicating | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet duplicating and the previous time's packet duplicating | 0 | No | 0.5 |
 | 
			
		||||
 | 
			
		||||
#### corrupt
 | 
			
		||||
 | 
			
		||||
Setting `action` to `corrupt` means simulating package corruption fault. You can also configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter   | Type   | Description                                                                                                              | Default value | Required | Example |
 | 
			
		||||
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------ | ------------- | -------- | ------- |
 | 
			
		||||
| corrupt     | string | Indicates the probability of packet corruption                                                                           | 0             | No       | 0.5     |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet corruption and the previous time's packet corruption | 0             | No       | 0.5     |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| corrupt | string | Indicates the probability of packet corruption | 0 | No | 0.5 |
 | 
			
		||||
| correlation | string | Indicates the correlation between the probability of current packet corruption and the previous time's packet corruption | 0 | No | 0.5 |
 | 
			
		||||
 | 
			
		||||
For occasional events such as `reorder`, `loss`, `duplicate`, and `corrupt`, the `correlation` is more complicated. For specific model description, refer to [NetemCLG](http://web.archive.org/web/20200120162102/http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG).
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -227,12 +227,12 @@ For occasional events such as `reorder`, `loss`, `duplicate`, and `corrupt`, the
 | 
			
		|||
 | 
			
		||||
Setting `action` to `bandwidth` means simulating bandwidth limit fault. You also need to configure the following parameters.
 | 
			
		||||
 | 
			
		||||
| Parameter | Type   | Description                                                            | Default value | Required | Example |
 | 
			
		||||
| --------- | ------ | ---------------------------------------------------------------------- | ------------- | -------- | ------- |
 | 
			
		||||
| rate      | string | Indicates the rate of bandwidth limit                                  |               | Yes      | 1mbps   |
 | 
			
		||||
| limit     | string | Indicates the number of bytes waiting in queue                         |               | Yes      | 1       |
 | 
			
		||||
| buffer    | uint32 | Indicates the maximum number of bytes that can be sent instantaneously |               | Yes      | 1       |
 | 
			
		||||
| peakrate  | uint64 | Indicates the maximum consumption of `bucket` (usually not set)        |               | No       | 1       |
 | 
			
		||||
| minburst  | uint32 | Indicates the size of `peakrate bucket` (usually not set)              |               | No       | 1       |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| rate | string | Indicates the rate of bandwidth limit |  | Yes | 1mbps |
 | 
			
		||||
| limit | string | Indicates the number of bytes waiting in queue |  | Yes | 1 |
 | 
			
		||||
| buffer | uint32 | Indicates the maximum number of bytes that can be sent instantaneously |  | Yes | 1 |
 | 
			
		||||
| peakrate | uint64 | Indicates the maximum consumption of `bucket` (usually not set) |  | No | 1 |
 | 
			
		||||
| minburst | uint32 | Indicates the size of `peakrate bucket` (usually not set) |  | No | 1 |
 | 
			
		||||
 | 
			
		||||
For more details of these fields, you can refer to [tc-tbf document](https://man7.org/linux/man-pages/man8/tc-tbf.8.html).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -132,12 +132,12 @@ Before create experiments using Chaos Dashboard, ensure the following:
 | 
			
		|||
 | 
			
		||||
The following table describes the fields in the YAML configuration file.
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                 | Default value | Required | Example        |
 | 
			
		||||
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | -------------- |
 | 
			
		||||
| action         | string   | Specifies the fault type to inject. The supported types include `pod-failure`, `pod-kill`, and `container-kill`.                                                                                                                                                                                                                                                            | None          | Yes      | `pod-kill`     |
 | 
			
		||||
| mode           | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None          | Yes      | `1`            |
 | 
			
		||||
| value          | string   | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                         | None          | No       | 2              |
 | 
			
		||||
| selector       | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                          | None          | Yes      |                |
 | 
			
		||||
| containerNames | []string | When you configure `action` to `container-killed`, this configuration is mandatory to specify the target container name for injecting faults.                                                                                                                                                                                                                               | None          | No       | ['prometheus'] |
 | 
			
		||||
| gracePeriod    | int64    | When you configure `action` to `pod-kill`, this configuration is mandatory to specify the duration before deleting Pod.                                                                                                                                                                                                                                                     | 0             | No       | 0              |
 | 
			
		||||
| duration       | string   | Specifies the duration of the experiment.                                                                                                                                                                                                                                                                                                                                   | None          | Yes      | 30s            |
 | 
			
		||||
| Parameter | Type | Description | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| action | string | Specifies the fault type to inject. The supported types include `pod-failure`, `pod-kill`, and `container-kill`. | None | Yes | `pod-kill` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
| containerNames | []string | When you configure `action` to `container-killed`, this configuration is mandatory to specify the target container name for injecting faults. | None | No | ['prometheus'] |
 | 
			
		||||
| gracePeriod | int64 | When you configure `action` to `pod-kill`, this configuration is mandatory to specify the duration before deleting Pod. | 0 | No | 0 |
 | 
			
		||||
| duration | string | Specifies the duration of the experiment. | None | Yes | 30s |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,11 +52,11 @@ You can create experiments in Chaos Dashboard or using the YAML configuration fi
 | 
			
		|||
 | 
			
		||||
The fields in the YAML configuration file are described in the following table:
 | 
			
		||||
 | 
			
		||||
| Parameter      | Type     | Note                                                                                                                                                                                                                                                                                                                                                                        | Default value        | Required | Example                                 |
 | 
			
		||||
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------- | --------------------------------------- |
 | 
			
		||||
| timeOffset     | string   | Specifies the length of time offset.                                                                                                                                                                                                                                                                                                                                        | None                 | Yes      | `-5m`                                   |
 | 
			
		||||
| clockIds       | []string | Specifies the ID of clock that will be offset. See the [<clock>clock_gettime</clock> documentation](https://man7.org/linux/man-pages/man2/clock_gettime.2.html) for details.                                                                                                                                                                                                | `["CLOCK_REALTIME"]` | No       | `["CLOCK_REALTIME", "CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode           | string   | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None                 | Yes      | `1`                                     |
 | 
			
		||||
| value          | string   | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods.                                                                                                                                                                                                         | None                 | No       | 2                                       |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected.                                                                                                                                                                                                                                                                                                       | None                 | No       | `["nginx"]`                             |
 | 
			
		||||
| selector       | struct   | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md).                                                                                                                                                                                                                                                          | None                 | Yes      |                                         |
 | 
			
		||||
| Parameter | Type | Note | Default value | Required | Example |
 | 
			
		||||
| --- | --- | --- | --- | --- | --- |
 | 
			
		||||
| timeOffset | string | Specifies the length of time offset. | None | Yes | `-5m` |
 | 
			
		||||
| clockIds | []string | Specifies the ID of clock that will be offset. See the [<clock>clock_gettime</clock> documentation](https://man7.org/linux/man-pages/man2/clock_gettime.2.html) for details. | `["CLOCK_REALTIME"]` | No | `["CLOCK_REALTIME", "CLOCK_MONOTONIC"]` |
 | 
			
		||||
| mode | string | Specifies the mode of the experiment. The mode options include `one` (selecting a random Pod), `all` (selecting all eligible Pods), `fixed` (selecting a specified number of eligible Pods), `fixed-percent` (selecting a specified percentage of Pods from the eligible Pods), and `random-max-percent` (selecting the maximum percentage of Pods from the eligible Pods). | None | Yes | `one` |
 | 
			
		||||
| value | string | Provides parameters for the `mode` configuration, depending on `mode`.For example, when `mode` is set to `fixed-percent`, `value` specifies the percentage of Pods. | None | No | 1 |
 | 
			
		||||
| containerNames | []string | Specifies the name of the container into which the fault is injected. | None | No | `["nginx"]` |
 | 
			
		||||
| selector | struct | Specifies the target Pod. For details, refer to [Define the experiment scope](./define-chaos-experiment-scope.md). | None | Yes |  |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue