Add image white list, images in white list will be prepulled, and

only images in white list could be used in the test. Currently only
enabled in node e2e test.
This commit is contained in:
Random-Liu
2016-09-15 14:49:14 -07:00
parent 920581d964
commit ed411c9042
16 changed files with 102 additions and 70 deletions

View File

@@ -44,7 +44,8 @@ var _ = framework.KubeDescribe("MirrorPod", func() {
mirrorPodName = staticPodName + "-" + framework.TestContext.NodeName
By("create the static pod")
err := createStaticPod(framework.TestContext.ManifestPath, staticPodName, ns, ImageRegistry[nginxImage], api.RestartPolicyAlways)
err := createStaticPod(framework.TestContext.ManifestPath, staticPodName, ns,
"gcr.io/google_containers/nginx-slim:0.7", api.RestartPolicyAlways)
Expect(err).ShouldNot(HaveOccurred())
By("wait for the mirror pod to be running")
@@ -59,7 +60,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() {
uid := pod.UID
By("update the static pod container image")
image := ImageRegistry[pauseImage]
image := framework.GetPauseImageNameForHostArch()
err = createStaticPod(framework.TestContext.ManifestPath, staticPodName, ns, image, api.RestartPolicyAlways)
Expect(err).ShouldNot(HaveOccurred())