mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
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:
@@ -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{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user