mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #6054 from fgrzadkowski/fix_pod_status
Do not fail pod status update if failed to get host IP
This commit is contained in:
commit
e4fc45c26f
@ -1925,9 +1925,10 @@ func (kl *Kubelet) generatePodStatusByPod(pod *api.Pod) (api.PodStatus, error) {
|
||||
podStatus.Host = kl.GetHostname()
|
||||
hostIP, err := kl.GetHostIP()
|
||||
if err != nil {
|
||||
return api.PodStatus{}, fmt.Errorf("Cannot get host IP: %v", err)
|
||||
glog.Errorf("Cannot get host IP: %v", err)
|
||||
} else {
|
||||
podStatus.HostIP = hostIP.String()
|
||||
}
|
||||
podStatus.HostIP = hostIP.String()
|
||||
|
||||
return *podStatus, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user