Kubelet: pass pod name/namespace/uid to runtimes

This commit is contained in:
Pengfei Ni
2016-08-17 16:04:25 +08:00
parent 9de9405be7
commit 9bfa37f2ae
15 changed files with 617 additions and 420 deletions

View File

@@ -229,12 +229,11 @@ func (m *kubeGenericRuntimeManager) GetPods(all bool) ([]*kubecontainer.Pod, err
return nil, err
}
for _, s := range sandboxes {
name, namespace, uid, _ := parseSandboxName(s.GetName())
podUID := kubetypes.UID(uid)
podUID := kubetypes.UID(s.Metadata.GetUid())
pods[podUID] = &kubecontainer.Pod{
ID: podUID,
Name: name,
Namespace: namespace,
Name: s.Metadata.GetName(),
Namespace: s.Metadata.GetNamespace(),
}
}