mw/kubernetes: remove kPod and kServices (#969)
Based up on: #939, but redone in a new PR with some cherry-picked commits:aacb91ef0b
5dc34247b7
This removes kPod and Kservice and creates []msg.Service from k.findPods and k.findServices. Updated few tests which I *think* are correct; they look correct to me.
This commit is contained in:
parent
7f5086e97a
commit
61fc672e19
7 changed files with 110 additions and 153 deletions
|
@ -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"),
|
||||
},
|
||||
|
@ -91,16 +91,21 @@ var dnsTestCases = map[string](test.Case){
|
|||
},
|
||||
"AAAA Service (existing service)": {
|
||||
Qname: "svc1.testns.svc.cluster.local.", Qtype: dns.TypeAAAA,
|
||||
Rcode: dns.RcodeSuccess,
|
||||
Answer: []dns.RR{},
|
||||
Rcode: dns.RcodeSuccess,
|
||||
Ns: []dns.RR{
|
||||
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"),
|
||||
},
|
||||
},
|
||||
"AAAA Service (non-existing service)": {
|
||||
Qname: "svc0.testns.svc.cluster.local.", Qtype: dns.TypeAAAA,
|
||||
Rcode: dns.RcodeNameError,
|
||||
Answer: []dns.RR{},
|
||||
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"),
|
||||
},
|
||||
},
|
||||
"A Service (non-existing service)": {
|
||||
Qname: "svc0.testns.svc.cluster.local.", Qtype: dns.TypeA,
|
||||
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"),
|
||||
},
|
||||
|
@ -112,6 +117,20 @@ var dnsTestCases = map[string](test.Case){
|
|||
test.TXT("dns-version.cluster.local 28800 IN TXT 1.0.1"),
|
||||
},
|
||||
},
|
||||
"A Service (Headless) does not exist": {
|
||||
Qname: "bogusendpoint.hdls1.testns.svc.cluster.local.", Qtype: dns.TypeA,
|
||||
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"),
|
||||
},
|
||||
},
|
||||
"A Service does not exist": {
|
||||
Qname: "bogusendpoint.svc0.testns.svc.cluster.local.", Qtype: dns.TypeA,
|
||||
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"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var podModeDisabledCases = map[string](test.Case){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue