Merge pull request #42964 from k82cn/update_defalt_toleration_sec
Automatic merge from submit-queue (batch tested with PRs 44084, 42964) Updated AddOrUpdateTolerationInPod to return bool only. Updated AddOrUpdateTolerationInPod to return bool only, as there's no case to generate error (the error was used for annotation, it'll not return error after moving to field); and also update admission & daemonset accordingly.
This commit is contained in:
@@ -858,27 +858,21 @@ func (dsc *DaemonSetsController) nodeShouldRunDaemonPod(node *v1.Node, ds *exten
|
||||
// Add infinite toleration for taint notReady:NoExecute here
|
||||
// to survive taint-based eviction enforced by NodeController
|
||||
// when node turns not ready.
|
||||
_, err = v1.AddOrUpdateTolerationInPod(newPod, &v1.Toleration{
|
||||
v1.AddOrUpdateTolerationInPod(newPod, &v1.Toleration{
|
||||
Key: metav1.TaintNodeNotReady,
|
||||
Operator: v1.TolerationOpExists,
|
||||
Effect: v1.TaintEffectNoExecute,
|
||||
})
|
||||
if err != nil {
|
||||
return false, false, false, err
|
||||
}
|
||||
|
||||
// DaemonSet pods shouldn't be deleted by NodeController in case of node problems.
|
||||
// Add infinite toleration for taint unreachable:NoExecute here
|
||||
// to survive taint-based eviction enforced by NodeController
|
||||
// when node turns unreachable.
|
||||
_, err = v1.AddOrUpdateTolerationInPod(newPod, &v1.Toleration{
|
||||
v1.AddOrUpdateTolerationInPod(newPod, &v1.Toleration{
|
||||
Key: metav1.TaintNodeUnreachable,
|
||||
Operator: v1.TolerationOpExists,
|
||||
Effect: v1.TaintEffectNoExecute,
|
||||
})
|
||||
if err != nil {
|
||||
return false, false, false, err
|
||||
}
|
||||
|
||||
pods := []*v1.Pod{}
|
||||
|
||||
|
Reference in New Issue
Block a user