Handle deleted pods in replication and endpoint controllers

Pods that are slated for deletion should be excluded from
replication and endpoints immediately.
This commit is contained in:
Clayton Coleman
2015-05-21 23:02:31 -04:00
parent cfb122a3bf
commit 9d3631e3de
3 changed files with 22 additions and 2 deletions

View File

@@ -294,7 +294,8 @@ func filterActivePods(pods []api.Pod) []*api.Pod {
var result []*api.Pod
for i := range pods {
if api.PodSucceeded != pods[i].Status.Phase &&
api.PodFailed != pods[i].Status.Phase {
api.PodFailed != pods[i].Status.Phase &&
pods[i].DeletionTimestamp == nil {
result = append(result, &pods[i])
}
}