Commit 928ac582 authored by hzxuzhonghu's avatar hzxuzhonghu

fix taint controller panic

parent 5030391c
......@@ -370,6 +370,7 @@ func NewNodeController(
}
if nc.runTaintManager {
nc.taintManager = scheduler.NewNoExecuteTaintManager(kubeClient)
nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: util.CreateAddNodeHandler(func(node *v1.Node) error {
nc.taintManager.NodeUpdated(nil, node)
......@@ -384,7 +385,6 @@ func NewNodeController(
return nil
}),
})
nc.taintManager = scheduler.NewNoExecuteTaintManager(kubeClient)
}
nc.nodeLister = nodeInformer.Lister()
......
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