diff options
author | 2019-03-07 22:13:47 +0000 | |
---|---|---|
committer | 2019-03-07 22:13:47 +0000 | |
commit | c778b3a67ca43124a539acda21eca4934c8110f6 (patch) | |
tree | 6c012c1a6d7fe4fb5a2f7d9985c8b9b8f3d0f7ec /plugin/health/setup.go | |
parent | db0b16b615c5397628f392de6dd131d4cbc148d9 (diff) | |
download | coredns-c778b3a67ca43124a539acda21eca4934c8110f6.tar.gz coredns-c778b3a67ca43124a539acda21eca4934c8110f6.tar.zst coredns-c778b3a67ca43124a539acda21eca4934c8110f6.zip |
plugin/health: remove ability to poll other plugins (#2547)
* plugin/health: remove ability to poll other plugins
This mechanism defeats the purpose any plugin (mostly) caching can still
be alive, we can probably forward queries still. Don't poll plugins,
just tell the world we're up and running.
It was only actually used in kubernetes; and there specifically would
mean any network hiccup would NACK the entire server health.
Fixes: #2534
Signed-off-by: Miek Gieben <miek@miek.nl>
* update docs based on feedback
Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/health/setup.go')
-rw-r--r-- | plugin/health/setup.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/plugin/health/setup.go b/plugin/health/setup.go index 5a1725125..19aeba58d 100644 --- a/plugin/health/setup.go +++ b/plugin/health/setup.go @@ -5,7 +5,6 @@ import ( "net" "time" - "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/metrics" @@ -29,32 +28,6 @@ func setup(c *caddy.Controller) error { h.lameduck = lame c.OnStartup(func() error { - plugins := dnsserver.GetConfig(c).Handlers() - for _, p := range plugins { - if x, ok := p.(Healther); ok { - h.h = append(h.h, x) - } - } - return nil - }) - - c.OnStartup(func() error { - // Poll all middleware every second. - h.poll() - go func() { - for { - select { - case <-time.After(1 * time.Second): - h.poll() - case <-h.pollstop: - return - } - } - }() - return nil - }) - - c.OnStartup(func() error { metrics.MustRegister(c, HealthDuration) return nil }) |