mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
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:
commit
e584629272
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user