Skip to content

Commit

Permalink
chore(openapi): update the openapi validation for crds (#312)
Browse files Browse the repository at this point in the history
Signed-off-by: shubhamchaudhary <[email protected]>
  • Loading branch information
ispeakc0de authored Dec 11, 2020
1 parent 57fddee commit 09740d8
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 30 deletions.
61 changes: 45 additions & 16 deletions deploy/chaos_crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ spec:
pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
applabel:
type: string
pattern: (([a-z0-9A-Z_\.-/]+)=([a-z0-9A-Z_\.-/_]+)|^$)
appns:
type: string
auxiliaryAppInfo:
Expand Down Expand Up @@ -78,11 +77,9 @@ spec:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
experiments:
type: array
items:
Expand All @@ -102,6 +99,8 @@ spec:
type: string
type:
type: string
minLength: 1
pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
k8sProbe/inputs:
type: object
properties:
Expand All @@ -120,24 +119,51 @@ spec:
type: string
labelSelector:
type: string
expectedResult:
type: string
cmdProbe/inputs:
type: object
properties:
command:
type: string
expectedResult:
type: string
minLength: 1
comparator:
type: object
properties:
type:
type: string
minLength: 1
pattern: ^(int|float|string)$
criteria:
type: string
value:
type: string
source:
type: string
minLength: 1
httpProbe/inputs:
type: object
properties:
url:
type: string
minLength: 1
expectedResponseCode:
type: string
minLength: 1
promProbe/inputs:
type: object
properties:
endpoint:
type: string
query:
type: string
queryPath:
type: string
comparator:
type: object
properties:
criteria:
type: string
value:
type: string
runProperties:
type: object
properties:
Expand All @@ -147,8 +173,20 @@ spec:
type: integer
retry:
type: integer
probePollingInterval:
type: integer
initialDelaySeconds:
type: integer
mode:
type: string
pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
minLength: 1
operation:
type: string
pattern: ^(present|absent|create|delete)$
minLength: 1
data:
type: string
components:
type: object
properties:
Expand Down Expand Up @@ -304,11 +342,9 @@ spec:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false


status:
Expand Down Expand Up @@ -517,11 +553,9 @@ spec:
properties:
name:
type: string
allowEmptyValue: false
minLength: 1
mountPath:
type: string
allowEmptyValue: false
minLength: 1
secrets:
type: array
Expand All @@ -531,11 +565,9 @@ spec:
properties:
name:
type: string
allowEmptyValue: false
minLength: 1
mountPath:
type: string
allowEmptyValue: false
minLength: 1
hostFileVolumes:
type: array
Expand All @@ -545,15 +577,12 @@ spec:
properties:
name:
type: string
allowEmptyValue: false
minLength: 1
mountPath:
type: string
allowEmptyValue: false
minLength: 1
nodePath:
type: string
allowEmptyValue: false
minLength: 1
securityContext:
type: object
Expand Down
52 changes: 45 additions & 7 deletions deploy/crds/chaosengine_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ spec:
pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
applabel:
type: string
pattern: (([a-z0-9A-Z_\.-/]+)=([a-z0-9A-Z_\.-/_]+)|^$)
appns:
type: string
auxiliaryAppInfo:
Expand Down Expand Up @@ -77,11 +76,9 @@ spec:
key:
type: string
minLength: 1
allowEmptyValue: false
value:
type: string
minLength: 1
allowEmptyValue: false
experiments:
type: array
items:
Expand All @@ -101,6 +98,8 @@ spec:
type: string
type:
type: string
minLength: 1
pattern: ^(k8sProbe|httpProbe|cmdProbe|promProbe)$
k8sProbe/inputs:
type: object
properties:
Expand All @@ -119,24 +118,51 @@ spec:
type: string
labelSelector:
type: string
expectedResult:
type: string
cmdProbe/inputs:
type: object
properties:
command:
type: string
expectedResult:
type: string
minLength: 1
comparator:
type: object
properties:
type:
type: string
minLength: 1
pattern: ^(int|float|string)$
criteria:
type: string
value:
type: string
source:
type: string
minLength: 1
httpProbe/inputs:
type: object
properties:
url:
type: string
minLength: 1
expectedResponseCode:
type: string
minLength: 1
promProbe/inputs:
type: object
properties:
endpoint:
type: string
query:
type: string
queryPath:
type: string
comparator:
type: object
properties:
criteria:
type: string
value:
type: string
runProperties:
type: object
properties:
Expand All @@ -146,8 +172,20 @@ spec:
type: integer
retry:
type: integer
probePollingInterval:
type: integer
initialDelaySeconds:
type: integer
mode:
type: string
pattern: ^(SOT|EOT|Edge|Continuous|OnChaos)$
minLength: 1
operation:
type: string
pattern: ^(present|absent|create|delete)$
minLength: 1
data:
type: string
components:
type: object
properties:
Expand Down
7 changes: 0 additions & 7 deletions deploy/crds/chaosexperiment_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,9 @@ spec:
properties:
name:
type: string
allowEmptyValue: false
minLength: 1
mountPath:
type: string
allowEmptyValue: false
minLength: 1
secrets:
type: array
Expand All @@ -210,11 +208,9 @@ spec:
properties:
name:
type: string
allowEmptyValue: false
minLength: 1
mountPath:
type: string
allowEmptyValue: false
minLength: 1
hostFileVolumes:
type: array
Expand All @@ -224,15 +220,12 @@ spec:
properties:
name:
type: string
allowEmptyValue: false
minLength: 1
mountPath:
type: string
allowEmptyValue: false
minLength: 1
nodePath:
type: string
allowEmptyValue: false
minLength: 1
securityContext:
type: object
Expand Down

0 comments on commit 09740d8

Please sign in to comment.