Skip to content

Commit c583b2b

Browse files
committed
chore(unit): Adding units to the duration fields (#459)
Signed-off-by: Shubham Chaudhary <shubham.chaudhary@harness.io>
1 parent 184224e commit c583b2b

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

api/litmuschaos/v1alpha1/chaosengine_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type ChaosEngineSpec struct {
2929
Appinfo ApplicationParams `json:"appinfo,omitempty"`
3030
//DefaultHealthCheck defines whether default health checks should be executed or not. It can be true or false
3131
// default value is true
32-
DefaultHealthCheck string `json:"defaultHealthCheck,omitempty"`
32+
DefaultHealthCheck bool `json:"defaultHealthCheck,omitempty"`
3333
//ChaosServiceAccount is the SvcAcc specified for chaos runner pods
3434
ChaosServiceAccount string `json:"chaosServiceAccount"`
3535
//Components contains the image, imagePullPolicy, arguments, and commands of runner
@@ -419,21 +419,21 @@ type PostMethod struct {
419419
// RunProperty contains timeout, retry and interval for the probe
420420
type RunProperty struct {
421421
//ProbeTimeout contains timeout for the probe
422-
ProbeTimeout int `json:"probeTimeout,omitempty"`
422+
ProbeTimeout string `json:"probeTimeout,omitempty"`
423423
// Interval contains the interval for the probe
424-
Interval int `json:"interval,omitempty"`
424+
Interval string `json:"interval,omitempty"`
425425
// Retry contains the retry count for the probe
426426
Retry int `json:"retry,omitempty"`
427427
// Attempt contains the total attempt count for the probe
428428
Attempt int `json:"attempt,omitempty"`
429429
//ProbePollingInterval contains time interval, for which continuous probe should be sleep
430430
// after each iteration
431-
ProbePollingInterval int `json:"probePollingInterval,omitempty"`
431+
ProbePollingInterval string `json:"probePollingInterval,omitempty"`
432432
//InitialDelaySeconds time interval for which probe will wait before run
433-
InitialDelaySeconds int `json:"initialDelaySeconds,omitempty"`
433+
InitialDelay string `json:"initialDelay,omitempty"`
434434
// EvaluationTimeout is the timeout window in which the SLO metrics
435435
// will be fetched and will be evaluated
436-
EvaluationTimeout int `json:"evaluationTimeout,omitempty"`
436+
EvaluationTimeout string `json:"evaluationTimeout,omitempty"`
437437
// StopOnFailure contains flag to stop/continue experiment execution, if probe fails
438438
// it will stop the experiment execution, if provided true
439439
// it will continue the experiment execution, if provided false or not provided(default case)

deploy/chaos_crds.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ spec:
4141
# - pattern: '^delete$'
4242
# - pattern: '^retain$'
4343
defaultHealthCheck:
44-
type: string
45-
pattern: ^(true|false)$
44+
type: boolean
4645
appinfo:
4746
type: object
4847
properties:
@@ -2229,19 +2228,19 @@ spec:
22292228
- interval
22302229
properties:
22312230
evaluationTimeout:
2232-
type: integer
2231+
type: string
22332232
probeTimeout:
2234-
type: integer
2233+
type: string
22352234
interval:
2236-
type: integer
2235+
type: string
22372236
retry:
22382237
type: integer
22392238
attempt:
22402239
type: integer
22412240
probePollingInterval:
2242-
type: integer
2243-
initialDelaySeconds:
2244-
type: integer
2241+
type: string
2242+
initialDelay:
2243+
type: string
22452244
stopOnFailure:
22462245
type: boolean
22472246
sloProbe/inputs:

deploy/crds/chaosengine_crd.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ spec:
4040
# - pattern: '^delete$'
4141
# - pattern: '^retain$'
4242
defaultHealthCheck:
43-
type: string
44-
pattern: ^(true|false)$
43+
type: boolean
4544
appinfo:
4645
type: object
4746
properties:
@@ -2227,19 +2226,19 @@ spec:
22272226
- interval
22282227
properties:
22292228
evaluationTimeout:
2230-
type: integer
2229+
type: string
22312230
probeTimeout:
2232-
type: integer
2231+
type: string
22332232
interval:
2234-
type: integer
2233+
type: string
22352234
retry:
22362235
type: integer
22372236
attempt:
22382237
type: integer
22392238
probePollingInterval:
2240-
type: integer
2241-
initialDelaySeconds:
2242-
type: integer
2239+
type: string
2240+
initialDelay:
2241+
type: string
22432242
stopOnFailure:
22442243
type: boolean
22452244
sloProbe/inputs:

0 commit comments

Comments
 (0)