Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #204 from bvoss/bug/endless-loop
Browse files Browse the repository at this point in the history
break up infinite update loop #137
  • Loading branch information
munnerz authored Jun 15, 2017
2 parents 5bed2fa + e01196a commit c6c7218
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/kubelego/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ func (kl *KubeLego) WatchEvents() {
kl.workQueue.Add(true)
},
UpdateFunc: func(old, cur interface{}) {
if !reflect.DeepEqual(old, cur) {
oldIng := old.(*k8sExtensions.Ingress)
upIng := cur.(*k8sExtensions.Ingress)

//ignore resource version in equality check
oldIng.ResourceVersion = ""
upIng.ResourceVersion = ""

if !reflect.DeepEqual(oldIng, upIng) {
upIng := cur.(*k8sExtensions.Ingress)
if ingress.IgnoreIngress(upIng) != nil {
return
Expand Down

0 comments on commit c6c7218

Please sign in to comment.