Skip to content

Commit

Permalink
Merge pull request #69933 from wangzhen127/fix
Browse files Browse the repository at this point in the history
Put node lease lister behind feature gate
  • Loading branch information
k8s-ci-robot committed Oct 17, 2018
2 parents 5f750c5 + 7bb61c5 commit bc79dcf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/controller/nodelifecycle/node_lifecycle_controller.go
Expand Up @@ -388,7 +388,12 @@ func NewNodeLifecycleController(
})

nc.leaseLister = leaseInformer.Lister()
nc.leaseInformerSynced = leaseInformer.Informer().HasSynced
if utilfeature.DefaultFeatureGate.Enabled(features.NodeLease) {
nc.leaseInformerSynced = leaseInformer.Informer().HasSynced
} else {
// Always indicate that lease is synced to prevent syncing lease.
nc.leaseInformerSynced = func() bool { return true }
}

nc.nodeLister = nodeInformer.Lister()
nc.nodeInformerSynced = nodeInformer.Informer().HasSynced
Expand Down

0 comments on commit bc79dcf

Please sign in to comment.