fix bug in daemonset

This commit is contained in:
Mike Danese 2015-10-06 16:54:53 -07:00
parent f4cb23975b
commit d601bfa1bb

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++
}
}