Skip to content

Commit 14a962b

Browse files
cihangirbesiktasLuis Davim
authored and
Luis Davim
committed
Added delaySeconds field to healthchecks
1 parent 1c72a8e commit 14a962b

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

@@ -80,6 +81,7 @@ func NewDefaultHealthCheck() *HealthCheck {
8081
GracePeriodSeconds: 30,
8182
IntervalSeconds: 10,
8283
TimeoutSeconds: 5,
84+
DelaySeconds: 15,
8385
}
8486
}
8587

tests/app-definitions/TestApplicationString-output.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"protocol": "HTTP",
3939
"gracePeriodSeconds": 30,
4040
"intervalSeconds": 5,
41-
"timeoutSeconds": 5
41+
"timeoutSeconds": 5,
42+
"delaySeconds": 15
4243
}
4344
],
4445
"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",
@@ -117,7 +118,8 @@
117118
"path": "/",
118119
"portIndex": 0,
119120
"protocol": "HTTP",
120-
"timeoutSeconds": 20
121+
"timeoutSeconds": 20,
122+
"delaySeconds": 15
121123
}
122124
],
123125
"id": "/fake-app",
@@ -180,7 +182,8 @@
180182
"path": "/",
181183
"portIndex": 0,
182184
"protocol": "HTTP",
183-
"timeoutSeconds": 20
185+
"timeoutSeconds": 20,
186+
"delaySeconds": 15
184187
}
185188
],
186189
"id": "/fake-app-broken",
@@ -324,7 +327,8 @@
324327
"path": "/health",
325328
"portIndex": 0,
326329
"protocol": "HTTP",
327-
"timeoutSeconds": 10
330+
"timeoutSeconds": 10,
331+
"delaySeconds": 15
328332
}
329333
],
330334
"id": "/fake-app",
@@ -440,7 +444,8 @@
440444
"path": "/health",
441445
"portIndex": 0,
442446
"protocol": "HTTP",
443-
"timeoutSeconds": 10
447+
"timeoutSeconds": 10,
448+
"delaySeconds": 15
444449
}
445450
],
446451
"id": "/fake-app",
@@ -569,7 +574,8 @@
569574
"path": "/health",
570575
"portIndex": 0,
571576
"protocol": "HTTP",
572-
"timeoutSeconds": 10
577+
"timeoutSeconds": 10,
578+
"delaySeconds": 15
573579
}
574580
],
575581
"id": "/fake-app-broken",
@@ -793,7 +799,8 @@
793799
"intervalSeconds": 10,
794800
"portIndex": 0,
795801
"timeoutSeconds": 10,
796-
"maxConsecutiveFailures": 3
802+
"maxConsecutiveFailures": 3,
803+
"delaySeconds": 15
797804
}
798805
],
799806
"id": "apache",
@@ -830,7 +837,8 @@
830837
"gracePeriodSeconds": 10,
831838
"intervalSeconds": 10,
832839
"timeoutSeconds": 5,
833-
"maxConsecutiveFailures": 2
840+
"maxConsecutiveFailures": 2,
841+
"delaySeconds": 15
834842
}
835843
],
836844
"id": "mysql",
@@ -867,7 +875,8 @@
867875
"gracePeriodSeconds": 10,
868876
"intervalSeconds": 10,
869877
"timeoutSeconds": 5,
870-
"maxConsecutiveFailures": 2
878+
"maxConsecutiveFailures": 2,
879+
"delaySeconds": 15
871880
}
872881
],
873882
"id": "caching",
@@ -1227,7 +1236,8 @@
12271236
"path": "/",
12281237
"portIndex": 0,
12291238
"protocol": "HTTP",
1230-
"timeoutSeconds": 20
1239+
"timeoutSeconds": 20,
1240+
"delaySeconds": 15
12311241
}
12321242
],
12331243
"id": "/fake-app",
@@ -1290,7 +1300,8 @@
12901300
"path": "/",
12911301
"portIndex": 0,
12921302
"protocol": "HTTP",
1293-
"timeoutSeconds": 20
1303+
"timeoutSeconds": 20,
1304+
"delaySeconds": 15
12941305
}
12951306
],
12961307
"id": "/fake-app-broken",
@@ -1327,7 +1338,8 @@
13271338
"path": "/health",
13281339
"portIndex": 0,
13291340
"protocol": "HTTP",
1330-
"timeoutSeconds": 10
1341+
"timeoutSeconds": 10,
1342+
"delaySeconds": 15
13311343
}
13321344
],
13331345
"id": "/no-health-check-results-app",

0 commit comments

Comments
 (0)