Repository: kubernetes-sigs/prow

Issue:
Migrate away from gcr.io/k8s-testimages repo
/kind bug
/priority important-soon
https://github.com/kubernetes/k8s.io/issues/1523

gcr.io/k8s-testimages is a legacy Google-owned GCR/AR repo. We should migrate to a community-owned AR registry.

See for example https://github.com/kubernetes/k8s.io/issues/1523#issuecomment-918396791

https://cs.k8s.io/?q=k8s-testimages&i=nope&literal=nope&files=&excludeFiles=&repos=kubernetes-sigs/prow

Discussion:
@ylink-lfs: /assign@BenTheElder: /lifecycle frozen
this has to be fixed, eventually these outdated images may not be available anymore.@BenTheElder: It looks like what remains is just test data.

Solution patch:
diff --git a/cmd/admission/dev.yaml b/cmd/admission/dev.yaml
index 05a3ff542..731024808 100644
--- a/cmd/admission/dev.yaml
+++ b/cmd/admission/dev.yaml
@@ -14,7 +14,7 @@ spec:
     spec:
       containers:
       - name: admission
-        image: gcr.io/k8s-testimages/admission:latest  # Note: not gcr.io/k8s-prow for dev
+        image: gcr.io/k8s-staging-test-infra/admission:latest  # Note: not gcr.io/k8s-prow for dev
         imagePullPolicy: Always  # Good practice for dev/debugging, bad for prod
         args:
         - --tls-cert-file=/etc/tls/tls.crt
diff --git a/cmd/branchprotector/oneshot-job.yaml b/cmd/branchprotector/oneshot-job.yaml
index bd66ba58a..8d65884ec 100644
--- a/cmd/branchprotector/oneshot-job.yaml
+++ b/cmd/branchprotector/oneshot-job.yaml
@@ -10,7 +10,7 @@ spec:
     spec:
       containers:
       - name: branchprotector
-        image: gcr.io/k8s-testimages/branchprotector:latest  # Note: not gcr.io/k8s-prow for dev
+        image: us-docker.pkg.dev/k8s-infra-prow/images/branchprotector:v20250704-ef29ebbe9  # Note: not gcr.io/k8s-prow for dev
         imagePullPolicy: Always  # Good practice for dev/debugging, bad for prod
         args:
         - --config-path=/etc/config/config.yaml
diff --git a/cmd/peribolos/dev.yaml b/cmd/peribolos/dev.yaml
index e3168fbbe..9a947a0a5 100644
--- a/cmd/peribolos/dev.yaml
+++ b/cmd/peribolos/dev.yaml
@@ -10,7 +10,7 @@ spec:
     spec:
       containers:
       - name: peribolos
-        image: gcr.io/k8s-testimages/peribolos:latest  # Note: not gcr.io/k8s-prow for dev
+        image: gcr.io/k8s-staging-test-infra/peribolos:latest  # Note: not gcr.io/k8s-prow for dev
         imagePullPolicy: Always  # Good practice for dev/debugging, bad for prod
         args:
         - --config-path=/etc/config/config.yaml
diff --git a/cmd/pipeline/dev.yaml b/cmd/pipeline/dev.yaml
index e964277f1..91cd4c1f5 100644
--- a/cmd/pipeline/dev.yaml
+++ b/cmd/pipeline/dev.yaml
@@ -15,7 +15,7 @@ spec:
       serviceAccount: prow-pipeline
       containers:
       - name: pipeline
-        image: gcr.io/k8s-testimages/pipeline:latest  # Note: not gcr.io/k8s-prow for dev
+        image: gcr.io/k8s-staging-test-infra/pipeline:latest  # Note: not gcr.io/k8s-prow for dev
         imagePullPolicy: Always  # Good practice for dev/debugging, bad for prod
         args:
         - --config=/etc/config/config.yaml
diff --git a/site/content/en/docs/components/cli-tools/generic-autobumper.md b/site/content/en/docs/components/cli-tools/generic-autobumper.md
index 7faa8109f..179957aaa 100644
--- a/site/content/en/docs/components/cli-tools/generic-autobumper.md
+++ b/site/content/en/docs/components/cli-tools/generic-autobumper.md
@@ -84,7 +84,7 @@ prefixes:
     summarise: false
     consistentImages: true
   - name: "Prow-Test-Images"
-    prefix: "gcr.io/k8s-testimages/"
+    prefix: "gcr.io/k8s-staging-test-infra/"
     repo: "https://github.com/kubernetes/test-infra"
     summarise: false
     consistentImages: false



Test patch:
diff --git a/cmd/generic-autobumper/imagebumper/imagebumper_test.go b/cmd/generic-autobumper/imagebumper/imagebumper_test.go
index 7721f5323..1b83c6e43 100644
--- a/cmd/generic-autobumper/imagebumper/imagebumper_test.go
+++ b/cmd/generic-autobumper/imagebumper/imagebumper_test.go
@@ -290,43 +290,43 @@ func TestUpdateAllTags(t *testing.T) {
 		},
 		{
 			name:           "file that has only an image replaces the image",
-			content:        "gcr.io/k8s-testimages/some-image:v20190404-12345678",
-			expectedResult: "gcr.io/k8s-testimages/some-image:v20190405-123456789",
+			content:        "gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678",
+			expectedResult: "gcr.io/k8s-staging-test-infra/some-image:v20190405-123456789",
 			newTags: map[string]string{
-				"gcr.io/k8s-testimages/some-image:v20190404-12345678": "v20190405-123456789",
+				"gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678": "v20190405-123456789",
 			},
 		},
 		{
 			name:           "file that has content before and after an image still has it later",
-			content:        `{"image": "gcr.io/k8s-testimages/some-image:v20190404-12345678"}`,
-			expectedResult: `{"image": "gcr.io/k8s-testimages/some-image:v20190405-123456789"}`,
+			content:        `{"image": "gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678"}`,
+			expectedResult: `{"image": "gcr.io/k8s-staging-test-infra/some-image:v20190405-123456789"}`,
 			newTags: map[string]string{
-				"gcr.io/k8s-testimages/some-image:v20190404-12345678": "v20190405-123456789",
+				"gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678": "v20190405-123456789",
 			},
 		},
 		{
 			name:           "file that has multiple different images replaces both of them",
-			content:        `{"images": ["gcr.io/k8s-testimages/some-image:v20190404-12345678-master", "gcr.io/k8s-testimages/some-image:v20190404-12345678-experimental"]}`,
-			expectedResult: `{"images": ["gcr.io/k8s-testimages/some-image:v20190405-123456789-master", "gcr.io/k8s-testimages/some-image:v20190405-123456789-experimental"]}`,
+			content:        `{"images": ["gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678-master", "gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678-experimental"]}`,
+			expectedResult: `{"images": ["gcr.io/k8s-staging-test-infra/some-image:v20190405-123456789-master", "gcr.io/k8s-staging-test-infra/some-image:v20190405-123456789-experimental"]}`,
 			newTags: map[string]string{
-				"gcr.io/k8s-testimages/some-image:v20190404-12345678-master":       "v20190405-123456789-master",
-				"gcr.io/k8s-testimages/some-image:v20190404-12345678-experimental": "v20190405-123456789-experimental",
+				"gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678-master":       "v20190405-123456789-master",
+				"gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678-experimental": "v20190405-123456789-experimental",
 			},
 		},
 		{
 			name:           "file with an error image is still otherwise updated",
-			content:        `{"images": ["gcr.io/k8s-testimages/some-image:0.2", "gcr.io/k8s-testimages/some-image:v20190404-12345678"]}`,
-			expectedResult: `{"images": ["gcr.io/k8s-testimages/some-image:0.2", "gcr.io/k8s-testimages/some-image:v20190405-123456789"]}`,
+			content:        `{"images": ["gcr.io/k8s-staging-test-infra/some-image:0.2", "gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678"]}`,
+			expectedResult: `{"images": ["gcr.io/k8s-staging-test-infra/some-image:0.2", "gcr.io/k8s-staging-test-infra/some-image:v20190405-123456789"]}`,
 			newTags: map[string]string{
-				"gcr.io/k8s-testimages/some-image:v20190404-12345678": "v20190405-123456789",
+				"gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678": "v20190405-123456789",
 			},
 		},
 		{
 			name:           "gcr subdomains are supported",
-			content:        `{"images": ["eu.gcr.io/k8s-testimages/some-image:v20190404-12345678"]}`,
-			expectedResult: `{"images": ["eu.gcr.io/k8s-testimages/some-image:v20190405-123456789"]}`,
+			content:        `{"images": ["eu.gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678"]}`,
+			expectedResult: `{"images": ["eu.gcr.io/k8s-staging-test-infra/some-image:v20190405-123456789"]}`,
 			newTags: map[string]string{
-				"eu.gcr.io/k8s-testimages/some-image:v20190404-12345678": "v20190405-123456789",
+				"eu.gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678": "v20190405-123456789",
 			},
 		},
 		{
@@ -347,13 +347,13 @@ func TestUpdateAllTags(t *testing.T) {
 		},
 		{
 			name:           "images not matching the filter regex are not updated",
-			content:        `{"images": ["gcr.io/k8s-prow/pkg-thing:v20190404-12345678", "gcr.io/k8s-testimages/some-image:v20190404-12345678"]}`,
-			expectedResult: `{"images": ["gcr.io/k8s-prow/pkg-thing:v20190404-12345678", "gcr.io/k8s-testimages/some-image:v20190405-123456789"]}`,
+			content:        `{"images": ["gcr.io/k8s-prow/pkg-thing:v20190404-12345678", "gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678"]}`,
+			expectedResult: `{"images": ["gcr.io/k8s-prow/pkg-thing:v20190404-12345678", "gcr.io/k8s-staging-test-infra/some-image:v20190405-123456789"]}`,
 			newTags: map[string]string{
-				"gcr.io/k8s-prow/pkg-thing:v20190404-12345678":        "v20190405-123456789",
-				"gcr.io/k8s-testimages/some-image:v20190404-12345678": "v20190405-123456789",
+				"gcr.io/k8s-prow/pkg-thing:v20190404-12345678":                "v20190405-123456789",
+				"gcr.io/k8s-staging-test-infra/some-image:v20190404-12345678": "v20190405-123456789",
 			},
-			imageFilter: regexp.MustCompile("gcr.io/k8s-testimages"),
+			imageFilter: regexp.MustCompile("gcr.io/k8s-staging-test-infra"),
 		},
 	}