Refactor pkg/kubelet/kubelet.go: syncPod().

Makes the syncPod() takes only the containers that belongs to the pod.
This commit is contained in:
Yifan Gu
2015-03-03 17:33:48 -08:00
parent ca9d24304b
commit ed1823e276
5 changed files with 201 additions and 63 deletions

View File

@@ -84,7 +84,8 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan workUpdate) {
glog.Errorf("Error listing containers while syncing pod: %v", err)
return
}
err = p.syncPodFn(newWork.pod, containers)
err = p.syncPodFn(newWork.pod, containers.FindContainersByPod(newWork.pod.UID, GetPodFullName(newWork.pod)))
if err != nil {
glog.Errorf("Error syncing pod %s, skipping: %v", newWork.pod.UID, err)
p.recorder.Eventf(newWork.pod, "failedSync", "Error syncing pod, skipping: %v", err)