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:
Mike Danese 2015-10-06 20:08:00 -07:00
commit 1ac70ecadc

View File

@ -448,13 +448,18 @@ func (dsc *DaemonSetsController) updateDaemonSetStatus(ds *experimental.DaemonSe
shouldRun := nodeSelector.Matches(labels.Set(node.Labels))
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++
}
if shouldRun {
desiredNumberScheduled++
} else if numDaemonPods >= 0 {
}
if !shouldRun && numDaemonPods > 0 {
numberMisscheduled++
}
}