Add sync behavior to the pod registry. Expand tests.

This commit is contained in:
Brendan Burns
2014-06-27 17:43:36 -07:00
parent d75bd790d3
commit 13d7a5959a
6 changed files with 89 additions and 13 deletions

View File

@@ -20,7 +20,6 @@ import (
"encoding/json"
"fmt"
"math/rand"
"strings"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
@@ -170,7 +169,7 @@ func (rm *ReplicationManager) handleWatchResponse(response *etcd.Response) (*api
func (rm *ReplicationManager) filterActivePods(pods []api.Pod) []api.Pod {
var result []api.Pod
for _, value := range pods {
if strings.Index(value.CurrentState.Status, "Exit") == -1 {
if api.PodStopped != value.CurrentState.Status {
result = append(result, value)
}
}