Merge pull request #3569 from Shopify/fix-status-updater
fix status updated: make sure ingress.status is copied
This commit is contained in:
commit
c6629accf9
2 changed files with 2 additions and 1 deletions
|
@ -602,6 +602,7 @@ func (s *k8sStore) syncIngress(ing *extensions.Ingress) {
|
||||||
copyIng := &extensions.Ingress{}
|
copyIng := &extensions.Ingress{}
|
||||||
ing.ObjectMeta.DeepCopyInto(©Ing.ObjectMeta)
|
ing.ObjectMeta.DeepCopyInto(©Ing.ObjectMeta)
|
||||||
ing.Spec.DeepCopyInto(©Ing.Spec)
|
ing.Spec.DeepCopyInto(©Ing.Spec)
|
||||||
|
ing.Status.DeepCopyInto(©Ing.Status)
|
||||||
|
|
||||||
for ri, rule := range copyIng.Spec.Rules {
|
for ri, rule := range copyIng.Spec.Rules {
|
||||||
if rule.HTTP == nil {
|
if rule.HTTP == nil {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue