diff options
author | 2017-05-30 08:20:39 -0400 | |
---|---|---|
committer | 2017-05-30 13:20:39 +0100 | |
commit | d917ff5ac2bc5c88f8aebb67cc6a085fa81eacb5 (patch) | |
tree | caea405ed68524b659948aea5ba8d6cdda0e3f2e /middleware/backend_lookup.go | |
parent | 2f2c90f3917f5d2179874d7415e593e0ff0c0f79 (diff) | |
download | coredns-d917ff5ac2bc5c88f8aebb67cc6a085fa81eacb5.tar.gz coredns-d917ff5ac2bc5c88f8aebb67cc6a085fa81eacb5.tar.zst coredns-d917ff5ac2bc5c88f8aebb67cc6a085fa81eacb5.zip |
Add k8s external service CNAMEs (#677)
* Add external service cnames
* remove cruft
* update CI k8s version
* change CI k8s version
* min k8s ver for ext services
* trying k8s 1.5
* k8s 1.5 requires ports spec
* remove kruft
* update dns schema version
Diffstat (limited to 'middleware/backend_lookup.go')
-rw-r--r-- | middleware/backend_lookup.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/middleware/backend_lookup.go b/middleware/backend_lookup.go index 41968c2fa..3d67ef375 100644 --- a/middleware/backend_lookup.go +++ b/middleware/backend_lookup.go @@ -25,7 +25,7 @@ func A(b ServiceBackend, zone string, state request.Request, previousRecords []d what, ip := serv.HostType() switch what { - case dns.TypeANY: + case dns.TypeCNAME: if Name(state.Name()).Matches(dns.Fqdn(serv.Host)) { // x CNAME x is a direct loop, don't add those continue @@ -92,7 +92,7 @@ func AAAA(b ServiceBackend, zone string, state request.Request, previousRecords what, ip := serv.HostType() switch what { - case dns.TypeANY: + case dns.TypeCNAME: // Try to resolve as CNAME if it's not an IP, but only if we don't create loops. if Name(state.Name()).Matches(dns.Fqdn(serv.Host)) { // x CNAME x is a direct loop, don't add those @@ -182,7 +182,7 @@ func SRV(b ServiceBackend, zone string, state request.Request, opt Options) (rec what, ip := serv.HostType() switch what { - case dns.TypeANY: + case dns.TypeCNAME: srv := serv.NewSRV(state.QName(), weight) records = append(records, srv) @@ -250,7 +250,7 @@ func MX(b ServiceBackend, zone string, state request.Request, opt Options) (reco } what, ip := serv.HostType() switch what { - case dns.TypeANY: + case dns.TypeCNAME: mx := serv.NewMX(state.QName()) records = append(records, mx) if _, ok := lookup[mx.Mx]; ok { @@ -364,7 +364,7 @@ func NS(b ServiceBackend, zone string, state request.Request, opt Options) (reco for _, serv := range services { what, ip := serv.HostType() switch what { - case dns.TypeANY: + case dns.TypeCNAME: return nil, nil, debug, fmt.Errorf("NS record must be an IP address: %s", serv.Host) case dns.TypeA, dns.TypeAAAA: |