mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #1127 from ddysher/pod-list
Fix pod status error with List method.
This commit is contained in:
commit
7b44f88c2b
@ -108,7 +108,10 @@ func (rs *RegistryStorage) List(selector labels.Selector) (interface{}, error) {
|
||||
pods, err := rs.registry.ListPods(selector)
|
||||
if err == nil {
|
||||
for i := range pods.Items {
|
||||
rs.fillPodInfo(&pods.Items[i])
|
||||
pod := &pods.Items[i]
|
||||
rs.fillPodInfo(pod)
|
||||
pod.CurrentState.Status = getPodStatus(pod)
|
||||
pod.CurrentState.HostIP = getInstanceIP(rs.cloudProvider, pod.CurrentState.Host)
|
||||
}
|
||||
}
|
||||
return pods, err
|
||||
|
Loading…
Reference in New Issue
Block a user