From 7a00d521417aa54fc84360dc3e4140b13a3e0ee2 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Mon, 17 Dec 2018 16:10:53 +0400 Subject: [PATCH] fix status updated: make sure ingress.status is copied --- internal/ingress/controller/store/store.go | 1 + internal/ingress/status/status.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/ingress/controller/store/store.go b/internal/ingress/controller/store/store.go index 2099bd15c3..c6ace805eb 100644 --- a/internal/ingress/controller/store/store.go +++ b/internal/ingress/controller/store/store.go @@ -602,6 +602,7 @@ func (s *k8sStore) syncIngress(ing *extensions.Ingress) { copyIng := &extensions.Ingress{} ing.ObjectMeta.DeepCopyInto(©Ing.ObjectMeta) ing.Spec.DeepCopyInto(©Ing.Spec) + ing.Status.DeepCopyInto(©Ing.Status) for ri, rule := range copyIng.Spec.Rules { if rule.HTTP == nil { diff --git a/internal/ingress/status/status.go b/internal/ingress/status/status.go index d4208c4da8..635bb5e6ac 100644 --- a/internal/ingress/status/status.go +++ b/internal/ingress/status/status.go @@ -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)) } - 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 _, err = ingClient.UpdateStatus(currIng) if err != nil {