Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Consul: query service by specific health states #1601

@aywrite

Description

@aywrite

The 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions