v1beta3 Pod refactor

This commit is contained in:
markturansky
2014-11-13 10:52:13 -05:00
parent df0981bc01
commit 8af4ccb111
36 changed files with 569 additions and 573 deletions

View File

@@ -84,10 +84,10 @@ func (p *PodCache) UpdateAllContainers() {
return
}
for _, pod := range pods.Items {
if pod.CurrentState.Host == "" {
if pod.Status.Host == "" {
continue
}
err := p.updatePodInfo(pod.CurrentState.Host, pod.Namespace, pod.Name)
err := p.updatePodInfo(pod.Status.Host, pod.Namespace, pod.Name)
if err != nil && err != client.ErrPodInfoNotAvailable {
glog.Errorf("Error synchronizing container: %v", err)
}

View File

@@ -125,7 +125,7 @@ func TestPodGetPodInfoGetter(t *testing.T) {
func TestPodUpdateAllContainers(t *testing.T) {
pod := api.Pod{
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault},
CurrentState: api.PodState{
Status: api.PodStatus{
Host: "machine",
},
}