Consul: query service by specific health states
See original GitHub issueThe consul namer currently allows filtering nodes by a binary health status via the useHealthCheck
parameter. Consul however has the concept of passing
, warning
and critical
health statuses, the consul API can also be queried with the any
state where no filtering is desired.
A new parameter (like healthCheckStatuses
?) could be added to the consul namer to allow more precise filtering of consul nodes by one or more health statuses, passed as a comma separated list.
We are particularly interested in this feature so that we can implement a fall back pool for a service which includes only nodes in the warning state (and not the critical state). See also https://discourse.linkerd.io/t/configuring-a-fall-back-consul-namer/243/3.
The consul API does not currently allow for listing a services nodes directly by health status, but does include the health statuses of each node in a separate top level array which could be used to filter results. Such an approach is used in consul template for example.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Hi @amitsaha, @adleong is currently out of the office. I’m running point on the 1.2.0 release & would be happy to go over your PR if you like. When it’s ready for review, we might want to loop @esbie in as well.
Thanks, perfect.