aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/object/endpoint.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-10-11 21:59:50 +0100
committerGravatar Chris O'Haver <cohaver@infoblox.com> 2018-10-11 16:59:50 -0400
commit6ed88fab744bd3d8cc071153a4c78970798cf9e6 (patch)
treeab4935e8cb81931b65966ba13829f3f8780b12b3 /plugin/kubernetes/object/endpoint.go
parentc8fb66f8cc60ff17b916b033982c5491f23cdcc9 (diff)
downloadcoredns-6ed88fab744bd3d8cc071153a4c78970798cf9e6.tar.gz
coredns-6ed88fab744bd3d8cc071153a4c78970798cf9e6.tar.zst
coredns-6ed88fab744bd3d8cc071153a4c78970798cf9e6.zip
Revert "use keys (#2167)" (#2188)
This reverts commit 974ed086f25ad45a01947e276e2eb8aa73d007a3.
Diffstat (limited to 'plugin/kubernetes/object/endpoint.go')
-rw-r--r--plugin/kubernetes/object/endpoint.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/kubernetes/object/endpoint.go b/plugin/kubernetes/object/endpoint.go
index a391c6426..b8531f050 100644
--- a/plugin/kubernetes/object/endpoint.go
+++ b/plugin/kubernetes/object/endpoint.go
@@ -40,7 +40,7 @@ type EndpointPort struct {
}
// EndpointsKey return a string using for the index.
-func EndpointsKey(namespace, name string) string { return namespace + "/" + name }
+func EndpointsKey(name, namespace string) string { return name + "." + namespace }
// ToEndpoints converts an api.Service to a *Service.
func ToEndpoints(obj interface{}) interface{} {
@@ -61,7 +61,7 @@ func ToEndpoints(obj interface{}) interface{} {
Addresses: make([]EndpointAddress, len(eps.Addresses)),
}
if len(eps.Ports) == 0 {
- // Add sentinel if there are no ports.
+ // Add sentinal if there are no ports.
sub.Ports = []EndpointPort{{Port: -1}}
} else {
sub.Ports = make([]EndpointPort, len(eps.Ports))