From b14a6944a743bd58dc8beaaed4ebbfa5f72dc722 Mon Sep 17 00:00:00 2001 From: Vinicius Niche Correa Date: Mon, 21 Oct 2019 01:23:27 -0300 Subject: [PATCH] adds hability to use externalIP --- internal/ingress/status/status.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/ingress/status/status.go b/internal/ingress/status/status.go index 00d3132eb6..2c23c9912e 100644 --- a/internal/ingress/status/status.go +++ b/internal/ingress/status/status.go @@ -338,7 +338,13 @@ func statusAddressFromService(service string, kubeClient clientset.Interface) ([ case apiv1.ServiceTypeClusterIP: return []string{svc.Spec.ClusterIP}, nil case apiv1.ServiceTypeNodePort: - return []string{svc.Spec.ClusterIP}, nil + addresses := []string{} + if svc.Spec.ExternalIPs != nil { + addresses = append(addresses, svc.Spec.ExternalIPs...) + } else { + addresses = append(addresses, svc.Spec.ClusterIP) + } + return addresses, nil case apiv1.ServiceTypeLoadBalancer: addresses := []string{} for _, ip := range svc.Status.LoadBalancer.Ingress {