From 3a981a9839ae8e36d8f74eb303b085090771798a Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Mon, 2 Jan 2023 07:23:25 +0900 Subject: [PATCH] Switch away from Docker Hub to avoid rate limits Fix issue 1052 Signed-off-by: Akihiro Suda --- pkg/benchmark/image.go | 19 +++++++++++-------- pkg/framework/util.go | 2 +- pkg/validate/consts.go | 2 +- pkg/validate/multi_container_linux.go | 2 +- pkg/validate/security_context_linux.go | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/pkg/benchmark/image.go b/pkg/benchmark/image.go index 9d2167c883..51e9ecf289 100644 --- a/pkg/benchmark/image.go +++ b/pkg/benchmark/image.go @@ -34,19 +34,22 @@ import ( const ( defaultImageBenchmarkTimeoutSeconds = 10 + + // defaultImageListingPrefix is for avoiding Docker Hub's rate limit + defaultImageListingPrefix = "public.ecr.aws/docker/library/" ) var defaultImageListingBenchmarkImagesAmd64 = []string{ - "busybox:1.26.2-glibc", - "busybox:1-uclibc", - "busybox:1", - "busybox:1-glibc", - "busybox:1-musl", + defaultImageListingPrefix + "busybox:1.35.0-glibc", + defaultImageListingPrefix + "busybox:1-uclibc", + defaultImageListingPrefix + "busybox:1", + defaultImageListingPrefix + "busybox:1-glibc", + defaultImageListingPrefix + "busybox:1-musl", } var defaultImageListingBenchmarkImages = []string{ - "busybox:1", - "busybox:1-glibc", - "busybox:1-musl", + defaultImageListingPrefix + "busybox:1", + defaultImageListingPrefix + "busybox:1-glibc", + defaultImageListingPrefix + "busybox:1-musl", } var _ = framework.KubeDescribe("Image", func() { diff --git a/pkg/framework/util.go b/pkg/framework/util.go index bcfbfa8469..7a066e78ea 100644 --- a/pkg/framework/util.go +++ b/pkg/framework/util.go @@ -94,7 +94,7 @@ const ( DefaultStopContainerTimeout int64 = 60 // DefaultLinuxContainerImage default container image for Linux - DefaultLinuxContainerImage string = "busybox:1.28" + DefaultLinuxContainerImage string = "k8s.gcr.io/e2e-test-images/busybox:1.29-2" // DefaultWindowsContainerImage default container image for Windows DefaultWindowsContainerImage string = "k8s.gcr.io/e2e-test-images/busybox:1.29-2" diff --git a/pkg/validate/consts.go b/pkg/validate/consts.go index 7d329cc886..d4f800cdc0 100644 --- a/pkg/validate/consts.go +++ b/pkg/validate/consts.go @@ -197,7 +197,7 @@ const ( webServerHostNetContainerPort int32 = 12003 // Linux defaults - webServerLinuxImage = "nginx" + webServerLinuxImage = "k8s.gcr.io/e2e-test-images/nginx:1.14-2" hostNetWebServerLinuxImage = registry + "hostnet-nginx-" + runtime.GOARCH // Windows defaults diff --git a/pkg/validate/multi_container_linux.go b/pkg/validate/multi_container_linux.go index 231f916a05..ee3eb1cef2 100644 --- a/pkg/validate/multi_container_linux.go +++ b/pkg/validate/multi_container_linux.go @@ -34,7 +34,7 @@ import ( const ( httpdContainerPort = 80 - httpdImage = "httpd" + httpdImage = "k8s.gcr.io/e2e-test-images/httpd:2.4.39-4" ) var _ = framework.KubeDescribe("Multiple Containers [Conformance]", func() { diff --git a/pkg/validate/security_context_linux.go b/pkg/validate/security_context_linux.go index 9a0acc9650..629e51daf5 100644 --- a/pkg/validate/security_context_linux.go +++ b/pkg/validate/security_context_linux.go @@ -36,7 +36,7 @@ import ( ) const ( - nginxContainerImage string = "nginx:1.18" + nginxContainerImage string = "k8s.gcr.io/e2e-test-images/nginx:1.14-2" localhost string = "localhost/" noNewPrivsImage string = "k8s.gcr.io/e2e-test-images/nonewprivs:1.3" )