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

platform/#2862: change docker-mirror to docker-proxy and variables accordingly #256

Merged
merged 1 commit into from
Dec 6, 2024
Merged
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
30 changes: 15 additions & 15 deletions templates/.gitlab-ci-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ image: ${DEFAULT_IMAGE_REGISTRY}/${DEFAULT_IMAGE_REPOSITORY}:${DEFAULT_IMAGE_TAG

# MTU configuration: https://docs.gitlab.com/runner/executors/kubernetes/troubleshooting.html#curl-35-openssl-ssl_connect-ssl_error_syscall-in-connection-to-githubcom443
services:
- name: ${DOCKER_MIRROR_IMAGE_REGISTRY}/${DOCKER_MIRROR_IMAGE_REPOSITORY}:${DOCKER_MIRROR_IMAGE_TAG}
alias: docker-mirror
- name: ${DOCKER_PROXY_IMAGE_REGISTRY}/${DOCKER_PROXY_IMAGE_REPOSITORY}:${DOCKER_PROXY_IMAGE_TAG}
alias: docker-proxy
command:
[
"--registry=https://europe-west1-docker.pkg.dev/spark-int-cloud-services/docker-hub-mirror",
Expand All @@ -13,11 +13,11 @@ services:
command:
[
"--registry-mirror",
"http://docker-mirror:5000/spark-int-cloud-services/docker-hub-mirror/",
"http://docker-proxy:5000/spark-int-cloud-services/docker-hub-mirror/",
"--registry-mirror",
"https://mirror.gcr.io",
"--insecure-registry",
"docker-mirror:5000",
"docker-proxy:5000",
"--mtu=1460",
"--network-control-plane-mtu=1460",
"--default-network-opt=bridge=com.docker.network.driver.mtu=1460",
Expand All @@ -29,12 +29,12 @@ variables:
DEFAULT_IMAGE_REGISTRY: ghcr.io
DEFAULT_IMAGE_REPOSITORY: sparkfabrik/spark-k8s-deployer
DEFAULT_IMAGE_TAG: latest
# Docker-mirror image configuration.
# Docker-proxy image configuration.
# You can override these variables in your project's .gitlab-ci.yml file
# to change the image used for docker-mirror service.
DOCKER_MIRROR_IMAGE_REGISTRY: ghcr.io
DOCKER_MIRROR_IMAGE_REPOSITORY: sparkfabrik/gcp-artifact-registry-docker-proxy
DOCKER_MIRROR_IMAGE_TAG: latest
# to change the image used for docker-proxy service.
DOCKER_PROXY_IMAGE_REGISTRY: ghcr.io
DOCKER_PROXY_IMAGE_REPOSITORY: sparkfabrik/gcp-artifact-registry-docker-proxy
DOCKER_PROXY_IMAGE_TAG: latest
# When using dind service, we need to instruct docker to talk with
# the daemon started inside of the service. The daemon is available
# with a network connection instead of the default
Expand Down Expand Up @@ -144,20 +144,20 @@ variables:
fi

# Test Docker mirrors
section_start "test-docker-mirrors" "Test Docker mirrors"
echo "Test docker-mirror GitLab service"
if ! nc -w10 -zv docker-mirror 5000; then
echo "docker-mirror service not available"
section_start "test-docker-proxy" "Test Docker proxy"
echo "Test docker-proxy GitLab service"
if ! nc -w10 -zv docker-proxy 5000; then
echo "docker-proxy service not available"
else
echo "docker-mirror service available"
echo "docker-proxy service available"
fi
echo "Test GCP mirror.gcr.io"
if ! nc -w10 -zv mirror.gcr.io 443; then
echo "mirror.gcr.io service not available"
else
echo "mirror.gcr.io service available"
fi
section_end "test-docker-mirrors"
section_end "test-docker-proxy"

# If the job is running using `spark-k8s-deployer`, source the common
# functions and execute initialization setup.
Expand Down
Loading