diff options
author | 2018-10-10 15:28:45 -0400 | |
---|---|---|
committer | 2018-10-10 12:28:45 -0700 | |
commit | 974ed086f25ad45a01947e276e2eb8aa73d007a3 (patch) | |
tree | 2c1468f5a4e90634382a81904ef2736ca44198a7 /plugin/kubernetes/object/endpoint.go | |
parent | 8432f1420732e61cb1a7ebb9d6446db6f43aa850 (diff) | |
download | coredns-974ed086f25ad45a01947e276e2eb8aa73d007a3.tar.gz coredns-974ed086f25ad45a01947e276e2eb8aa73d007a3.tar.zst coredns-974ed086f25ad45a01947e276e2eb8aa73d007a3.zip |
use keys (#2167)
Diffstat (limited to 'plugin/kubernetes/object/endpoint.go')
-rw-r--r-- | plugin/kubernetes/object/endpoint.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/kubernetes/object/endpoint.go b/plugin/kubernetes/object/endpoint.go index b8531f050..a391c6426 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(name, namespace string) string { return name + "." + namespace } +func EndpointsKey(namespace, name string) string { return namespace + "/" + name } // 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 sentinal if there are no ports. + // Add sentinel if there are no ports. sub.Ports = []EndpointPort{{Port: -1}} } else { sub.Ports = make([]EndpointPort, len(eps.Ports)) |