diff options
author | 2022-02-22 09:38:57 -0500 | |
---|---|---|
committer | 2022-02-22 09:38:57 -0500 | |
commit | 66dc74caebd4f4bdb8bd38d03b52611488424594 (patch) | |
tree | 41c8e56a785c45c138776b5d0d622507dd1726b6 /plugin/kubernetes/kubernetes.go | |
parent | d3a118e1c175eb00a0c171c2d2616dbaf39cdbba (diff) | |
download | coredns-66dc74caebd4f4bdb8bd38d03b52611488424594.tar.gz coredns-66dc74caebd4f4bdb8bd38d03b52611488424594.tar.zst coredns-66dc74caebd4f4bdb8bd38d03b52611488424594.zip |
plugin/etcd+kubernetes: Persist truncated state to client if CNAME lookup response is truncated (#4715)
Persist the TC bit to client response for truncated CNAME lookups.
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Diffstat (limited to 'plugin/kubernetes/kubernetes.go')
-rw-r--r-- | plugin/kubernetes/kubernetes.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugin/kubernetes/kubernetes.go b/plugin/kubernetes/kubernetes.go index 8f45aac70..cf52ae41b 100644 --- a/plugin/kubernetes/kubernetes.go +++ b/plugin/kubernetes/kubernetes.go @@ -15,7 +15,6 @@ import ( "github.com/coredns/coredns/plugin/kubernetes/object" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/pkg/upstream" "github.com/coredns/coredns/request" "github.com/miekg/dns" @@ -35,7 +34,7 @@ import ( type Kubernetes struct { Next plugin.Handler Zones []string - Upstream *upstream.Upstream + Upstream Upstreamer APIServerList []string APICertAuth string APIClientCert string @@ -53,6 +52,11 @@ type Kubernetes struct { autoPathSearch []string // Local search path from /etc/resolv.conf. Needed for autopath. } +// Upstreamer is used to resolve CNAME or other external targets +type Upstreamer interface { + Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) +} + // New returns a initialized Kubernetes. It default interfaceAddrFunc to return 127.0.0.1. All other // values default to their zero value, primaryZoneIndex will thus point to the first zone. func New(zones []string) *Kubernetes { |