Skip to content

Commit 08ff19f

Browse files
authored
Add check definition interval ms to lrp 185036553 (#68)
* Add interval_ms param for health check definitions This change allows the interval for the health checks to be defined and configured in the check definiton of the LRP. Previously, this value was always filled in with a default when the health checks were created, now the checks can define their own interval that can be used when actually creating the checks (in the executor). Checks are now of the form: ```diff "check_definition": { "checks": [ { "http_check": { "port": 8080, "path": "/health", - "request_timeout_ms": 10000 + "request_timeout_ms": 10000, + "interval_ms": 123 }, } ], "readiness_checks": [ { "tcp_check": { "port": 8080, - "connect_timeout_ms": 10000 + "connect_timeout_ms": 10000, + "interval_ms": 123 }, } ], "log_source": "" }, ``` Check json example adapted from our design document (Publicly Accessible): https://docs.google.com/document/d/1AS8GzKg3pdAv56nySQTgF4NaqqzrBwmztkL2_8ahKa4/edit?usp=sharing Signed-off-by: Marc Paquette <[email protected]> [#185036553](https://www.pivotaltracker.com/story/show/185036553) Signed-off-by: Josh Russett <[email protected]> Signed-off-by: Marc Paquette <[email protected]> * Do not modify actual_lrp We don't need to touch the actual_lrp at all for the interval_ms changes. This file got updated when we were generating new protobuf stuff for the changes to the desired_lrp. This will eventually get updated by the dynamic tracing PRs, so we aren't missing anything. [#185036553](https://www.pivotaltracker.com/story/show/185036553) --------- Signed-off-by: Josh Russett <[email protected]> Signed-off-by: Marc Paquette <[email protected]>
1 parent 5439137 commit 08ff19f

File tree

2 files changed

+110
-26
lines changed

2 files changed

+110
-26
lines changed

models/check_definition.pb.go

Lines changed: 108 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/check_definition.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ message Check {
2121
message TCPCheck {
2222
uint32 port = 1 [(gogoproto.jsontag) = "port"];
2323
uint64 connect_timeout_ms = 2;
24+
uint64 interval_ms = 3;
2425
}
2526

2627
message HTTPCheck {
2728
uint32 port = 1 [(gogoproto.jsontag) = "port"];
2829
uint64 request_timeout_ms = 2;
2930
string path = 3 [(gogoproto.jsontag) = "path"];
31+
uint64 interval_ms = 4;
3032
}

0 commit comments

Comments
 (0)