mirror of
https://github.com/coredns/coredns.git
synced 2025-10-31 18:23:13 -04:00
k8s_external can now resolve CNAME returned by AWS ELB/NLB (#3916)
Automatically submitted.
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/etcd/msg"
|
||||
"github.com/coredns/coredns/plugin/pkg/upstream"
|
||||
"github.com/coredns/coredns/request"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
@@ -39,6 +40,8 @@ type External struct {
|
||||
apex string
|
||||
ttl uint32
|
||||
|
||||
upstream *upstream.Upstream
|
||||
|
||||
externalFunc func(request.Request) ([]msg.Service, int)
|
||||
externalAddrFunc func(request.Request) []dns.RR
|
||||
}
|
||||
@@ -90,9 +93,9 @@ func (e *External) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Ms
|
||||
|
||||
switch state.QType() {
|
||||
case dns.TypeA:
|
||||
m.Answer = e.a(svc, state)
|
||||
m.Answer = e.a(ctx, svc, state)
|
||||
case dns.TypeAAAA:
|
||||
m.Answer = e.aaaa(svc, state)
|
||||
m.Answer = e.aaaa(ctx, svc, state)
|
||||
case dns.TypeSRV:
|
||||
m.Answer, m.Extra = e.srv(svc, state)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user