only include running and pending pods in daemonset should place calculation

This commit is contained in:
Mike Danese
2016-04-06 11:47:16 -07:00
parent 4f329516ae
commit 14284291da
2 changed files with 32 additions and 0 deletions

View File

@@ -674,6 +674,9 @@ func (dsc *DaemonSetsController) nodeShouldRunDaemonPod(node *api.Node, ds *exte
if pod.Spec.NodeName != node.Name {
continue
}
if pod.Status.Phase == api.PodSucceeded || pod.Status.Phase == api.PodFailed {
continue
}
// ignore pods that belong to the daemonset when taking into account wheter
// a daemonset should bind to a node.
if pds := dsc.getPodDaemonSet(pod); pds != nil && ds.Name == pds.Name {