aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/object
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/kubernetes/object')
-rw-r--r--plugin/kubernetes/object/endpoint.go4
-rw-r--r--plugin/kubernetes/object/service.go2
2 files changed, 3 insertions, 3 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))
diff --git a/plugin/kubernetes/object/service.go b/plugin/kubernetes/object/service.go
index be010e96b..1c716b28b 100644
--- a/plugin/kubernetes/object/service.go
+++ b/plugin/kubernetes/object/service.go
@@ -20,7 +20,7 @@ type Service struct {
}
// ServiceKey return a string using for the index.
-func ServiceKey(name, namespace string) string { return name + "." + namespace }
+func ServiceKey(namespace, name string) string { return namespace + "/" + name }
// ToService converts an api.Service to a *Service.
func ToService(obj interface{}) interface{} {