Skip to content

Commit

Permalink
Change policy update handler to only reload on spec change
Browse files Browse the repository at this point in the history
  • Loading branch information
soneillf5 committed Jul 2, 2021
1 parent 1a220a1 commit 27b2f8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/k8s/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ func createPolicyHandlers(lbc *LoadBalancerController) cache.ResourceEventHandle
},
UpdateFunc: func(old, cur interface{}) {
curPol := cur.(*conf_v1.Policy)
if !reflect.DeepEqual(old, cur) {
oldPol := old.(*conf_v1.Policy)
if !reflect.DeepEqual(oldPol.Spec, curPol.Spec) {
glog.V(3).Infof("Policy %v changed, syncing", curPol.Name)
lbc.AddSyncQueue(curPol)
}
Expand Down

0 comments on commit 27b2f8d

Please sign in to comment.