From 6cec66ce404b8f680cca5d03584ebcbd1ab888e0 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Fri, 2 Mar 2018 17:17:26 -0800 Subject: [PATCH] plugin/reload: enable (#1587) Couldn't revert the original commit, just manually perform the needed tweaks. --- core/dnsserver/zdirectives.go | 1 + core/plugin/zplugin.go | 1 + plugin.cfg | 2 +- plugin/reload/README.md | 6 +++--- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/dnsserver/zdirectives.go b/core/dnsserver/zdirectives.go index ba8873936..f0017e82c 100644 --- a/core/dnsserver/zdirectives.go +++ b/core/dnsserver/zdirectives.go @@ -11,6 +11,7 @@ package dnsserver // care what plugin above them are doing. var Directives = []string{ "tls", + "reload", "nsid", "root", "bind", diff --git a/core/plugin/zplugin.go b/core/plugin/zplugin.go index 9233c9a37..c545046a7 100644 --- a/core/plugin/zplugin.go +++ b/core/plugin/zplugin.go @@ -28,6 +28,7 @@ import ( _ "github.com/coredns/coredns/plugin/nsid" _ "github.com/coredns/coredns/plugin/pprof" _ "github.com/coredns/coredns/plugin/proxy" + _ "github.com/coredns/coredns/plugin/reload" _ "github.com/coredns/coredns/plugin/reverse" _ "github.com/coredns/coredns/plugin/rewrite" _ "github.com/coredns/coredns/plugin/root" diff --git a/plugin.cfg b/plugin.cfg index 9e604eb6a..9bcc96e25 100644 --- a/plugin.cfg +++ b/plugin.cfg @@ -20,7 +20,7 @@ # log:log tls:tls -#reload:reload # enable by reverting #1511 +reload:reload nsid:nsid root:root bind:bind diff --git a/plugin/reload/README.md b/plugin/reload/README.md index bb4eda179..9ebbe2dda 100644 --- a/plugin/reload/README.md +++ b/plugin/reload/README.md @@ -15,7 +15,7 @@ The reloads are graceful - you should not see any loss of service when the reload happens. Even if the new Corefile has an error, CoreDNS will continue to run the old config and an error message will be printed to the log. -In some environments (for example, Kubernetes), there may be many CoreDNS +In some environments (for example, Kubernetes), there may be many CoreDNS instances that started very near the same time and all share a common Corefile. To prevent these all from reloading at the same time, some jitter is added to the reload check interval. This is jitter from the @@ -44,7 +44,7 @@ reload [INTERVAL] [JITTER] Check with the default intervals: -~~~ txt +~~~ corefile . { reload erratic @@ -53,7 +53,7 @@ Check with the default intervals: Check every 10 seconds (jitter is automatically set to 10 / 2 = 5 in this case): -~~~ txt +~~~ corefile . { reload 10s erratic