From ffe003e92acdba7637ea715bd1de314f2d1bf22c Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Fri, 24 Jan 2025 14:56:23 -0700 Subject: [PATCH 1/3] cloudbuild: stage image builds to registry.k8s.io Stage COSI image builds to registry.k8s.io instead of gcr.io. GCR is being deprecated and will be unavailable 18 Mar 2025. Signed-off-by: Blaine Gardner --- hack/cloudbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/cloudbuild.sh b/hack/cloudbuild.sh index 1dffdae8..99748e55 100755 --- a/hack/cloudbuild.sh +++ b/hack/cloudbuild.sh @@ -10,7 +10,7 @@ echo "PLATFORM: ${PLATFORM}" # debug the rest of the script in case of image/CI build issues set -o xtrace -REPO="gcr.io/k8s-staging-sig-storage" +REPO="registry.k8s.io/k8s-staging-sig-storage" CONTROLLER_IMAGE="${REPO}/objectstorage-controller" SIDECAR_IMAGE="${REPO}/objectstorage-sidecar" From fc934659bc91686da5f0cd4d38ea63b2a4b0e032 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Fri, 24 Jan 2025 15:04:13 -0700 Subject: [PATCH 2/3] cloudbuild: update k8s-testimages repo migration info The gcr.io/k8s-testimages/gcb-docker-gcloud image used by COSI still doesn't have a non-deprecated image location. Update the TODO note with the latest info so it can be more easily tracked. Signed-off-by: Blaine Gardner --- cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 3e91d695..8e45ce17 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -16,7 +16,7 @@ substitutions: steps: # TODO: currently gcr.io/k8s-testimages/gcb-docker-gcloud has not moved to Artifact Registry # gcr.io will be shut down 18 Mar 2025, and we need replacement before then. Latest info below: - # https://github.com/kubernetes/test-infra/blob/master/images/gcb-docker-gcloud/cloudbuild.yaml + # https://github.com/kubernetes/k8s.io/issues/1523#issuecomment-920311451 - id: do-multi-arch-build-all-images name: gcr.io/k8s-testimages/gcb-docker-gcloud:v20240718-5ef92b5c36 args: From 713acf6f89f257dcd7c46d9cf0010b986a5acf8f Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Fri, 24 Jan 2025 15:07:44 -0700 Subject: [PATCH 3/3] build: add gcr.io/distroless/static deprecation note Add a note to uses of gcr.io/distroless/static explaining that it isn't necessary to migrate gcr.io usage to artifact hub because the gcr.io/distroless/static image is migrated to be hosted by artifact hub. Signed-off-by: Blaine Gardner --- controller/Dockerfile | 3 +++ hack/Dockerfile.in | 3 +++ sidecar/Dockerfile | 3 +++ 3 files changed, 9 insertions(+) diff --git a/controller/Dockerfile b/controller/Dockerfile index 5b6a216e..e910a087 100644 --- a/controller/Dockerfile +++ b/controller/Dockerfile @@ -29,6 +29,9 @@ RUN CGO_ENABLED=0 go build -o /buildroot/artifacts/controller cmd/*.go # # FINAL IMAGE # + +# gcr.io is deprecated, but gcr.io/distroless/static is hosted by artifact hub with the gcr.io path. +# See: https://github.com/GoogleContainerTools/distroless/issues/1320 FROM gcr.io/distroless/static:nonroot LABEL maintainers="Kubernetes Authors" diff --git a/hack/Dockerfile.in b/hack/Dockerfile.in index 7b8206f2..828ac5ad 100644 --- a/hack/Dockerfile.in +++ b/hack/Dockerfile.in @@ -27,6 +27,9 @@ RUN CGO_ENABLED=0 go build -o /buildroot/artifacts/{{COMPONENT}} cmd/*.go # # FINAL IMAGE # + +# gcr.io is deprecated, but gcr.io/distroless/static is hosted by artifact hub with the gcr.io path. +# See: https://github.com/GoogleContainerTools/distroless/issues/1320 FROM gcr.io/distroless/static:nonroot LABEL maintainers="Kubernetes Authors" diff --git a/sidecar/Dockerfile b/sidecar/Dockerfile index cf9c475b..7ce276cb 100644 --- a/sidecar/Dockerfile +++ b/sidecar/Dockerfile @@ -29,6 +29,9 @@ RUN CGO_ENABLED=0 go build -o /buildroot/artifacts/sidecar cmd/*.go # # FINAL IMAGE # + +# gcr.io is deprecated, but gcr.io/distroless/static is hosted by artifact hub with the gcr.io path. +# See: https://github.com/GoogleContainerTools/distroless/issues/1320 FROM gcr.io/distroless/static:nonroot LABEL maintainers="Kubernetes Authors"