mirror of
https://github.com/coredns/coredns.git
synced 2025-10-30 01:34:21 -04:00
mw/kubernetes: remove kService and kPod
Remove the intermediate step of gathering everyhing in a kPod and kService and extracting the msg.Service from there. Now findPods and findServices return []msg.Service. This cuts down on the code and also removed the double looping of finding the data we need, so it should be faster.
This commit is contained in:
@@ -47,7 +47,7 @@ var dnsTestCases = map[string](test.Case){
|
||||
},
|
||||
"SRV Service Not udp/tcp": {
|
||||
Qname: "*._not-udp-or-tcp.svc1.testns.svc.cluster.local.", Qtype: dns.TypeSRV,
|
||||
Rcode: dns.RcodeSuccess,
|
||||
Rcode: dns.RcodeNameError,
|
||||
Ns: []dns.RR{
|
||||
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"),
|
||||
},
|
||||
@@ -105,6 +105,14 @@ var dnsTestCases = map[string](test.Case){
|
||||
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"),
|
||||
},
|
||||
},
|
||||
"A Service (non-existing service)": {
|
||||
Qname: "svc0.testns.svc.cluster.local.", Qtype: dns.TypeA,
|
||||
Rcode: dns.RcodeNameError,
|
||||
Answer: []dns.RR{},
|
||||
Ns: []dns.RR{
|
||||
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"),
|
||||
},
|
||||
},
|
||||
"TXT Schema": {
|
||||
Qname: "dns-version.cluster.local.", Qtype: dns.TypeTXT,
|
||||
Rcode: dns.RcodeSuccess,
|
||||
|
||||
Reference in New Issue
Block a user