Skip to content

Commit

Permalink
Fix ingress endpoint resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
M00nF1sh committed Jul 16, 2019
1 parent 83bcb8d commit 3f904fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/backend/resource/ingress/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ func getEndpoints(ingress *extensions.Ingress) []common.Endpoint {
endpoints := make([]common.Endpoint, 0)
if len(ingress.Status.LoadBalancer.Ingress) > 0 {
for _, status := range ingress.Status.LoadBalancer.Ingress {
endpoint := common.Endpoint{Host: status.IP}
endpoint := common.Endpoint{}
if status.Hostname != "" {
endpoint.Host = status.Hostname
} else if status.IP != "" {
endpoint.Host = status.IP
}
endpoints = append(endpoints, endpoint)
}
}
Expand Down

0 comments on commit 3f904fc

Please sign in to comment.