Commit e299d4f2 authored by Geoff Simmons's avatar Geoff Simmons

Update the Varnish controller for a previously unknown Service.

parent 0ce2bfdf
...@@ -227,21 +227,27 @@ func (worker *NamespaceWorker) syncSvc(key string) error { ...@@ -227,21 +227,27 @@ func (worker *NamespaceWorker) syncSvc(key string) error {
if ingSvc == nil { if ingSvc == nil {
continue continue
} }
worker.log.Debugf("Ingress %s/%s: Service %s/%s", ing.Namespace,
ing.Name, svc.Namespace, svc.Name)
if ingSvc.Namespace != svc.Namespace || if ingSvc.Namespace != svc.Namespace ||
ingSvc.Name != svc.Name { ingSvc.Name != svc.Name {
continue continue
} }
if !worker.isVarnishInVCLSpec(ing) { worker.log.Debugf("Ingress %s/%s: %+v", ing.Namespace, ing.Name,
ing)
svcKey := svc.Namespace + "/" + svc.Name
if worker.vController.HasVarnishSvc(svcKey) &&
!worker.isVarnishInVCLSpec(ing) {
continue continue
} }
updateVCL = true updateVCL = true
worker.log.Tracef("Requeueing Ingress %s/%s after changed "+ worker.log.Debug("Requeueing Ingress %s/%s after changed "+
"Varnish service %s/%s: %+v", ing.Namespace, "Varnish service %s/%s: %+v", ing.Namespace,
ing.Name, svc.Namespace, svc.Name, ing) ing.Name, svc.Namespace, svc.Name, ing)
worker.queue.Add(&SyncObj{Type: Update, Obj: ing}) worker.queue.Add(&SyncObj{Type: Update, Obj: ing})
} }
if !updateVCL { if !updateVCL {
worker.log.Tracef("No change in VCL due to changed Varnish "+ worker.log.Debugf("No change in VCL due to changed Varnish "+
"service %s/%s", svc.Namespace, svc.Name) "service %s/%s", svc.Namespace, svc.Name)
} }
......
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