gojekfarm / probed

A unix daemon to perform health check on proxy backends.
Apache License 2.0
26 stars 9 forks source link

Support for kong 0.12 #10

Open sohamkamani opened 6 years ago

sohamkamani commented 6 years ago

Currently, the API we use to get targets, does not get targets with weight 0: https://github.com/gojekfarm/ping-kong/blob/master/kong.go#L71

According to kong 0.12, we need to use this API : /upstreams/{name or id}/targets/all/ (https://getkong.org/docs/0.12.x/admin-api/#endpoint)[https://getkong.org/docs/0.12.x/admin-api/#endpoint]

As a consequence of this, once an endpoint is marked as unhealthy, and a weight of 0 is set, it never appears again even if it becomes healthy

rShetty commented 6 years ago

@sohamkamani We can add support for Kong 0.12, but 0.12 kong comes with its own built in health checker. We wanted this library to target mostly lower versions. But definitely adding support for 0.12 is in pipeline too