From aaa90476cbd30e0e71bf6967a947472f79e8b042 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Thu, 10 Sep 2020 14:20:08 -0400 Subject: [PATCH] test/e2e: Busybox image is not being templatized All images used by e2e tests must use templates in order to allow relocation. In addition this is hitting Dockerhub which will be getting throttled soon. --- test/e2e/kubectl/kubectl.go | 4 ++-- .../kubectl/{busybox-cronjob.yaml => busybox-cronjob.yaml.in} | 2 +- .../kubectl/{busybox-pod.yaml => busybox-pod.yaml.in} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename test/e2e/testing-manifests/kubectl/{busybox-cronjob.yaml => busybox-cronjob.yaml.in} (91%) rename test/e2e/testing-manifests/kubectl/{busybox-pod.yaml => busybox-pod.yaml.in} (90%) diff --git a/test/e2e/kubectl/kubectl.go b/test/e2e/kubectl/kubectl.go index 0c06b393d3b..5282663cb33 100644 --- a/test/e2e/kubectl/kubectl.go +++ b/test/e2e/kubectl/kubectl.go @@ -1205,7 +1205,7 @@ metadata: ginkgo.It("should check if kubectl describe prints relevant information for cronjob", func() { ginkgo.By("creating a cronjob") - cronjobYaml := commonutils.SubstituteImageName(string(readTestFileOrDie("busybox-cronjob.yaml"))) + cronjobYaml := commonutils.SubstituteImageName(string(readTestFileOrDie("busybox-cronjob.yaml.in"))) framework.RunKubectlOrDieInput(ns, cronjobYaml, "create", "-f", "-") ginkgo.By("waiting for cronjob to start.") @@ -1365,7 +1365,7 @@ metadata: var podYaml string ginkgo.BeforeEach(func() { ginkgo.By("creating the pod") - podYaml = commonutils.SubstituteImageName(string(readTestFileOrDie("busybox-pod.yaml"))) + podYaml = commonutils.SubstituteImageName(string(readTestFileOrDie("busybox-pod.yaml.in"))) framework.RunKubectlOrDieInput(ns, podYaml, "create", "-f", "-") framework.ExpectEqual(e2epod.CheckPodsRunningReady(c, ns, []string{busyboxPodName}, framework.PodStartTimeout), true) }) diff --git a/test/e2e/testing-manifests/kubectl/busybox-cronjob.yaml b/test/e2e/testing-manifests/kubectl/busybox-cronjob.yaml.in similarity index 91% rename from test/e2e/testing-manifests/kubectl/busybox-cronjob.yaml rename to test/e2e/testing-manifests/kubectl/busybox-cronjob.yaml.in index 3f7e4404679..1cbbbf3745e 100644 --- a/test/e2e/testing-manifests/kubectl/busybox-cronjob.yaml +++ b/test/e2e/testing-manifests/kubectl/busybox-cronjob.yaml.in @@ -15,7 +15,7 @@ spec: spec: containers: - name: test - image: busybox + image: {{.BusyBoxImage}} args: - "/bin/true" restartPolicy: OnFailure diff --git a/test/e2e/testing-manifests/kubectl/busybox-pod.yaml b/test/e2e/testing-manifests/kubectl/busybox-pod.yaml.in similarity index 90% rename from test/e2e/testing-manifests/kubectl/busybox-pod.yaml rename to test/e2e/testing-manifests/kubectl/busybox-pod.yaml.in index bbe1bea94aa..75fb3231f02 100644 --- a/test/e2e/testing-manifests/kubectl/busybox-pod.yaml +++ b/test/e2e/testing-manifests/kubectl/busybox-pod.yaml.in @@ -6,7 +6,7 @@ metadata: app: busybox1 spec: containers: - - image: busybox + - image: {{.BusyBoxImage}} command: ["/bin/sh", "-c", "mkdir -p /root/foo/bar && echo 'foobar' > /root/foo/bar/foo.bar && sleep 3600"] imagePullPolicy: IfNotPresent name: busybox