kubelet/dockertools: Refactor image pulling for pod infra container.

Replace the trunk of pull image code with dockerManagner.pullImage().
Also add tests to verify the image pulling/pulled events.
This commit is contained in:
Yifan Gu
2015-06-08 17:53:24 -07:00
parent eb0fb43453
commit 053db8dba7
4 changed files with 77 additions and 52 deletions

View File

@@ -69,5 +69,5 @@ func (kr *kubeletRuntimeHooks) ReportImagePulling(pod *api.Pod, container *api.C
glog.Errorf("Couldn't make a ref to pod %q, container %q: '%v'", pod.Name, container.Name, err)
return
}
kr.recorder.Eventf(ref, "pulling", "Pulling image %q for container: %v", container.Image, container.Name)
kr.recorder.Eventf(ref, "pulling", "Pulling image %q", container.Image)
}