aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-03-20 13:32:23 +0000
committerGravatar Chris O'Haver <cohaver@infoblox.com> 2019-03-20 09:32:23 -0400
commit43c3e0ab68fc103967bfb9bec0363d42a5964dac (patch)
tree9896e9e070a571026f3849bdb700b2251829af75 /plugin/kubernetes
parentaa9c7a2e61ce2d06accf5731109e120004cb698b (diff)
downloadcoredns-43c3e0ab68fc103967bfb9bec0363d42a5964dac.tar.gz
coredns-43c3e0ab68fc103967bfb9bec0363d42a5964dac.tar.zst
coredns-43c3e0ab68fc103967bfb9bec0363d42a5964dac.zip
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>
Diffstat (limited to 'plugin/kubernetes')
-rw-r--r--plugin/kubernetes/README.md5
-rw-r--r--plugin/kubernetes/ready.go4
2 files changed, 9 insertions, 0 deletions
diff --git a/plugin/kubernetes/README.md b/plugin/kubernetes/README.md
index 672e167df..2c7f9861e 100644
--- a/plugin/kubernetes/README.md
+++ b/plugin/kubernetes/README.md
@@ -107,6 +107,11 @@ kubernetes [ZONES...] {
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.
+## Ready
+
+This plugin reports readiness to the ready plugin. This will happen after it has synced to the
+Kubernetes API.
+
## Examples
Handle all queries in the `cluster.local` zone. Connect to Kubernetes in-cluster. Also handle all
diff --git a/plugin/kubernetes/ready.go b/plugin/kubernetes/ready.go
new file mode 100644
index 000000000..2625f3b5a
--- /dev/null
+++ b/plugin/kubernetes/ready.go
@@ -0,0 +1,4 @@
+package kubernetes
+
+// Ready implements the ready.Readiness interface.
+func (k *Kubernetes) Ready() bool { return k.APIConn.HasSynced() }