plugin/kubernetes: filter ExternalName services from matching double subdomain wildcard (#6162)

remove double subdomain reference from review feedback



not subdoman

Signed-off-by: emaildanwilson <dan@controlplane.com>
Co-authored-by: emaildanwilson <dan@controlplane.com>
This commit is contained in:
Dan Wilson 2023-06-19 05:42:17 -07:00 committed by GitHub
parent 7e6d3bb533
commit 5b5a6ac6ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -408,6 +408,14 @@ var dnsTestCases = []kubeTestCase{
test.SOA("cluster.local. 5 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 5"),
},
}},
// A query for a subdomain of a subdomain of an external service should not resolve to the external service
{Case: test.Case{
Qname: "subdomain.subdomain.external.testns.svc.cluster.local.", Qtype: dns.TypeCNAME,
Rcode: dns.RcodeNameError,
Ns: []dns.RR{
test.SOA("cluster.local. 5 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 5"),
},
}},
}
func TestServeDNS(t *testing.T) {