mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
daemonset: Remove unnecessary error returns in strategy code
The nodeShouldRunDaemonPod method does not need to return an error because there are no scenarios under which it fails. Remove the error return path for its direct calls as well.
This commit is contained in:
@@ -521,10 +521,7 @@ func (dsc *DaemonSetsController) updatedDesiredNodeCounts(ds *apps.DaemonSet, no
|
||||
var desiredNumberScheduled int
|
||||
for i := range nodeList {
|
||||
node := nodeList[i]
|
||||
wantToRun, _, err := dsc.nodeShouldRunDaemonPod(node, ds)
|
||||
if err != nil {
|
||||
return -1, -1, err
|
||||
}
|
||||
wantToRun, _ := dsc.nodeShouldRunDaemonPod(node, ds)
|
||||
if !wantToRun {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user