feat: update more than one LoadBalancer ip

Co-authored-by: kevinpollet <pollet.kevin@gmail.com>
This commit is contained in:
Eli Mallon 2020-09-15 04:48:32 -07:00 committed by GitHub
parent 76f42a3013
commit 498e8545b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 119 additions and 23 deletions

View file

@ -301,7 +301,7 @@ func (p *Provider) updateIngressStatus(ing *networkingv1beta1.Ingress, k8sClient
return errors.New("publishedService or ip or hostname must be defined")
}
return k8sClient.UpdateIngressStatus(ing, p.IngressEndpoint.IP, p.IngressEndpoint.Hostname)
return k8sClient.UpdateIngressStatus(ing, []corev1.LoadBalancerIngress{{IP: p.IngressEndpoint.IP, Hostname: p.IngressEndpoint.Hostname}})
}
serviceInfo := strings.Split(p.IngressEndpoint.PublishedService, "/")
@ -326,7 +326,7 @@ func (p *Provider) updateIngressStatus(ing *networkingv1beta1.Ingress, k8sClient
return fmt.Errorf("missing service: %s", p.IngressEndpoint.PublishedService)
}
return k8sClient.UpdateIngressStatus(ing, service.Status.LoadBalancer.Ingress[0].IP, service.Status.LoadBalancer.Ingress[0].Hostname)
return k8sClient.UpdateIngressStatus(ing, service.Status.LoadBalancer.Ingress)
}
func (p *Provider) shouldProcessIngress(providerIngressClass string, ingress *networkingv1beta1.Ingress, ingressClass *networkingv1beta1.IngressClass) bool {