From 38730426698297b6f659d3aba343aeb0be586859 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Fri, 16 Dec 2016 14:56:27 -0300 Subject: [PATCH] Return correct node address --- core/pkg/ingress/status/status.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/pkg/ingress/status/status.go b/core/pkg/ingress/status/status.go index f5e083dd9..9d8bc6b5b 100644 --- a/core/pkg/ingress/status/status.go +++ b/core/pkg/ingress/status/status.go @@ -211,13 +211,14 @@ func (s *statusSync) runningAddresess() ([]string, error) { return nil, err } - ips := []string{} + addrs := []string{} for _, pod := range pods.Items { - if !strings.StringInSlice(pod.Status.HostIP, ips) { - ips = append(ips, pod.Status.HostIP) + name := k8s.GetNodeIP(s.Client, pod.Spec.NodeName) + if !strings.StringInSlice(name, addrs) { + addrs = append(addrs, name) } } - return ips, nil + return addrs, nil } // sliceToStatus converts a slice of IP and/or hostnames to LoadBalancerIngress