Ensures that the DaemonSet controller does not launch a Pod on a Node while waiting for a Pod that it has previously created to terminate.

This commit is contained in:
Kenneth Owens
2017-08-24 09:51:28 -07:00
parent 721923924d
commit 8ad18bf2ec
4 changed files with 55 additions and 16 deletions

View File

@@ -408,7 +408,8 @@ func (dsc *DaemonSetsController) getUnavailableNumbers(ds *extensions.DaemonSet,
}
available := false
for _, pod := range daemonPods {
if podutil.IsPodAvailable(pod, ds.Spec.MinReadySeconds, metav1.Now()) {
//for the purposes of update we ensure that the Pod is both available and not terminating
if podutil.IsPodAvailable(pod, ds.Spec.MinReadySeconds, metav1.Now()) && pod.DeletionTimestamp == nil {
available = true
break
}