Add pod cache and verified pod responses (#483)
* Add pod cache and verified pod responses * add ip indexing for pod cache
This commit is contained in:
parent
51a34d934d
commit
adfd7d5b19
4 changed files with 123 additions and 6 deletions
|
@ -242,6 +242,19 @@ var dnsTestCasesPodsInsecure = []test.Case{
|
|||
},
|
||||
}
|
||||
|
||||
var dnsTestCasesPodsVerified = []test.Case{
|
||||
{
|
||||
Qname: "10-20-0-101.test-1.pod.cluster.local.", Qtype: dns.TypeA,
|
||||
Rcode: dns.RcodeNameError,
|
||||
Answer: []dns.RR{},
|
||||
},
|
||||
{
|
||||
Qname: "10-20-0-101.test-X.pod.cluster.local.", Qtype: dns.TypeA,
|
||||
Rcode: dns.RcodeNameError,
|
||||
Answer: []dns.RR{},
|
||||
},
|
||||
}
|
||||
|
||||
func createTestServer(t *testing.T, corefile string) (*caddy.Instance, string) {
|
||||
server, err := CoreDNSServer(corefile)
|
||||
if err != nil {
|
||||
|
@ -315,3 +328,15 @@ func TestKubernetesIntegrationPodsInsecure(t *testing.T) {
|
|||
`
|
||||
doIntegrationTests(t, corefile, dnsTestCasesPodsInsecure)
|
||||
}
|
||||
|
||||
func TestKubernetesIntegrationPodsVerified(t *testing.T) {
|
||||
corefile :=
|
||||
`.:0 {
|
||||
kubernetes cluster.local 0.0.10.in-addr.arpa {
|
||||
endpoint http://localhost:8080
|
||||
namespaces test-1
|
||||
pods verified
|
||||
}
|
||||
`
|
||||
doIntegrationTests(t, corefile, dnsTestCasesPodsVerified)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue