Introduce PodStatusResult, and deprecate PodContainerInfo.

This commit is contained in:
Dawn Chen
2015-01-13 18:11:24 -08:00
parent 53bef57b34
commit 15e9fa8a9d
19 changed files with 189 additions and 98 deletions

View File

@@ -62,7 +62,7 @@ var (
type fakeKubeletClient struct{}
func (fakeKubeletClient) GetPodInfo(host, podNamespace, podID string) (api.PodContainerInfo, error) {
func (fakeKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.PodStatusResult, error) {
glog.V(3).Infof("Trying to get container info for %v/%v/%v", host, podNamespace, podID)
// This is a horrible hack to get around the fact that we can't provide
// different port numbers per kubelet...
@@ -81,7 +81,7 @@ func (fakeKubeletClient) GetPodInfo(host, podNamespace, podID string) (api.PodCo
default:
glog.Fatalf("Can't get info for: '%v', '%v - %v'", host, podNamespace, podID)
}
return c.GetPodInfo("localhost", podNamespace, podID)
return c.GetPodStatus("localhost", podNamespace, podID)
}
func (fakeKubeletClient) HealthCheck(host string) (health.Status, error) {
@@ -223,7 +223,7 @@ func podsOnMinions(c *client.Client, pods api.PodList) wait.ConditionFunc {
if len(host) == 0 {
return false, nil
}
if _, err := podInfo.GetPodInfo(host, namespace, id); err != nil {
if _, err := podInfo.GetPodStatus(host, namespace, id); err != nil {
return false, nil
}
}