Skip to content

Commit

Permalink
Publish images to new staging registry
Browse files Browse the repository at this point in the history
  • Loading branch information
IrvingMg committed Jun 25, 2024
1 parent fd98626 commit fd92f73
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/NEW_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Please do not remove items from the checklist
- [ ] An OWNER pushes the tag with
`git push $VERSION`
- Triggers prow to build and publish a staging container image
`gcr.io/k8s-staging-kueue/kueue:$VERSION`
`us-central1-docker.pkg.dev/k8s-staging-images/kueue:$VERSION`
- [ ] Submit a PR against [k8s.io](https://github.com/kubernetes/k8s.io),
updating `registry.k8s.io/images/k8s-staging-kueue/images.yaml` to
[promote the container images](https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io#image-promoter)
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DOCKER_BUILDX_CMD ?= docker buildx
IMAGE_BUILD_CMD ?= $(DOCKER_BUILDX_CMD) build
IMAGE_BUILD_EXTRA_OPTS ?=
# TODO(#52): Add kueue to k8s gcr registry
STAGING_IMAGE_REGISTRY := gcr.io/k8s-staging-kueue
STAGING_IMAGE_REGISTRY := us-central1-docker.pkg.dev/k8s-staging-images
IMAGE_REGISTRY ?= $(STAGING_IMAGE_REGISTRY)
IMAGE_NAME := kueue
IMAGE_REPO ?= $(IMAGE_REGISTRY)/$(IMAGE_NAME)
Expand Down Expand Up @@ -228,7 +228,7 @@ ifndef ignore-not-found
ignore-not-found = false
endif

clean-manifests = (cd config/components/manager && $(KUSTOMIZE) edit set image controller=gcr.io/k8s-staging-kueue/kueue:$(RELEASE_BRANCH))
clean-manifests = (cd config/components/manager && $(KUSTOMIZE) edit set image controller=us-central1-docker.pkg.dev/k8s-staging-images/kueue:$(RELEASE_BRANCH))

.PHONY: install
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
Expand Down Expand Up @@ -286,10 +286,10 @@ prepare-release-branch: yq kustomize ## Prepare the release branch with the rele
##@ Debug

# Build an image that can be used with kubectl debug
# Developers don't need to build this image, as it will be available as gcr.io/k8s-staging-kueue/debug
# Developers don't need to build this image, as it will be available as us-central1-docker.pkg.dev/k8s-staging-images/kueue/debug
.PHONY: debug-image-push
debug-image-push: ## Build and push the debug image to the registry
$(IMAGE_BUILD_CMD) -t $(IMAGE_REGISTRY)/debug:$(GIT_TAG) \
$(IMAGE_BUILD_CMD) -t $(IMAGE_REPO)/debug:$(GIT_TAG) \
--platform=$(PLATFORMS) \
--push ./hack/debugpod

Expand All @@ -301,8 +301,8 @@ importer-build:
.PHONY: importer-image-build
importer-image-build:
$(IMAGE_BUILD_CMD) \
-t $(IMAGE_REGISTRY)/importer:$(GIT_TAG) \
-t $(IMAGE_REGISTRY)/importer:$(RELEASE_BRANCH)-latest \
-t $(IMAGE_REPO)/importer:$(GIT_TAG) \
-t $(IMAGE_REPO)/importer:$(RELEASE_BRANCH)-latest \
--platform=$(PLATFORMS) \
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg BUILDER_IMAGE=$(BUILDER_IMAGE) \
Expand All @@ -314,7 +314,7 @@ importer-image-build:
importer-image-push: PUSH=--push
importer-image-push: importer-image-build

# Build a docker local gcr.io/k8s-staging-kueue/importer image
# Build a docker local us-central1-docker.pkg.dev/k8s-staging-images/kueue/importer image
.PHONY: importer-image
importer-image: PLATFORMS=linux/amd64
importer-image: PUSH=--load
Expand Down
2 changes: 1 addition & 1 deletion Makefile-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ KIND_CLUSTER_NAME ?= kind

GIT_TAG ?= $(shell git describe --tags --dirty --always)
# TODO(#52): Add kueue to k8s gcr registry
STAGING_IMAGE_REGISTRY := gcr.io/k8s-staging-kueue
STAGING_IMAGE_REGISTRY := us-central1-docker.pkg.dev/k8s-staging-images
IMAGE_REGISTRY ?= $(STAGING_IMAGE_REGISTRY)
IMAGE_NAME := kueue
IMAGE_REPO ?= $(IMAGE_REGISTRY)/$(IMAGE_NAME)
Expand Down
2 changes: 1 addition & 1 deletion charts/kueue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The following table lists the configurable parameters of the kueue chart and the
| `enablePrometheus` | enable Prometheus | `false` |
| `enableCertManager` | enable CertManager | `false` |
| `controllerManager.kubeRbacProxy.image` | controllerManager.kubeRbacProxy's image | `gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0` |
| `controllerManager.manager.image` | controllerManager.manager's image | `gcr.io/k8s-staging-kueue/kueue:main` |
| `controllerManager.manager.image` | controllerManager.manager's image | `us-central1-docker.pkg.dev/k8s-staging-images/kueue:main` |
| `controllerManager.manager.resources` | controllerManager.manager's resources | abbr. |
| `controllerManager.replicas` | ControllerManager's replicaCount | `1` |
| `controllerManager.imagePullSecrets` | ControllerManager's imagePullSecrets | `[]` |
Expand Down
2 changes: 1 addition & 1 deletion charts/kueue/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ controllerManager:
pullPolicy: IfNotPresent
manager:
image:
repository: gcr.io/k8s-staging-kueue/kueue
repository: us-central1-docker.pkg.dev/k8s-staging-images/kueue
# This should be set to 'IfNotPresent' for released version
pullPolicy: Always
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
- importer-image-push
- helm-chart-push
env:
- IMAGE_REGISTRY=gcr.io/$PROJECT_ID
- IMAGE_REGISTRY=us-central1-docker.pkg.dev/$PROJECT_ID
- GIT_TAG=$_GIT_TAG
- EXTRA_TAG=$_PULL_BASE_REF
- DOCKER_BUILDX_CMD=/buildx-entrypoint
Expand Down
4 changes: 2 additions & 2 deletions cmd/importer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ Make the created image accessible by your cluster.
(cd cmd/importer/run-in-cluster && kustomize edit set image importer=<image:tag>)
```
You can use the image that you built in step one or one of images published in
https://gcr.io/k8s-staging-kueue/importer, for example:
`gcr.io/k8s-staging-kueue/importer:main-latest`
https://us-central1-docker.pkg.dev/k8s-staging-images/kueue/importer, for example:
`us-central1-docker.pkg.dev/k8s-staging-images/kueue/importer:main-latest`

3. Update the importer args in `cmd/importer/run-in-cluster/importer.yaml` as needed.

Expand Down
2 changes: 1 addition & 1 deletion cmd/importer/run-in-cluster/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ configMapGenerator:

images:
- name: importer
newName: gcr.io/k8s-staging-kueue/importer
newName: us-central1-docker.pkg.dev/k8s-staging-images/kueue/importer

namespace: kueue-importer
2 changes: 1 addition & 1 deletion config/components/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: gcr.io/k8s-staging-kueue/kueue
newName: us-central1-docker.pkg.dev/k8s-staging-images/kueue
newTag: main
2 changes: 1 addition & 1 deletion hack/dump_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -o pipefail

NAMESPACE=${NAMESPACE:-kueue-system}
LEASE_NAME=${LEASE_NAME:-c1f6bfd2.kueue.x-k8s.io}
DEBUG_IMAGE=${DEBUG_IMAGE:-gcr.io/k8s-staging-kueue/debug:main}
DEBUG_IMAGE=${DEBUG_IMAGE:-us-central1-docker.pkg.dev/k8s-staging-images/kueue/debug:main}

leader=$(kubectl get lease -n ${NAMESPACE} ${LEASE_NAME} -o jsonpath='{.spec.holderIdentity}' | cut -d '_' -f 1)

Expand Down
4 changes: 2 additions & 2 deletions hack/push-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ DEST_CHART_DIR=${DEST_CHART_DIR:-bin/}

EXTRA_TAG=${EXTRA_TAG:-$(git branch --show-current)}
GIT_TAG=${GIT_TAG:-$(git describe --tags --dirty --always)}
HELM_CHART_REPO=${HELM_CHART_REPO:-gcr.io/k8s-staging-kueue/charts}
IMAGE_REPO=${IMAGE_REPO:-gcr.io/k8s-staging-kueue/kueue}
HELM_CHART_REPO=${HELM_CHART_REPO:-us-central1-docker.pkg.dev/k8s-staging-images/charts}
IMAGE_REPO=${IMAGE_REPO:-us-central1-docker.pkg.dev/k8s-staging-images/kueue}

HELM=${HELM:-./bin/helm}
YQ=${YQ:-./bin/yq}
Expand Down

0 comments on commit fd92f73

Please sign in to comment.