Skip to content

Commit

Permalink
adds hability to use externalIP
Browse files Browse the repository at this point in the history
  • Loading branch information
vniche committed Oct 21, 2019
1 parent f2d3454 commit b14a694
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/ingress/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b14a694

Please sign in to comment.