Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish images to new staging registry #2476

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/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
10 changes: 5 additions & 5 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/kueue
IMAGE_REGISTRY ?= $(STAGING_IMAGE_REGISTRY)
IMAGE_NAME := kueue
IMAGE_REPO ?= $(IMAGE_REGISTRY)/$(IMAGE_NAME)
Expand Down Expand Up @@ -214,7 +214,7 @@ image-push: image-build

.PHONY: helm-chart-push
helm-chart-push: yq helm
EXTRA_TAG="$(EXTRA_TAG)" GIT_TAG="$(GIT_TAG)" HELM_CHART_REPO="$(HELM_CHART_REPO)" IMAGE_REPO="$(IMAGE_REPO)" HELM="$(HELM)" YQ="$(YQ)" ./hack/push-chart.sh
EXTRA_TAG="$(EXTRA_TAG)" GIT_TAG="$(GIT_TAG)" IMAGE_REGISTRY="$(IMAGE_REGISTRY)" HELM_CHART_REPO="$(HELM_CHART_REPO)" IMAGE_REPO="$(IMAGE_REPO)" HELM="$(HELM)" YQ="$(YQ)" ./hack/push-chart.sh

# Build an amd64 image that can be used for Kind E2E tests.
.PHONY: kind-image-build
Expand All @@ -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/kueue:$(RELEASE_BRANCH))

.PHONY: install
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
Expand Down Expand Up @@ -286,7 +286,7 @@ 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) \
Expand Down Expand Up @@ -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/kueue
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/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/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/k8s-staging-images/kueue
- 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`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promote this image to registry.k8s.io and ask users to use it from registry.k8s.io/kueue/importer:vX.Y.Z

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do it in a follow up. Right now, promoting this image is not part of our release process.


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/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
5 changes: 3 additions & 2 deletions hack/push-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ 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}
IMAGE_REGISTRY=${IMAGE_REGISTRY:-us-central1-docker.pkg.dev/k8s-staging-images/kueue}
HELM_CHART_REPO=${HELM_CHART_REPO:-${IMAGE_REGISTRY}/charts}
IMAGE_REPO=${IMAGE_REPO:-${IMAGE_REGISTRY}/kueue}

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