Commit ecfee6a9 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #51603 from hzxuzhonghu/taint-controller-panic

Automatic merge from submit-queue (batch tested with PRs 51603, 51653) fix taint controller panic **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51586 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 8b9f0ea5 928ac582
......@@ -376,6 +376,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)
......@@ -390,7 +391,6 @@ func NewNodeController(
return nil
}),
})
nc.taintManager = scheduler.NewNoExecuteTaintManager(kubeClient)
}
if nc.taintNodeByCondition {
......
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