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

Default to quay.io for image hub and registry image #1473

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ if [[ "${reg_state}" == "exited" ]]; then
sudo "${CONTAINER_RUNTIME}" start registry
elif [[ "${reg_state}" != "running" ]]; then
sudo "${CONTAINER_RUNTIME}" rm registry -f || true
sudo "${CONTAINER_RUNTIME}" run -d -p "${REGISTRY}":5000 --name registry "${DOCKER_REGISTRY_IMAGE}"
sudo "${CONTAINER_RUNTIME}" run -d -p "${REGISTRY}":5000 --name registry "${CONTAINER_REGISTRY_IMAGE}"
fi
sleep 5

Expand Down
10 changes: 5 additions & 5 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ export BARE_METAL_OPERATOR_TAG="${BARE_METAL_OPERATOR_TAG:-latest}"
export KEEPALIVED_TAG="${KEEPALIVED_TAG:-latest}"
export MARIADB_TAG="${MARIADB_TAG:-latest}"

# Docker Hub proxy registry (or docker.io if no proxy)
export DOCKER_HUB_PROXY="${DOCKER_HUB_PROXY:-docker.io}"
# Container Hub proxy registry (deafult to quay.io if no proxy)
export CONTAINER_HUB_PROXY="${CONTAINER_HUB_PROXY:-quay.io}"

# Docker registry for local images
export DOCKER_REGISTRY_IMAGE="${DOCKER_REGISTRY_IMAGE:-${DOCKER_HUB_PROXY}/library/registry:2.7.1}"
# Container registry for local images
export CONTAINER_REGISTRY_IMAGE="${CONTAINER_REGISTRY_IMAGE:-${CONTAINER_HUB_PROXY}/libpod/registry:2.8}"

# Registry to pull metal3 container images from
export CONTAINER_REGISTRY="${CONTAINER_REGISTRY:-quay.io}"
Expand Down Expand Up @@ -364,7 +364,7 @@ export MINIKUBE_VERSION="${MINIKUBE_VERSION:-v1.34.0}"
# Kind, kind node image versions (if EPHEMERAL_CLUSTER=kind)
export KIND_VERSION="${KIND_VERSION:-v0.24.0}"
export KIND_NODE_IMAGE_VERSION="${KIND_NODE_IMAGE_VERSION:-v1.31.0}"
export KIND_NODE_IMAGE="${KIND_NODE_IMAGE:-${DOCKER_HUB_PROXY}/kindest/node:${KIND_NODE_IMAGE_VERSION}}"
export KIND_NODE_IMAGE="${KIND_NODE_IMAGE:-${CONTAINER_HUB_PROXY}/kindest/node:${KIND_NODE_IMAGE_VERSION}}"

# Tilt
export TILT_VERSION="${TILT_VERSION:-v0.32.3}"
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"^lib/common.sh$"
],
"matchStrings": [
"DOCKER_REGISTRY_IMAGE:-\"registry:(?<currentValue>.*?)\"}"
"CONTAINER_REGISTRY_IMAGE:-\"registry:(?<currentValue>.*?)\"}"
],
"depNameTemplate": "registry",
"datasourceTemplate": "docker"
Expand Down
4 changes: 2 additions & 2 deletions tests/roles/run_tests/tasks/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
- name: Pin calico version to v3.25.1
ansible.builtin.replace:
path: /tmp/calico.yaml
regexp: 'image: docker.io/calico/(.+):v(.+)$'
replace: 'image: {{ DOCKER_HUB_PROXY }}/calico/\1:{{ CALICO_PATCH_RELEASE }}'
regexp: 'image: quay.io/calico/(.+):v(.+)$'
replace: 'image: {{ CONTAINER_HUB_PROXY }}/calico/\1:{{ CALICO_PATCH_RELEASE }}'

- name: Replace the POD_CIDR in calico config
replace:
Expand Down
2 changes: 1 addition & 1 deletion tests/roles/run_tests/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ IMAGE_USERNAME: "{{ lookup('env', 'IMAGE_USERNAME') | default('metal3', true) }}
REGISTRY: "{{ lookup('env', 'REGISTRY') | default('192.168.111.1:5000', true) }}"
CALICO_MINOR_RELEASE: "{{ lookup('env', 'CALICO_MINOR_RELEASE') | default('v3.25.1', true) }}"
CALICO_PATCH_RELEASE: "{{ lookup('env', 'CALICO_PATCH_RELEASE') | default('v3.25.1', true) }}"
DOCKER_HUB_PROXY: "{{ lookup('env', 'DOCKER_HUB_PROXY') }}"
CONTAINER_HUB_PROXY: "{{ lookup('env', 'CONTAINER_HUB_PROXY') }}"
WORKING_DIR: "{{ lookup('env', 'WORKING_DIR') | default('/opt/metal3-dev-env', true) }}"

# Environment variables for deployment. IMAGE_OS can be centos or ubuntu, change accordingly to your needs.
Expand Down
2 changes: 1 addition & 1 deletion vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ assured that they are persisted.
| IMAGE_LOCATION | Location of the image to download | | https://artifactory.nordix.org/artifactory/metal3/images/${KUBERNETES_VERSION} |
| IMAGE_USERNAME | Image username for ssh | | "metal3" |
| CONTAINER_REGISTRY | Registry to pull metal3 container images from | | "quay.io" |
| DOCKER_HUB_PROXY | Registry to pull docker hub images from | | "docker.io" |
| CONTAINER_HUB_PROXY | Registry to pull container hub images from | | "quay.io" |
| IRONIC_IMAGE | Container image for local ironic services | | "$CONTAINER_REGISTRY/metal3-io/ironic" |
| VBMC_IMAGE | Container image for vbmc container | | "$CONTAINER_REGISTRY/metal3-io/vbmc" |
| SUSHY_TOOLS_IMAGE | Container image for sushy-tools container | | "$CONTAINER_REGISTRY/metal3-io/sushy-tools" |
Expand Down