Commit fbbefd2b authored by Geoff Simmons's avatar Geoff Simmons

Bugfix Ingress status.loadbalancer update on Service update.

parent b3341410
...@@ -276,20 +276,28 @@ func (worker *NamespaceWorker) syncSvc(key string) update.Status { ...@@ -276,20 +276,28 @@ func (worker *NamespaceWorker) syncSvc(key string) update.Status {
} }
} else { } else {
for _, admSvc := range admSvcs { for _, admSvc := range admSvcs {
if !worker.isVarnishIngSvc(svc) { if !worker.isVarnishIngSvc(admSvc) {
continue continue
} }
if !reflect.DeepEqual(svc.Spec.Selector, if !reflect.DeepEqual(svc.Spec.Selector,
admSvc.Spec.Selector) { admSvc.Spec.Selector) {
continue continue
} }
ings, status := worker.getIngsForSvc(admSvc) ings, err := worker.getIngsForVarnishSvc(admSvc)
if status.IsError() { if err != nil && !errors.IsNotFound(err) {
return status return update.MakeFatal(
"Cannot list Ingresses for "+
"viking admin Service "+
"%s/%s: %v",
admSvc.Namespace, admSvc.Name,
err)
} }
status = worker.updateIngStatus(admSvc, ings) if ings != nil && len(ings) > 0 {
if status.IsError() { status := worker.updateIngStatus(
return status admSvc, ings)
if status.IsError() {
return status
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment