Skip to content

Commit

Permalink
fix: sync PhysicalMachineChaos to API client and forms (chaos-mesh#3660)
Browse files Browse the repository at this point in the history
* fix: sync PhysicalMachineChaos to API client and forms

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update changelog

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
  • Loading branch information
g1eny0ung and ti-chi-bot committed Sep 21, 2022
1 parent 211d374 commit 7e291d2
Show file tree
Hide file tree
Showing 10 changed files with 1,687 additions and 65 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/
### Fixed

- Remove `limit` action of `BlockChaos` in the dashboard [#3655](https://github.com/chaos-mesh/chaos-mesh/pull/3655)
- Sync PhysicalMachineChaos to API client and forms [#3660](https://github.com/chaos-mesh/chaos-mesh/pull/3660)

### Security

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/physical_machine_chaos_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type PhysicalMachineChaos struct {

// PhysicalMachineChaosSpec defines the desired state of PhysicalMachineChaos
type PhysicalMachineChaosSpec struct {
// +kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined;
// +kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined
Action PhysicalMachineChaosAction `json:"action"`

PhysicalMachineSelector `json:",inline"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/dashboard/swaggerdocs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6511,7 +6511,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"action": {
"description": "+kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined;",
"description": "+kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined",
"type": "string"
},
"address": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/dashboard/swaggerdocs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6503,7 +6503,7 @@
"type": "object",
"properties": {
"action": {
"description": "+kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined;",
"description": "+kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined",
"type": "string"
},
"address": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/dashboard/swaggerdocs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4705,7 +4705,7 @@ definitions:
v1alpha1.PhysicalMachineChaosSpec:
properties:
action:
description: +kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined;
description: +kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined
type: string
address:
description: |-
Expand Down
7 changes: 7 additions & 0 deletions ui/app/src/formik/KernelChaos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

export const actions = [],
data = [
{
field: 'label',
label: 'containerNames',
value: [],
helperText:
'Optional. ContainerNames indicates list of the name of affected container. If not set, the first container will be injected',
},
{
field: 'ref',
label: 'failKernRequest',
Expand Down
Loading

0 comments on commit 7e291d2

Please sign in to comment.