mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
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 ```
This commit is contained in:
commit
ecfee6a9c9
@ -376,6 +376,7 @@ func NewNodeController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if nc.runTaintManager {
|
if nc.runTaintManager {
|
||||||
|
nc.taintManager = scheduler.NewNoExecuteTaintManager(kubeClient)
|
||||||
nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
|
nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
|
||||||
AddFunc: util.CreateAddNodeHandler(func(node *v1.Node) error {
|
AddFunc: util.CreateAddNodeHandler(func(node *v1.Node) error {
|
||||||
nc.taintManager.NodeUpdated(nil, node)
|
nc.taintManager.NodeUpdated(nil, node)
|
||||||
@ -390,7 +391,6 @@ func NewNodeController(
|
|||||||
return nil
|
return nil
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
nc.taintManager = scheduler.NewNoExecuteTaintManager(kubeClient)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if nc.taintNodeByCondition {
|
if nc.taintNodeByCondition {
|
||||||
|
Loading…
Reference in New Issue
Block a user