Merge pull request #10048 from rajatchopra/master

Assign host's IPAddress to podIP when pod shares the host's network
This commit is contained in:
Satnam Singh 2015-06-19 08:16:24 -07:00
commit e584629272

View File

@ -2170,6 +2170,9 @@ func (kl *Kubelet) generatePodStatus(pod *api.Pod) (api.PodStatus, error) {
glog.V(4).Infof("Cannot get host IP: %v", err)
} else {
podStatus.HostIP = hostIP.String()
if pod.Spec.HostNetwork && podStatus.PodIP == "" {
podStatus.PodIP = hostIP.String()
}
}
}