Skip to content

Commit 581c60d

Browse files
cihangirbesiktasLuis Davim
authored and
Luis Davim
committed
Added delaySeconds field to healthchecks
1 parent 852694f commit 581c60d

File tree

3 files changed

+28
-13
lines changed

3 files changed

+28
-13
lines changed

health.go

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type HealthCheck struct {
2727
GracePeriodSeconds int `json:"gracePeriodSeconds,omitempty"`
2828
IntervalSeconds int `json:"intervalSeconds,omitempty"`
2929
TimeoutSeconds int `json:"timeoutSeconds,omitempty"`
30+
DelaySeconds int `json:"delaySeconds,omitempty"`
3031
IgnoreHTTP1xx *bool `json:"ignoreHttp1xx,omitempty"`
3132
}
3233

@@ -109,6 +110,7 @@ func NewDefaultHealthCheck() *HealthCheck {
109110
GracePeriodSeconds: 30,
110111
IntervalSeconds: 10,
111112
TimeoutSeconds: 5,
113+
DelaySeconds: 15,
112114
}
113115
}
114116

tests/app-definitions/TestApplicationString-output.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"protocol": "HTTP",
3535
"gracePeriodSeconds": 30,
3636
"intervalSeconds": 5,
37-
"timeoutSeconds": 5
37+
"timeoutSeconds": 5,
38+
"delaySeconds": 15
3839
}
3940
],
4041
"instances": 2,

tests/rest-api/methods.yml

+24-12
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
"path": "/",
5252
"portIndex": 0,
5353
"protocol": "HTTP",
54-
"timeoutSeconds": 5
54+
"timeoutSeconds": 5,
55+
"delaySeconds": 15
5556
}
5657
],
5758
"id": "/fake-app",
@@ -126,7 +127,8 @@
126127
"path": "/",
127128
"portIndex": 0,
128129
"protocol": "HTTP",
129-
"timeoutSeconds": 20
130+
"timeoutSeconds": 20,
131+
"delaySeconds": 15
130132
}
131133
],
132134
"id": "/fake-app",
@@ -194,7 +196,8 @@
194196
"path": "/",
195197
"portIndex": 0,
196198
"protocol": "HTTP",
197-
"timeoutSeconds": 20
199+
"timeoutSeconds": 20,
200+
"delaySeconds": 15
198201
}
199202
],
200203
"id": "/fake-app-broken",
@@ -342,7 +345,8 @@
342345
"path": "/health",
343346
"portIndex": 0,
344347
"protocol": "HTTP",
345-
"timeoutSeconds": 10
348+
"timeoutSeconds": 10,
349+
"delaySeconds": 15
346350
}
347351
],
348352
"id": "/fake-app",
@@ -463,7 +467,8 @@
463467
"path": "/health",
464468
"portIndex": 0,
465469
"protocol": "HTTP",
466-
"timeoutSeconds": 10
470+
"timeoutSeconds": 10,
471+
"delaySeconds": 15
467472
}
468473
],
469474
"id": "/fake-app",
@@ -597,7 +602,8 @@
597602
"path": "/health",
598603
"portIndex": 0,
599604
"protocol": "HTTP",
600-
"timeoutSeconds": 10
605+
"timeoutSeconds": 10,
606+
"delaySeconds": 15
601607
}
602608
],
603609
"id": "/fake-app-broken",
@@ -1405,7 +1411,8 @@
14051411
"intervalSeconds": 10,
14061412
"portIndex": 0,
14071413
"timeoutSeconds": 10,
1408-
"maxConsecutiveFailures": 3
1414+
"maxConsecutiveFailures": 3,
1415+
"delaySeconds": 15
14091416
}
14101417
],
14111418
"id": "apache",
@@ -1442,7 +1449,8 @@
14421449
"gracePeriodSeconds": 10,
14431450
"intervalSeconds": 10,
14441451
"timeoutSeconds": 5,
1445-
"maxConsecutiveFailures": 2
1452+
"maxConsecutiveFailures": 2,
1453+
"delaySeconds": 15
14461454
}
14471455
],
14481456
"id": "mysql",
@@ -1479,7 +1487,8 @@
14791487
"gracePeriodSeconds": 10,
14801488
"intervalSeconds": 10,
14811489
"timeoutSeconds": 5,
1482-
"maxConsecutiveFailures": 2
1490+
"maxConsecutiveFailures": 2,
1491+
"delaySeconds": 15
14831492
}
14841493
],
14851494
"id": "caching",
@@ -1839,7 +1848,8 @@
18391848
"path": "/",
18401849
"portIndex": 0,
18411850
"protocol": "HTTP",
1842-
"timeoutSeconds": 20
1851+
"timeoutSeconds": 20,
1852+
"delaySeconds": 15
18431853
}
18441854
],
18451855
"id": "/fake-app",
@@ -1906,7 +1916,8 @@
19061916
"path": "/",
19071917
"portIndex": 0,
19081918
"protocol": "HTTP",
1909-
"timeoutSeconds": 20
1919+
"timeoutSeconds": 20,
1920+
"delaySeconds": 15
19101921
}
19111922
],
19121923
"id": "/fake-app-broken",
@@ -1943,7 +1954,8 @@
19431954
"path": "/health",
19441955
"portIndex": 0,
19451956
"protocol": "HTTP",
1946-
"timeoutSeconds": 10
1957+
"timeoutSeconds": 10,
1958+
"delaySeconds": 15
19471959
}
19481960
],
19491961
"id": "/no-health-check-results-app",

0 commit comments

Comments
 (0)