Skip to content

Commit

Permalink
fix status updated: make sure ingress.status is copied
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvinEfendi committed Dec 17, 2018
1 parent ee3a8fe commit 7a00d52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/ingress/controller/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ func (s *k8sStore) syncIngress(ing *extensions.Ingress) {
copyIng := &extensions.Ingress{}
ing.ObjectMeta.DeepCopyInto(&copyIng.ObjectMeta)
ing.Spec.DeepCopyInto(&copyIng.Spec)
ing.Status.DeepCopyInto(&copyIng.Status)

for ri, rule := range copyIng.Spec.Rules {
if rule.HTTP == nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/ingress/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7a00d52

Please sign in to comment.