diff --git a/scripts/pre-pull-images.sh b/scripts/pre-pull-images.sh index 2f24850..c50e22e 100755 --- a/scripts/pre-pull-images.sh +++ b/scripts/pre-pull-images.sh @@ -4,6 +4,8 @@ # # SPDX-License-Identifier: CC0-1.0 +set -o pipefail + KV_VERSION=v1.7.0 IMAGES=( "quay.io/kubevirt/virt-launcher:${KV_VERSION}" @@ -12,17 +14,31 @@ IMAGES=( "quay.io/kubevirt/virt-controller:${KV_VERSION}" "quay.io/kubevirt/virt-operator:${KV_VERSION}" "$TRUSTEE_IMAGE" - "quay.io/trusted-execution-clusters/fedora-coreos-kubevirt:2026-14-01" + "$APPROVED_IMAGE" ) +echo "==========================================" +echo "Pre-pulling images to Docker daemon" +echo "==========================================" +echo "Note: Failures are non-fatal - K8s will pull on-demand" +echo "" + for IMAGE in "${IMAGES[@]}"; do - echo "Pulling: $IMAGE" - docker pull "$IMAGE" - if [ $? -eq 0 ]; then - echo "Successfully pulled $IMAGE" - else - echo "Error: Failed to pull $IMAGE" - fi - kind load docker-image $IMAGE - echo "-------------------------------" + # Skip empty image names + if [ -z "$IMAGE" ]; then + echo "[WARN] Skipping empty image reference" + continue + fi + + echo "Pulling: $IMAGE" + + if docker pull "$IMAGE" >/dev/null 2>&1; then + echo "[SUCCESS] Pulled: $IMAGE" + else + echo "[WARN] Failed to pull: $IMAGE (will retry during pod creation)" + fi + + echo "-------------------------------" done + +exit 0