plugin/reload: hash the configuration executed by each instance (#8642)

Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>
This commit is contained in:
houyuwushang
2026-10-21 11:33:54 +08:00
committed by GitHub
parent a6fde3fe33
commit e7f823b261
5 changed files with 346 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ import (
"time"
"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
clog "github.com/coredns/coredns/plugin/pkg/log"
)
@@ -76,6 +77,7 @@ func setup(c *caddy.Controller) error {
// prepare info for next onInstanceStartup event
state := reloadForController(c)
state.configHash = dnsserver.GetConfigHash(c)
state.setInterval(i)
state.setUsage(used)
once.Do(func() {