From f62189372af6d866a8bce890bf44a0284a599b59 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Fri, 5 Jan 2018 17:48:08 +0000 Subject: plugin/kubernetes: partial fix for crazy pod queries (#1349) This is probably the first in a series to fix "crazy" pod queries. If the namespace doesn't exist return NXDOMAIN. It might be worth extending this 1:1 to findServices as well. --- plugin/kubernetes/handler_pod_insecure_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugin/kubernetes/handler_pod_insecure_test.go') diff --git a/plugin/kubernetes/handler_pod_insecure_test.go b/plugin/kubernetes/handler_pod_insecure_test.go index 276d4bbb3..6dcfd5629 100644 --- a/plugin/kubernetes/handler_pod_insecure_test.go +++ b/plugin/kubernetes/handler_pod_insecure_test.go @@ -25,6 +25,13 @@ var podModeInsecureCases = []test.Case{ test.A("172-0-0-2.podns.pod.cluster.local. 5 IN A 172.0.0.2"), }, }, + { + Qname: "blah.pod-nons.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) { -- cgit v1.2.3