mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Fix downward api for pod using host network.
This commit is contained in:
parent
aada051b20
commit
10b0e0f3de
@ -1750,6 +1750,10 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
|
||||
|
||||
// Generate final API pod status with pod and status manager status
|
||||
apiPodStatus := kl.generateAPIPodStatus(pod, podStatus)
|
||||
// The pod IP may be changed in generateAPIPodStatus if the pod is using host network. (See #24576)
|
||||
// TODO(random-liu): After writing pod spec into container labels, check whether pod is using host network, and
|
||||
// set pod IP to hostIP directly in runtime.GetPodStatus
|
||||
podStatus.IP = apiPodStatus.PodIP
|
||||
|
||||
// Record the time it takes for the pod to become running.
|
||||
existingStatus, ok := kl.statusManager.GetPodStatus(pod.UID)
|
||||
|
Loading…
Reference in New Issue
Block a user