mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #15196 from mikedanese/ds-bug
don't count nodes with 0 daemonpods running when 0 should be running as mischeduled.
This commit is contained in:
commit
1ac70ecadc
@ -448,13 +448,18 @@ func (dsc *DaemonSetsController) updateDaemonSetStatus(ds *experimental.DaemonSe
|
|||||||
shouldRun := nodeSelector.Matches(labels.Set(node.Labels))
|
shouldRun := nodeSelector.Matches(labels.Set(node.Labels))
|
||||||
numDaemonPods := len(nodeToDaemonPods[node.Name])
|
numDaemonPods := len(nodeToDaemonPods[node.Name])
|
||||||
|
|
||||||
if numDaemonPods > 0 {
|
// TODO(mikedanese): this does not count nodes that should be running
|
||||||
|
// exactly one daemon pod but are running more than one daemon pods.
|
||||||
|
|
||||||
|
if shouldRun && numDaemonPods == 1 {
|
||||||
currentNumberScheduled++
|
currentNumberScheduled++
|
||||||
}
|
}
|
||||||
|
|
||||||
if shouldRun {
|
if shouldRun {
|
||||||
desiredNumberScheduled++
|
desiredNumberScheduled++
|
||||||
} else if numDaemonPods >= 0 {
|
}
|
||||||
|
|
||||||
|
if !shouldRun && numDaemonPods > 0 {
|
||||||
numberMisscheduled++
|
numberMisscheduled++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user