From 0d3ce5bfe5fe5dc504b52c5131e4d33d77cbcc44 Mon Sep 17 00:00:00 2001 From: Michael Weibel Date: Tue, 8 Sep 2026 10:58:58 +0200 Subject: [PATCH] fix: imagePullPolicy: Never in integration tests --- helpers/run-in-test-cluster | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/helpers/run-in-test-cluster b/helpers/run-in-test-cluster index 428e9e7..fddaeb3 100755 --- a/helpers/run-in-test-cluster +++ b/helpers/run-in-test-cluster @@ -144,6 +144,10 @@ function update-ccm() { # docker save $IMAGE -o image.tar # run-in-test-cluster # + # When IMAGE_SOURCE=import, the imagePullPolicy is set to Never, + # to ensure the imported image is used and nothing is pulled from + # a registry. + # if [[ "${IMAGE_SOURCE-build}" == "build" ]]; then build-image else @@ -162,6 +166,12 @@ function apply-resources() { | sed "s|https://api.cloudscale.ch|${api_url}|g" \ > /tmp/ccm.yml + if [[ "${IMAGE_SOURCE-build}" == "import" ]]; then + # Ensure the imported image is used, and no image is pulled + # from a remote registry. + sed -i 's|imagePullPolicy: IfNotPresent|imagePullPolicy: Never|g' /tmp/ccm.yml + fi + export KUBECONFIG=k8test/cluster/admin.conf kubectl delete -f /tmp/ccm.yml --ignore-not-found=true kubectl apply -f /tmp/ccm.yml