diff --git a/packages/test-peerpods.sh b/packages/test-peerpods.sh index e7ca1a494d..c2e3dc15bd 100644 --- a/packages/test-peerpods.sh +++ b/packages/test-peerpods.sh @@ -6,7 +6,7 @@ set -euo pipefail set -x -if [ -z "${azure_image_id}" ]; then +if [ -z "${azure_image_id:-}" ]; then nix run -L .#scripts.upload-image -- \ --subscription-id="${azure_subscription_id:?}" \ --location="${azure_location:?}" \ @@ -23,6 +23,22 @@ just create AKS-PEER-SNP just get-credentials AKS-PEER-SNP just node-installer AKS-PEER-SNP +set +x +found=false +for _ in $(seq 30); do + if kubectl get runtimeclass | grep -q kata-remote; then + found=true + break + fi + echo "Waiting for Kata installation to succeed ..." + sleep 10 +done + +if [[ $found != true ]]; then + echo "Kata RuntimeClass not ready" >&2 + exit 1 +fi + cleanup() { kubectl delete deploy nginx kubectl wait --for=delete pod --selector=app=nginx --timeout=5m @@ -30,6 +46,8 @@ cleanup() { trap cleanup EXIT +set -x + kubectl apply -f - <