k8s_external can now resolve CNAME returned by AWS ELB/NLB (#3916)

Automatically submitted.
This commit is contained in:
Michael Kashin
2020-05-29 10:04:23 -07:00
committed by GitHub
parent 54fb2112ac
commit 2e3ef77731
5 changed files with 72 additions and 17 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/upstream"
"github.com/caddyserver/caddy"
)
@@ -30,6 +31,8 @@ func setup(c *caddy.Controller) error {
return nil
})
e.upstream = upstream.New()
dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {
e.Next = next
return e