From c74e1c9db334f487302dd7b7085d780233949e1a Mon Sep 17 00:00:00 2001 From: Cristian Calin <6627509+cristicalin@users.noreply.github.com> Date: Fri, 19 Nov 2021 23:23:40 +0200 Subject: [PATCH] CI: use images from quay.io to prevent being throttled by docker hub (#8209) * CI: use netchecker images from quay to prevent throttling * Molecule: use hello-world image from quay.io --- .../docker/molecule/default/tests/test_default.py | 4 ++-- .../gvisor/molecule/default/files/container.json | 2 +- .../gvisor/molecule/default/tests/test_default.py | 2 +- .../kata-containers/molecule/default/files/container.json | 2 +- .../kata-containers/molecule/default/tests/test_default.py | 2 +- tests/common/_docker_hub_registry_mirror.yml | 3 +++ 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/roles/container-engine/docker/molecule/default/tests/test_default.py b/roles/container-engine/docker/molecule/default/tests/test_default.py index 5a18cc8f7..5cc0627b9 100644 --- a/roles/container-engine/docker/molecule/default/tests/test_default.py +++ b/roles/container-engine/docker/molecule/default/tests/test_default.py @@ -14,6 +14,6 @@ def test_docker_service(host): def test_docker_run(host): with host.sudo(): - cmd = host.command("docker run hello-world") + cmd = host.command("docker run quay.io/kubespray/hello-world:latest") assert cmd.rc == 0 - assert "Hello from Docker!" in cmd.stdout + assert "Hello from Docker" in cmd.stdout diff --git a/roles/container-engine/gvisor/molecule/default/files/container.json b/roles/container-engine/gvisor/molecule/default/files/container.json index 3490359d0..acec0ce6f 100644 --- a/roles/container-engine/gvisor/molecule/default/files/container.json +++ b/roles/container-engine/gvisor/molecule/default/files/container.json @@ -3,7 +3,7 @@ "name": "gvisor1" }, "image": { - "image": "docker.io/library/hello-world:latest" + "image": "quay.io/kubespray/hello-world:latest" }, "log_path": "gvisor1.0.log", "linux": {} diff --git a/roles/container-engine/gvisor/molecule/default/tests/test_default.py b/roles/container-engine/gvisor/molecule/default/tests/test_default.py index eb40b00cb..1cb7fb0ff 100644 --- a/roles/container-engine/gvisor/molecule/default/tests/test_default.py +++ b/roles/container-engine/gvisor/molecule/default/tests/test_default.py @@ -26,4 +26,4 @@ def test_run_pod(host): log_f = host.file("/tmp/gvisor1.0.log") assert log_f.exists - assert b"Hello from Docker!" in log_f.content + assert b"Hello from Docker" in log_f.content diff --git a/roles/container-engine/kata-containers/molecule/default/files/container.json b/roles/container-engine/kata-containers/molecule/default/files/container.json index 9ada521f4..e2e9a56a7 100644 --- a/roles/container-engine/kata-containers/molecule/default/files/container.json +++ b/roles/container-engine/kata-containers/molecule/default/files/container.json @@ -3,7 +3,7 @@ "name": "kata1" }, "image": { - "image": "docker.io/library/hello-world:latest" + "image": "quay.io/kubespray/hello-world:latest" }, "log_path": "kata1.0.log", "linux": {} diff --git a/roles/container-engine/kata-containers/molecule/default/tests/test_default.py b/roles/container-engine/kata-containers/molecule/default/tests/test_default.py index b34136d58..e10fff4b7 100644 --- a/roles/container-engine/kata-containers/molecule/default/tests/test_default.py +++ b/roles/container-engine/kata-containers/molecule/default/tests/test_default.py @@ -34,4 +34,4 @@ def test_run_pod(host): log_f = host.file("/tmp/kata1.0.log") assert log_f.exists - assert b"Hello from Docker!" in log_f.content + assert b"Hello from Docker" in log_f.content diff --git a/tests/common/_docker_hub_registry_mirror.yml b/tests/common/_docker_hub_registry_mirror.yml index 18006742c..6a5500eea 100644 --- a/tests/common/_docker_hub_registry_mirror.yml +++ b/tests/common/_docker_hub_registry_mirror.yml @@ -20,3 +20,6 @@ crio_registries_mirrors: mirrors: - location: mirror.gcr.io insecure: false + +netcheck_agent_image_repo: "{{ quay_image_repo }}/kubespray/k8s-netchecker-agent" +netcheck_server_image_repo: "{{ quay_image_repo }}/kubespray/k8s-netchecker-server"