Add PodIP to the info returned for a pod.

This commit is contained in:
Brendan Burns
2014-07-09 22:13:07 -07:00
parent b0b9606aea
commit 7b11cbd622
3 changed files with 46 additions and 0 deletions

View File

@@ -89,6 +89,12 @@ func (storage *PodRegistryStorage) fillPodInfo(pod *api.Pod) {
return
}
pod.CurrentState.Info = info
netContainerInfo, ok := info["net"]
if ok {
pod.CurrentState.PodIP = netContainerInfo.NetworkSettings.IPAddress
} else {
glog.Warningf("Couldn't find network container in %v", info)
}
}
}