plugin/kubernetes: add ready function (#2709)

* plugin/kubernetes: add ready function

Add ready function as the health function is now gone.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix readme

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben 2019-03-20 13:32:23 +00:00 committed by Chris O'Haver
parent aa9c7a2e61
commit 43c3e0ab68
2 changed files with 9 additions and 0 deletions

View file

@ -107,6 +107,11 @@ kubernetes [ZONES...] {
This allows the querying pod to continue searching for the service in the search path. This allows the querying pod to continue searching for the service in the search path.
The search path could, for example, include another Kubernetes cluster. The search path could, for example, include another Kubernetes cluster.
## Ready
This plugin reports readiness to the ready plugin. This will happen after it has synced to the
Kubernetes API.
## Examples ## Examples
Handle all queries in the `cluster.local` zone. Connect to Kubernetes in-cluster. Also handle all Handle all queries in the `cluster.local` zone. Connect to Kubernetes in-cluster. Also handle all

View file

@ -0,0 +1,4 @@
package kubernetes
// Ready implements the ready.Readiness interface.
func (k *Kubernetes) Ready() bool { return k.APIConn.HasSynced() }