plugin/azure: allow startup with unavailable zones (#8524)

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
This commit is contained in:
houyuwushang
2026-09-11 11:54:12 +08:00
committed by GitHub
parent 52b85e4c45
commit b51e6d254b
4 changed files with 570 additions and 62 deletions

View File

@@ -45,16 +45,17 @@ func setup(c *caddy.Controller) error {
return plugin.Error("azure", err)
}
h.Fall = fall
if err := h.Run(ctx); err != nil {
cancel()
return plugin.Error("azure", err)
}
dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {
h.Next = next
return h
})
c.OnShutdown(func() error { cancel(); return nil })
c.OnStartup(func() error { return h.Run(ctx) })
c.OnShutdown(func() error {
cancel()
h.updates.Wait()
return nil
})
return nil
}