Add NS+hosts records to xfr response. Add coredns service to test data. (#4696)

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver 2021-06-14 10:39:40 -04:00 committed by GitHub
parent 0f061cc9f7
commit a1aafbf405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 3 deletions

View file

@ -568,6 +568,17 @@ func (APIConnServeTest) PodIndex(ip string) []*object.Pod {
}
var svcIndex = map[string][]*object.Service{
"kubedns.kube-system": {
{
Name: "kubedns",
Namespace: "kube-system",
Type: api.ServiceTypeClusterIP,
ClusterIPs: []string{"10.0.0.10"},
Ports: []api.ServicePort{
{Name: "dns", Protocol: "udp", Port: 53},
},
},
},
"svc1.testns": {
{
Name: "svc1",
@ -673,6 +684,21 @@ func (APIConnServeTest) ServiceList() []*object.Service {
}
var epsIndex = map[string][]*object.Endpoints{
"kubedns.kube-system": {{
Subsets: []object.EndpointSubset{
{
Addresses: []object.EndpointAddress{
{IP: "172.0.0.100"},
},
Ports: []object.EndpointPort{
{Port: 53, Protocol: "udp", Name: "dns"},
},
},
},
Name: "kubedns",
Namespace: "kube-system",
Index: object.EndpointsKey("kubedns", "kube-system"),
}},
"svc1.testns": {{
Subsets: []object.EndpointSubset{
{