Skip to content

Commit

Permalink
Merge pull request #1024 from aledbf/fix-code-removal
Browse files Browse the repository at this point in the history
GCE: Revert node handlers removal
  • Loading branch information
nicksardo authored Jul 27, 2017
2 parents 37375ae + 11c0306 commit f9ce8d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controllers/gce/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,17 @@ func NewLoadBalancerController(kubeClient kubernetes.Interface, clusterManager *
)

// Node watch handlers
nodeHandlers := cache.ResourceEventHandlerFuncs{
AddFunc: lbc.nodeQueue.enqueue,
DeleteFunc: lbc.nodeQueue.enqueue,
// Nodes are updated every 10s and we don't care, so no update handler.
}

lbc.nodeLister.Indexer, lbc.nodeController = cache.NewIndexerInformer(
cache.NewListWatchFromClient(lbc.client.Core().RESTClient(), "nodes", api_v1.NamespaceAll, fields.Everything()),
&api_v1.Node{},
resyncPeriod,
cache.ResourceEventHandlerFuncs{},
nodeHandlers,
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
)

Expand Down

0 comments on commit f9ce8d7

Please sign in to comment.