diff --git a/test/e2e/apimachinery/garbage_collector.go b/test/e2e/apimachinery/garbage_collector.go index c2ba58267a..5c19bab5c2 100644 --- a/test/e2e/apimachinery/garbage_collector.go +++ b/test/e2e/apimachinery/garbage_collector.go @@ -312,7 +312,7 @@ func newCronJob(name, schedule string) *batchv1beta1.CronJob { Containers: []v1.Container{ { Name: "c", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"sleep", "300"}, }, }, diff --git a/test/e2e/apimachinery/generated_clientset.go b/test/e2e/apimachinery/generated_clientset.go index b6c4b994e0..51a34e145f 100644 --- a/test/e2e/apimachinery/generated_clientset.go +++ b/test/e2e/apimachinery/generated_clientset.go @@ -243,7 +243,7 @@ func newTestingCronJob(name string, value string) *batchv1beta1.CronJob { Containers: []v1.Container{ { Name: "c", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), VolumeMounts: []v1.VolumeMount{ { MountPath: "/data", diff --git a/test/e2e/apps/cronjob.go b/test/e2e/apps/cronjob.go index 00c7e81d62..e7df3761cb 100644 --- a/test/e2e/apps/cronjob.go +++ b/test/e2e/apps/cronjob.go @@ -34,6 +34,7 @@ import ( batchinternal "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/controller/job" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" ) const ( @@ -298,7 +299,7 @@ func newTestCronJob(name, schedule string, concurrencyPolicy batchv1beta1.Concur Containers: []v1.Container{ { Name: "c", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), VolumeMounts: []v1.VolumeMount{ { MountPath: "/data", diff --git a/test/e2e/common/configmap_volume.go b/test/e2e/common/configmap_volume.go index fe9ecc3c76..81b98d9574 100644 --- a/test/e2e/common/configmap_volume.go +++ b/test/e2e/common/configmap_volume.go @@ -27,6 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" ) var _ = Describe("[sig-storage] ConfigMap", func() { @@ -245,7 +246,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() { }, { Name: containerName2, - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"hexdump", "-C", "/etc/configmap-volume/dump.bin"}, VolumeMounts: []v1.VolumeMount{ { diff --git a/test/e2e/common/util.go b/test/e2e/common/util.go index 66bbdc39a9..b73909db47 100644 --- a/test/e2e/common/util.go +++ b/test/e2e/common/util.go @@ -42,7 +42,7 @@ const ( var ( mountImage = imageutils.GetE2EImage(imageutils.Mounttest) - busyboxImage = "busybox" + busyboxImage = imageutils.GetE2EImage(imageutils.BusyBox) ) var CurrentSuite Suite @@ -52,7 +52,7 @@ var CurrentSuite Suite // only used by node e2e test. // TODO(random-liu): Change the image puller pod to use similar mechanism. var CommonImageWhiteList = sets.NewString( - "busybox", + imageutils.GetE2EImage(imageutils.BusyBox), imageutils.GetE2EImage(imageutils.EntrypointTester), imageutils.GetE2EImage(imageutils.IpcUtils), imageutils.GetE2EImage(imageutils.Liveness), diff --git a/test/e2e/framework/deployment_util.go b/test/e2e/framework/deployment_util.go index ea863466d1..f039487ae3 100644 --- a/test/e2e/framework/deployment_util.go +++ b/test/e2e/framework/deployment_util.go @@ -33,6 +33,7 @@ import ( appsinternal "k8s.io/kubernetes/pkg/apis/apps" deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" testutils "k8s.io/kubernetes/test/utils" + imageutils "k8s.io/kubernetes/test/utils/image" ) func UpdateDeploymentWithRetries(c clientset.Interface, namespace, name string, applyUpdate testutils.UpdateDeploymentFunc) (*apps.Deployment, error) { @@ -255,7 +256,7 @@ func MakeDeployment(replicas int32, podLabels map[string]string, nodeSelector ma Containers: []v1.Container{ { Name: "write-pod", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args: []string{"-c", command}, SecurityContext: &v1.SecurityContext{ diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index b2c0242f26..4d7d2b8c52 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -209,7 +209,7 @@ const ( ) var ( - BusyBoxImage = "busybox" + BusyBoxImage = imageutils.GetE2EImage(imageutils.BusyBox) // Label allocated to the image puller static pod that runs on each node // before e2es. ImagePullerLabels = map[string]string{"name": "e2e-image-puller"} diff --git a/test/e2e/instrumentation/logging/BUILD b/test/e2e/instrumentation/logging/BUILD index 1ce505fc1c..9804bc8567 100644 --- a/test/e2e/instrumentation/logging/BUILD +++ b/test/e2e/instrumentation/logging/BUILD @@ -18,6 +18,7 @@ go_library( "//test/e2e/instrumentation/common:go_default_library", "//test/e2e/instrumentation/logging/elasticsearch:go_default_library", "//test/e2e/instrumentation/logging/stackdriver:go_default_library", + "//test/utils/image:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", "//vendor/github.com/onsi/gomega:go_default_library", ], diff --git a/test/e2e/instrumentation/logging/generic_soak.go b/test/e2e/instrumentation/logging/generic_soak.go index 75f71bc009..acf58bfd02 100644 --- a/test/e2e/instrumentation/logging/generic_soak.go +++ b/test/e2e/instrumentation/logging/generic_soak.go @@ -28,6 +28,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/kubernetes/test/e2e/framework" instrumentation "k8s.io/kubernetes/test/e2e/instrumentation/common" + imageutils "k8s.io/kubernetes/test/utils/image" ) var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disruptive]", func() { @@ -100,7 +101,7 @@ func RunLogPodsWithSleepOf(f *framework.Framework, sleep time.Duration, podname return v1.PodSpec{ Containers: []v1.Container{{ Name: "logging-soak", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Args: []string{ "/bin/sh", "-c", diff --git a/test/e2e/instrumentation/logging/utils/logging_pod.go b/test/e2e/instrumentation/logging/utils/logging_pod.go index 8c4f1b4c2e..e13d0f7597 100644 --- a/test/e2e/instrumentation/logging/utils/logging_pod.go +++ b/test/e2e/instrumentation/logging/utils/logging_pod.go @@ -177,7 +177,7 @@ func (p *execLoggingPod) Start(f *framework.Framework) error { Containers: []api_v1.Container{ { Name: loggingContainerName, - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: p.cmd, Resources: api_v1.ResourceRequirements{ Requests: api_v1.ResourceList{ diff --git a/test/e2e/kubectl/kubectl.go b/test/e2e/kubectl/kubectl.go index 2db194520e..deb6e7b693 100644 --- a/test/e2e/kubectl/kubectl.go +++ b/test/e2e/kubectl/kubectl.go @@ -94,7 +94,7 @@ var ( kittenImage = imageutils.GetE2EImage(imageutils.Kitten) redisImage = imageutils.GetE2EImage(imageutils.Redis) nginxImage = imageutils.GetE2EImage(imageutils.Nginx) - busyboxImage = "busybox" + busyboxImage = imageutils.GetE2EImage(imageutils.BusyBox) ) var testImages = struct { diff --git a/test/e2e/network/network_policy.go b/test/e2e/network/network_policy.go index 86e88cae92..799d61c4d4 100644 --- a/test/e2e/network/network_policy.go +++ b/test/e2e/network/network_policy.go @@ -556,7 +556,7 @@ func createNetworkClientPod(f *framework.Framework, namespace *v1.Namespace, pod Containers: []v1.Container{ { Name: fmt.Sprintf("%s-container", podName), - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Args: []string{ "/bin/sh", "-c", diff --git a/test/e2e/node/kubelet.go b/test/e2e/node/kubelet.go index 1953681a6e..7c14dc7145 100644 --- a/test/e2e/node/kubelet.go +++ b/test/e2e/node/kubelet.go @@ -133,7 +133,7 @@ func createPodUsingNfs(f *framework.Framework, c clientset.Interface, ns, nfsIP, Containers: []v1.Container{ { Name: "pod-nfs-vol", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args: cmdLine, VolumeMounts: []v1.VolumeMount{ diff --git a/test/e2e/node/mount_propagation.go b/test/e2e/node/mount_propagation.go index 776603a9e5..b7e574fa8f 100644 --- a/test/e2e/node/mount_propagation.go +++ b/test/e2e/node/mount_propagation.go @@ -23,6 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -43,7 +44,7 @@ func preparePod(name string, node *v1.Node, propagation *v1.MountPropagationMode Containers: []v1.Container{ { Name: containerName, - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"sh", "-c", cmd}, VolumeMounts: []v1.VolumeMount{ { diff --git a/test/e2e/node/pod_gc.go b/test/e2e/node/pod_gc.go index c621eaabfd..28b35342c8 100644 --- a/test/e2e/node/pod_gc.go +++ b/test/e2e/node/pod_gc.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" ) // This test requires that --terminated-pod-gc-threshold=100 be set on the controller manager @@ -89,7 +90,7 @@ func createTerminatingPod(f *framework.Framework) (*v1.Pod, error) { Containers: []v1.Container{ { Name: string(uuid), - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), }, }, SchedulerName: "please don't schedule my pods", diff --git a/test/e2e/node/pre_stop.go b/test/e2e/node/pre_stop.go index 86f5fc6101..1affa9d919 100644 --- a/test/e2e/node/pre_stop.go +++ b/test/e2e/node/pre_stop.go @@ -80,7 +80,7 @@ func testPreStop(c clientset.Interface, ns string) { Containers: []v1.Container{ { Name: "tester", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"sleep", "600"}, Lifecycle: &v1.Lifecycle{ PreStop: &v1.Handler{ diff --git a/test/e2e/node/security_context.go b/test/e2e/node/security_context.go index d9cab6a211..5a129927f1 100644 --- a/test/e2e/node/security_context.go +++ b/test/e2e/node/security_context.go @@ -29,6 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -49,7 +50,7 @@ func scTestPod(hostIPC bool, hostPID bool) *v1.Pod { Containers: []v1.Container{ { Name: "test-container", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), }, }, RestartPolicy: v1.RestartPolicyNever, diff --git a/test/e2e/storage/empty_dir_wrapper.go b/test/e2e/storage/empty_dir_wrapper.go index d6bfca35d5..b2322ad432 100644 --- a/test/e2e/storage/empty_dir_wrapper.go +++ b/test/e2e/storage/empty_dir_wrapper.go @@ -353,7 +353,7 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume Containers: []v1.Container{ { Name: "test-container", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"sleep", "10000"}, Resources: v1.ResourceRequirements{ Requests: v1.ResourceList{ diff --git a/test/e2e/storage/pd.go b/test/e2e/storage/pd.go index 7675079c55..50b94a6c0c 100644 --- a/test/e2e/storage/pd.go +++ b/test/e2e/storage/pd.go @@ -40,6 +40,7 @@ import ( v1core "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/storage/utils" + imageutils "k8s.io/kubernetes/test/utils/image" ) const ( @@ -526,7 +527,7 @@ func testPDPod(diskNames []string, targetNode types.NodeName, readOnly bool, num if numContainers > 1 { containers[i].Name = fmt.Sprintf("mycontainer%v", i+1) } - containers[i].Image = "busybox" + containers[i].Image = imageutils.GetE2EImage(imageutils.BusyBox) containers[i].Command = []string{"sleep", "6000"} containers[i].VolumeMounts = make([]v1.VolumeMount, len(diskNames)) for k := range diskNames { diff --git a/test/e2e/storage/regional_pd.go b/test/e2e/storage/regional_pd.go index cc77ad1359..c5556e7340 100644 --- a/test/e2e/storage/regional_pd.go +++ b/test/e2e/storage/regional_pd.go @@ -37,6 +37,7 @@ import ( "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/storage/utils" + imageutils "k8s.io/kubernetes/test/utils/image" ) const ( @@ -334,7 +335,7 @@ func newPodTemplate(labels map[string]string) *v1.PodTemplateSpec { // and prints the entire file to stdout. { Name: "busybox", - Image: "k8s.gcr.io/busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"sh", "-c"}, Args: []string{ "echo ${POD_NAME} >> /mnt/data/regional-pd/pods.txt;" + diff --git a/test/e2e/storage/subpath.go b/test/e2e/storage/subpath.go index 6c125995b3..db3ca5ff45 100644 --- a/test/e2e/storage/subpath.go +++ b/test/e2e/storage/subpath.go @@ -396,7 +396,7 @@ func testPodSubpath(f *framework.Framework, subpath, volumeType string, source * InitContainers: []v1.Container{ { Name: fmt.Sprintf("init-volume-%s", suffix), - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), VolumeMounts: []v1.VolumeMount{ { Name: volumeName, @@ -561,9 +561,9 @@ func testPodFailSubpathError(f *framework.Framework, pod *v1.Pod, errorMsg strin func testPodContainerRestart(f *framework.Framework, pod *v1.Pod) { pod.Spec.RestartPolicy = v1.RestartPolicyOnFailure - pod.Spec.Containers[0].Image = "busybox" + pod.Spec.Containers[0].Image = imageutils.GetE2EImage(imageutils.BusyBox) pod.Spec.Containers[0].Command = []string{"/bin/sh", "-ec", "sleep 100000"} - pod.Spec.Containers[1].Image = "busybox" + pod.Spec.Containers[1].Image = imageutils.GetE2EImage(imageutils.BusyBox) pod.Spec.Containers[1].Command = []string{"/bin/sh", "-ec", "sleep 100000"} // Add liveness probe to subpath container @@ -654,9 +654,9 @@ func testSubpathReconstruction(f *framework.Framework, pod *v1.Pod, forceDelete // This is mostly copied from TestVolumeUnmountsFromDeletedPodWithForceOption() // Change to busybox - pod.Spec.Containers[0].Image = "busybox" + pod.Spec.Containers[0].Image = imageutils.GetE2EImage(imageutils.BusyBox) pod.Spec.Containers[0].Command = []string{"/bin/sh", "-ec", "sleep 100000"} - pod.Spec.Containers[1].Image = "busybox" + pod.Spec.Containers[1].Image = imageutils.GetE2EImage(imageutils.BusyBox) pod.Spec.Containers[1].Command = []string{"/bin/sh", "-ec", "sleep 100000"} // If grace period is too short, then there is not enough time for the volume @@ -749,7 +749,7 @@ func (s *hostpathSymlinkSource) createVolume(f *framework.Framework) volInfo { Containers: []v1.Container{ { Name: fmt.Sprintf("init-volume-%s", f.Namespace.Name), - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh", "-ec", cmd}, VolumeMounts: []v1.VolumeMount{ { @@ -857,7 +857,7 @@ func (s *gcepdPVCSource) createVolume(f *framework.Framework) volInfo { Containers: []v1.Container{ { Name: fmt.Sprintf("init-volume-%s", f.Namespace.Name), - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh", "-ec", "echo nothing"}, VolumeMounts: []v1.VolumeMount{ { diff --git a/test/e2e/storage/utils/BUILD b/test/e2e/storage/utils/BUILD index 7f279595b7..5f640d83a6 100644 --- a/test/e2e/storage/utils/BUILD +++ b/test/e2e/storage/utils/BUILD @@ -17,6 +17,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//test/e2e/framework:go_default_library", + "//test/utils/image:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", "//vendor/github.com/onsi/gomega:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", diff --git a/test/e2e/storage/utils/utils.go b/test/e2e/storage/utils/utils.go index 58b5bf0a24..e57c0a5573 100644 --- a/test/e2e/storage/utils/utils.go +++ b/test/e2e/storage/utils/utils.go @@ -27,6 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientset "k8s.io/client-go/kubernetes" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" uexec "k8s.io/utils/exec" ) @@ -280,7 +281,7 @@ func RunInPodWithVolume(c clientset.Interface, ns, claimName, command string) { Containers: []v1.Container{ { Name: "volume-tester", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args: []string{"-c", command}, VolumeMounts: []v1.VolumeMount{ diff --git a/test/e2e/storage/volume_provisioning.go b/test/e2e/storage/volume_provisioning.go index e4eb46a089..732ea71fc0 100644 --- a/test/e2e/storage/volume_provisioning.go +++ b/test/e2e/storage/volume_provisioning.go @@ -45,6 +45,7 @@ import ( storageutil "k8s.io/kubernetes/pkg/apis/storage/v1/util" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/storage/utils" + imageutils "k8s.io/kubernetes/test/utils/image" ) type storageClassTest struct { @@ -962,7 +963,7 @@ func runInPodWithVolume(c clientset.Interface, ns, claimName, nodeName, command Containers: []v1.Container{ { Name: "volume-tester", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args: []string{"-c", command}, VolumeMounts: []v1.VolumeMount{ diff --git a/test/e2e/storage/vsphere/BUILD b/test/e2e/storage/vsphere/BUILD index 5372012d09..44b62b4e0e 100644 --- a/test/e2e/storage/vsphere/BUILD +++ b/test/e2e/storage/vsphere/BUILD @@ -51,6 +51,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//test/e2e/framework:go_default_library", "//test/e2e/storage/utils:go_default_library", + "//test/utils/image:go_default_library", "//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", "//vendor/github.com/onsi/gomega:go_default_library", diff --git a/test/e2e/storage/vsphere/vsphere_utils.go b/test/e2e/storage/vsphere/vsphere_utils.go index 7f5cb5e34b..2b22b024d3 100644 --- a/test/e2e/storage/vsphere/vsphere_utils.go +++ b/test/e2e/storage/vsphere/vsphere_utils.go @@ -44,6 +44,7 @@ import ( "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/storage/utils" + imageutils "k8s.io/kubernetes/test/utils/image" ) const ( @@ -288,7 +289,7 @@ func getVSpherePodSpecWithClaim(claimName string, nodeSelectorKV map[string]stri Containers: []v1.Container{ { Name: "volume-tester", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args: []string{"-c", command}, VolumeMounts: []v1.VolumeMount{ @@ -353,7 +354,7 @@ func getVSpherePodSpecWithVolumePaths(volumePaths []string, keyValuelabel map[st Containers: []v1.Container{ { Name: "vsphere-e2e-container-" + string(uuid.NewUUID()), - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: commands, VolumeMounts: volumeMounts, }, diff --git a/test/e2e/upgrades/configmaps.go b/test/e2e/upgrades/configmaps.go index 4abbeb3135..3f06c4ed92 100644 --- a/test/e2e/upgrades/configmaps.go +++ b/test/e2e/upgrades/configmaps.go @@ -118,7 +118,7 @@ func (t *ConfigMapUpgradeTest) testPod(f *framework.Framework) { }, { Name: "configmap-env-test", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"sh", "-c", "env"}, Env: []v1.EnvVar{ { diff --git a/test/e2e/upgrades/secrets.go b/test/e2e/upgrades/secrets.go index 85c067e198..29c02f31e5 100644 --- a/test/e2e/upgrades/secrets.go +++ b/test/e2e/upgrades/secrets.go @@ -114,7 +114,7 @@ func (t *SecretUpgradeTest) testPod(f *framework.Framework) { }, { Name: "secret-env-test", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"sh", "-c", "env"}, Env: []v1.EnvVar{ { diff --git a/test/e2e/upgrades/sysctl.go b/test/e2e/upgrades/sysctl.go index 8ba3fdaeff..5105887f0e 100644 --- a/test/e2e/upgrades/sysctl.go +++ b/test/e2e/upgrades/sysctl.go @@ -29,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/sysctl" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" ) // SecretUpgradeTest tests that a pod with sysctls runs before and after an upgrade. During @@ -127,7 +128,7 @@ func sysctlTestPod(name string, sysctls map[string]string) *v1.Pod { Containers: []v1.Container{ { Name: "test-container", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: append([]string{"/bin/sysctl"}, keys...), }, }, diff --git a/test/e2e_node/gke_environment_test.go b/test/e2e_node/gke_environment_test.go index f0badefd44..fdaeda68f6 100644 --- a/test/e2e_node/gke_environment_test.go +++ b/test/e2e_node/gke_environment_test.go @@ -27,6 +27,7 @@ import ( "strings" "k8s.io/kubernetes/test/e2e/framework" + imageutils "k8s.io/kubernetes/test/utils/image" "github.com/blang/semver" . "github.com/onsi/ginkgo" @@ -170,7 +171,7 @@ func checkDockerConfig() error { // checkDockerNetworkClient checks client networking by pinging an external IP // address from a container. func checkDockerNetworkClient() error { - const imageName = "k8s.gcr.io/busybox" + imageName := imageutils.GetE2EImage(imageutils.BusyBox) output, err := runCommand("docker", "run", "--rm", imageName, "sh", "-c", "ping -w 5 -q google.com") if err != nil { return err diff --git a/test/e2e_node/security_context_test.go b/test/e2e_node/security_context_test.go index 9e89b040e4..3623b3da2e 100644 --- a/test/e2e_node/security_context_test.go +++ b/test/e2e_node/security_context_test.go @@ -50,12 +50,12 @@ var _ = framework.KubeDescribe("Security Context", func() { Containers: []v1.Container{ { Name: "test-container-1", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/top"}, }, { Name: "test-container-2", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sleep"}, Args: []string{"10000"}, }, @@ -91,12 +91,12 @@ var _ = framework.KubeDescribe("Security Context", func() { Containers: []v1.Container{ { Name: "test-container-1", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/top"}, }, { Name: "test-container-2", - Image: "busybox", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sleep"}, Args: []string{"10000"}, }, diff --git a/test/integration/scheduler/volume_binding_test.go b/test/integration/scheduler/volume_binding_test.go index 989df65870..472d3c5d93 100644 --- a/test/integration/scheduler/volume_binding_test.go +++ b/test/integration/scheduler/volume_binding_test.go @@ -40,6 +40,7 @@ import ( persistentvolumeoptions "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/options" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" + imageutils "k8s.io/kubernetes/test/utils/image" ) type testConfig struct { @@ -711,7 +712,7 @@ func makePod(name, ns string, pvcs []string) *v1.Pod { Containers: []v1.Container{ { Name: "write-pod", - Image: "k8s.gcr.io/busybox:1.24", + Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args: []string{"-c", "while true; do sleep 1; done"}, }, diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index f9dfc6a4c6..755e7a051a 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -52,7 +52,7 @@ var ( AdmissionWebhook = ImageConfig{e2eRegistry, "webhook", "1.12v1", false} APIServer = ImageConfig{e2eRegistry, "sample-apiserver", "1.0", false} AppArmorLoader = ImageConfig{gcRegistry, "apparmor-loader", "0.1", false} - BusyBox = ImageConfig{gcRegistry, "busybox", "1.24", false} + BusyBox = ImageConfig{dockerHubRegistry, "busybox", "1.29", false} CheckMetadataConcealment = ImageConfig{gcRegistry, "check-metadata-concealment", "v0.0.3", false} CudaVectorAdd = ImageConfig{e2eRegistry, "cuda-vector-add", "1.0", false} Dnsutils = ImageConfig{e2eRegistry, "dnsutils", "1.1", false}