Skip to content

Commit

Permalink
fix: cilium chaos duration should be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
miketonks-form3 committed Jan 11, 2024
1 parent f6fed14 commit a271a67
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 34 deletions.
3 changes: 2 additions & 1 deletion api/v1alpha1/ciliumchaos_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ type CiliumChaosSpec struct {
NodeSelector `json:",inline"`

// Duration represents the duration of the chaos action.
Duration *string `json:"duration" webhook:"Duration"`
// +optional
Duration *string `json:"duration,omitempty" webhook:"Duration"`

// CiliumPodSelector provides a custom selector to find the cilium-agent pod for the node.
//
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/chaos-mesh.org_ciliumchaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
3 changes: 0 additions & 3 deletions config/crd/bases/chaos-mesh.org_schedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -3984,7 +3983,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -7445,7 +7443,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/chaos-mesh.org_workflownodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -3621,7 +3620,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -7318,7 +7316,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -10882,7 +10879,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
2 changes: 0 additions & 2 deletions config/crd/bases/chaos-mesh.org_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -3764,7 +3763,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
1 change: 0 additions & 1 deletion helm/chaos-mesh/crds/chaos-mesh.org_ciliumchaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
3 changes: 0 additions & 3 deletions helm/chaos-mesh/crds/chaos-mesh.org_schedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -3984,7 +3983,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -7445,7 +7443,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
4 changes: 0 additions & 4 deletions helm/chaos-mesh/crds/chaos-mesh.org_workflownodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -3621,7 +3620,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -7318,7 +7316,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -10882,7 +10879,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
2 changes: 0 additions & 2 deletions helm/chaos-mesh/crds/chaos-mesh.org_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -3764,7 +3763,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down
10 changes: 0 additions & 10 deletions manifests/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -6588,7 +6587,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -10201,7 +10199,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -13662,7 +13659,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -23697,7 +23693,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -26937,7 +26932,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -30634,7 +30628,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -34198,7 +34191,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -48596,7 +48588,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
Expand Down Expand Up @@ -51961,7 +51952,6 @@ spec:
type: string
required:
- ciliumPodSelector
- duration
- mode
- selector
type: object
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 @@ -5534,7 +5534,7 @@ const docTemplate = `{
"$ref": "#/definitions/v1alpha1.CiliumPodSelectorSpec"
},
"duration": {
"description": "Duration represents the duration of the chaos action.",
"description": "Duration represents the duration of the chaos action.\n+optional",
"type": "string"
},
"mode": {
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 @@ -5526,7 +5526,7 @@
"$ref": "#/definitions/v1alpha1.CiliumPodSelectorSpec"
},
"duration": {
"description": "Duration represents the duration of the chaos action.",
"description": "Duration represents the duration of the chaos action.\n+optional",
"type": "string"
},
"mode": {
Expand Down
4 changes: 3 additions & 1 deletion pkg/dashboard/swaggerdocs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3965,7 +3965,9 @@ definitions:
`app.kubernetes.io/name=cilium-agent` and `app.kubernetes.io/part-of=cilium` (which are used by default by the cilium
helm chart)
duration:
description: Duration represents the duration of the chaos action.
description: |-
Duration represents the duration of the chaos action.
+optional
type: string
mode:
description: |-
Expand Down

0 comments on commit a271a67

Please sign in to comment.