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 {
}
} else {
for _, admSvc := range admSvcs {
if !worker.isVarnishIngSvc(svc) {
if !worker.isVarnishIngSvc(admSvc) {
continue
}
if !reflect.DeepEqual(svc.Spec.Selector,
admSvc.Spec.Selector) {
continue
}
ings, status := worker.getIngsForSvc(admSvc)
if status.IsError() {
return status
ings, err := worker.getIngsForVarnishSvc(admSvc)
if err != nil && !errors.IsNotFound(err) {
return update.MakeFatal(
"Cannot list Ingresses for "+
"viking admin Service "+
"%s/%s: %v",
admSvc.Namespace, admSvc.Name,
err)
}
status = worker.updateIngStatus(admSvc, ings)
if status.IsError() {
return status
if ings != nil && len(ings) > 0 {
status := worker.updateIngStatus(
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