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

Migrated kCTF from Google Container Registry to Artifact Registry #406

Open
wants to merge 5 commits into
base: v1
Choose a base branch
from

Conversation

HlynurOskar
Copy link

Container Registry is deprecated and scheduled for shutdown. After May 15, 2024, Artifact Registry will host images for the gcr.io domain in Google Cloud projects without previous Container Registry usage. After March 18, 2025, Container Registry will be shut down.

Copy link
Member

@sirdarckcat sirdarckcat left a comment

Choose a reason for hiding this comment

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

Please also update

GCP_REGISTRIES="gcr.io asia.gcr.io eu.gcr.io us.gcr.io"
CV

dist/bin/kctf-cluster Outdated Show resolved Hide resolved
dist/bin/kctf-challenge Outdated Show resolved Hide resolved
dist/bin/kctf-cluster Outdated Show resolved Hide resolved
@@ -166,7 +166,7 @@ function push_image {

case "${CLUSTER_TYPE}" in
gce)
IMAGE_URL="${REGISTRY}/${PROJECT}/${CHALLENGE_NAME}-${IMAGE_NAME}:${IMAGE_ID}"
IMAGE_URL="${REGISTRY}/${PROJECT}/${CLUSTER_NAME}-${CHALLENGE_NAME}/${IMAGE_NAME}:${IMAGE_ID}"
Copy link
Member

Choose a reason for hiding this comment

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

Is there a difference between slashes here? Maybe just add slashes too, for consistency.

Copy link
Author

@HlynurOskar HlynurOskar Apr 23, 2024

Choose a reason for hiding this comment

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

There is a significance to the slashes, it's a path that gets parsed.
Although, some want the path to be more like:
IMAGE_URL="${REGISTRY}/${PROJECT}/challenges/${CLUSTER_NAME}-${CHALLENGE_NAME}-${IMAGE_NAME}:${IMAGE_ID}"

Copy link
Member

Choose a reason for hiding this comment

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

What if we have a dash in the cluster? Wouldn't that cause a collision?

Copy link

@pl4nty pl4nty Jan 11, 2025

Choose a reason for hiding this comment

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

the registry should be shared by all challenges, so we can create it in kctf cluster create rather than managing several in kctf challenge. I used IMAGE_URL="${REGISTRY}/${PROJECT}/${CLUSTER_NAME}/${CHALLENGE_NAME}-${IMAGE_NAME}:${IMAGE_ID}"

should registry creation be part of this PR? Container Registry is shutting down very soon

@@ -95,7 +95,7 @@ function _kctf_complete_chal() {
# This will be out of date at some point, but still useful so worth it?
# We can't fetch it easily with gcloud unfortunately since it requires a project
GCP_REGIONS="us-east1-b us-east1-c us-east1-d us-east4-c us-east4-b us-east4-a us-central1-c us-central1-a us-central1-f us-central1-b us-west1-b us-west1-c us-west1-a europe-west4-a europe-west4-b europe-west4-c europe-west1-b europe-west1-d europe-west1-c europe-west3-c europe-west3-a europe-west3-b europe-west2-c europe-west2-b europe-west2-a asia-east1-b asia-east1-a asia-east1-c asia-southeast1-b asia-southeast1-a asia-southeast1-c asia-northeast1-b asia-northeast1-c asia-northeast1-a asia-south1-c asia-south1-b asia-south1-a australia-southeast1-b australia-southeast1-c australia-southeast1-a southamerica-east1-b southamerica-east1-c southamerica-east1-a asia-east2-a asia-east2-b asia-east2-c asia-northeast2-a asia-northeast2-b asia-northeast2-c asia-northeast3-a asia-northeast3-b asia-northeast3-c asia-southeast2-a asia-southeast2-b asia-southeast2-c europe-north1-a europe-north1-b europe-north1-c europe-west6-a europe-west6-b europe-west6-c northamerica-northeast1-a northamerica-northeast1-b northamerica-northeast1-c us-west2-a us-west2-b us-west2-c us-west3-a us-west3-b us-west3-c us-west4-a us-west4-b us-west4-c"
GCP_REGISTRIES="gcr.io asia.gcr.io eu.gcr.io us.gcr.io"
GCP_REGISTRIES="pkg.dev docker.pkg.dev"
Copy link
Member

Choose a reason for hiding this comment

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

This should include the zones I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants