plugin/kubernetes: fix pod insecure mode (#1354)

Fixes #1331
This commit is contained in:
Miek Gieben 2018-01-06 15:56:54 +00:00 committed by GitHub
parent a8e268e33b
commit 75a8a17da4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 2 deletions

View file

@ -25,6 +25,27 @@ var podModeInsecureCases = []test.Case{
test.A("172-0-0-2.podns.pod.cluster.local. 5 IN A 172.0.0.2"),
},
},
{
Qname: "blah.podns.pod.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. 1515173576 7200 1800 86400 30"),
},
},
{
Qname: "blah.podns.pod.cluster.local.", Qtype: dns.TypeAAAA,
Rcode: dns.RcodeNameError,
Ns: []dns.RR{
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"),
},
},
{
Qname: "blah.podns.pod.cluster.local.", Qtype: dns.TypeHINFO,
Rcode: dns.RcodeNameError,
Ns: []dns.RR{
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"),
},
},
{
Qname: "blah.pod-nons.pod.cluster.local.", Qtype: dns.TypeA,
Rcode: dns.RcodeNameError,
@ -32,6 +53,13 @@ var podModeInsecureCases = []test.Case{
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"),
},
},
{
Qname: "podns.pod.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. 1515173576 7200 1800 86400 30"),
},
},
}
func TestServeDNSModeInsecure(t *testing.T) {