aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/handler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/kubernetes/handler_test.go')
-rw-r--r--plugin/kubernetes/handler_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugin/kubernetes/handler_test.go b/plugin/kubernetes/handler_test.go
index 7904e67a6..19eed2d50 100644
--- a/plugin/kubernetes/handler_test.go
+++ b/plugin/kubernetes/handler_test.go
@@ -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{
{