Merge pull request #3569 from Shopify/fix-status-updater

fix status updated: make sure ingress.status is copied
This commit is contained in:
Kubernetes Prow Robot 2018-12-17 09:26:55 -08:00 committed by GitHub
commit c6629accf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -602,6 +602,7 @@ func (s *k8sStore) syncIngress(ing *extensions.Ingress) {
copyIng := &extensions.Ingress{} copyIng := &extensions.Ingress{}
ing.ObjectMeta.DeepCopyInto(&copyIng.ObjectMeta) ing.ObjectMeta.DeepCopyInto(&copyIng.ObjectMeta)
ing.Spec.DeepCopyInto(&copyIng.Spec) ing.Spec.DeepCopyInto(&copyIng.Spec)
ing.Status.DeepCopyInto(&copyIng.Status)
for ri, rule := range copyIng.Spec.Rules { for ri, rule := range copyIng.Spec.Rules {
if rule.HTTP == nil { if rule.HTTP == nil {

View file

@ -385,7 +385,7 @@ func runUpdate(ing *ingress.Ingress, status []apiv1.LoadBalancerIngress,
return nil, errors.Wrap(err, fmt.Sprintf("unexpected error searching Ingress %v/%v", ing.Namespace, ing.Name)) return nil, errors.Wrap(err, fmt.Sprintf("unexpected error searching Ingress %v/%v", ing.Namespace, ing.Name))
} }
klog.Infof("updating Ingress %v/%v status to %v", currIng.Namespace, currIng.Name, status) klog.Infof("updating Ingress %v/%v status from %v to %v", currIng.Namespace, currIng.Name, currIng.Status.LoadBalancer.Ingress, status)
currIng.Status.LoadBalancer.Ingress = status currIng.Status.LoadBalancer.Ingress = status
_, err = ingClient.UpdateStatus(currIng) _, err = ingClient.UpdateStatus(currIng)
if err != nil { if err != nil {