Skip to content

Commit

Permalink
[Cherry-Pick for 1.13.5] (#362)
Browse files Browse the repository at this point in the history
* chore(crds): updating the crds (#359)

Signed-off-by: shubhamchaudhary <[email protected]>

* chore(annotation): converting default annotation check to false (#360)

Signed-off-by: shubhamchaudhary <[email protected]>

* crds(validation): Adding openapi validation for tolerations (#363)

Signed-off-by: shubhamchaudhary <[email protected]>

Co-authored-by: Shubham Chaudhary <[email protected]>
  • Loading branch information
Karthik Satchitanand and ispeakc0de authored May 15, 2021
1 parent 648c0d8 commit 4b0afaf
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 9 deletions.
65 changes: 61 additions & 4 deletions deploy/chaos_crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
type:
type: string
pattern: ^(go)$
runnerAnnotation:
runnerAnnotations:
type: object
additionalProperties:
type: string
Expand All @@ -85,6 +85,29 @@ spec:
value:
type: string
minLength: 1
tolerations:
description: Pod's tolerations.
items:
description: The pod with this Toleration tolerates any taint matches the <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: Effect to match. Empty means all effects.
type: string
key:
description: Taint key the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists.
type: string
operator:
description: Operators are Exists or Equal. Defaults to Equal.
type: string
tolerationSeconds:
description: Period of time the toleration tolerates the taint.
format: int64
type: integer
value:
description: If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
experiments:
type: array
items:
Expand Down Expand Up @@ -227,6 +250,7 @@ spec:
data:
type: string
components:
x-kubernetes-preserve-unknown-fields: true
type: object
properties:
statusCheckTimeouts:
Expand All @@ -238,7 +262,17 @@ spec:
type: integer
nodeSelector:
type: object
minLength: 1
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
experimentImage:
type: string
env:
Expand Down Expand Up @@ -374,7 +408,7 @@ spec:
type: string
mountPath:
type: string
experimentAnnotation:
experimentAnnotations:
type: object
additionalProperties:
type: string
Expand All @@ -387,6 +421,29 @@ spec:
type: string
minLength: 1
allowEmptyValue: false
tolerations:
description: Pod's tolerations.
items:
description: The pod with this Toleration tolerates any taint matches the <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: Effect to match. Empty means all effects.
type: string
key:
description: Taint key the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists.
type: string
operator:
description: Operators are Exists or Equal. Defaults to Equal.
type: string
tolerationSeconds:
description: Period of time the toleration tolerates the taint.
format: int64
type: integer
value:
description: If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array

status:
x-kubernetes-preserve-unknown-fields: true
Expand Down Expand Up @@ -435,10 +492,10 @@ spec:
x-kubernetes-preserve-unknown-fields: true
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
type: object
properties:
definition:
x-kubernetes-preserve-unknown-fields: true
type: object
properties:
args:
Expand Down
63 changes: 60 additions & 3 deletions deploy/crds/chaosengine_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
type:
type: string
pattern: ^(go)$
runnerAnnotation:
runnerAnnotations:
type: object
additionalProperties:
type: string
Expand All @@ -84,6 +84,29 @@ spec:
value:
type: string
minLength: 1
tolerations:
description: Pod's tolerations.
items:
description: The pod with this Toleration tolerates any taint matches the <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: Effect to match. Empty means all effects.
type: string
key:
description: Taint key the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists.
type: string
operator:
description: Operators are Exists or Equal. Defaults to Equal.
type: string
tolerationSeconds:
description: Period of time the toleration tolerates the taint.
format: int64
type: integer
value:
description: If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
experiments:
type: array
items:
Expand Down Expand Up @@ -226,6 +249,7 @@ spec:
data:
type: string
components:
x-kubernetes-preserve-unknown-fields: true
type: object
properties:
statusCheckTimeouts:
Expand All @@ -237,7 +261,17 @@ spec:
type: integer
nodeSelector:
type: object
minLength: 1
additionalProperties:
type: string
properties:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
experimentImage:
type: string
env:
Expand Down Expand Up @@ -373,7 +407,7 @@ spec:
type: string
mountPath:
type: string
experimentAnnotation:
experimentAnnotations:
type: object
additionalProperties:
type: string
Expand All @@ -386,6 +420,29 @@ spec:
type: string
minLength: 1
allowEmptyValue: false
tolerations:
description: Pod's tolerations.
items:
description: The pod with this Toleration tolerates any taint matches the <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: Effect to match. Empty means all effects.
type: string
key:
description: Taint key the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists.
type: string
operator:
description: Operators are Exists or Equal. Defaults to Equal.
type: string
tolerationSeconds:
description: Period of time the toleration tolerates the taint.
format: int64
type: integer
value:
description: If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array

status:
x-kubernetes-preserve-unknown-fields: true
Expand Down
2 changes: 1 addition & 1 deletion deploy/crds/chaosexperiment_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ spec:
x-kubernetes-preserve-unknown-fields: true
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
type: object
properties:
definition:
x-kubernetes-preserve-unknown-fields: true
type: object
properties:
args:
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var (
AppLabelKey string

// DefaultAnnotationCheck contains the default value (true) of the annotationCheck
DefaultAnnotationCheck = "true"
DefaultAnnotationCheck = "false"

// AppLabelValue contains the application label value
AppLabelValue string
Expand Down

0 comments on commit 4b0afaf

Please sign in to comment.