File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,11 @@ echo "Applying KWasm node installer job..."
5151kubectl apply -f ./k3s-kwasm-job.yml
5252
5353echo " Waiting for node installer job to complete..."
54- kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=k3s-provision-kwasm --timeout=60s
54+ if ! kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=k3s-provision-kwasm --timeout=60s; then
55+ echo " Node installer job failed!"
56+ kubectl describe pod -n kwasm
57+ exit 1
58+ fi
5559
5660# Verify the SystemdCgroup is set to true
5761if sudo cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml | grep -A2 " runtimes.spin.options" | grep -q " SystemdCgroup = true" ; then
@@ -72,7 +76,11 @@ sudo k3s ctr images pull ghcr.io/spinkube/containerd-shim-spin/examples/spin-rus
7276kubectl apply -f ./tests/workloads/workload.yaml
7377
7478echo " Waiting for deployment to be ready..."
75- kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s
79+ if ! kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s; then
80+ echo " Deployment failed to become ready!"
81+ kubectl describe deployment wasm-spin
82+ exit 1
83+ fi
7684
7785echo " Checking pod status..."
7886kubectl get pods
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ echo "=== Step 4: Apply the workload ==="
8080kubectl apply -f ./tests/workloads/workload.yaml
8181
8282echo " Waiting for deployment to be ready..."
83- if kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s; then
83+ if ! kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s; then
8484 echo " Deployment failed to become ready!"
8585 kubectl describe deployment wasm-spin
8686 exit 1
Original file line number Diff line number Diff line change @@ -40,9 +40,13 @@ sed -i "s/spin-test-control-plane/${NODE_NAME}/g" minikube-kwasm-job.yml
4040echo " Applying KWasm node installer job..."
4141kubectl apply -f ./minikube-kwasm-job.yml
4242
43- echo " Waiting for node installer job to complete..."
4443kubectl wait -n kwasm --for=condition=Ready pod --selector=job-name=minikube-provision-kwasm --timeout=90s || true
45- kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=minikube-provision-kwasm --timeout=60s
44+ echo " Waiting for node installer job to complete..."
45+ if ! kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=minikube-provision-kwasm --timeout=60s; then
46+ echo " Node installer job failed!"
47+ kubectl describe pod -n kwasm
48+ exit 1
49+ fi
4650
4751# Verify the SystemdCgroup is set to true
4852if docker exec $NODE_NAME cat /etc/containerd/config.toml | grep -A5 " spin" | grep -q " SystemdCgroup = true" ; then
@@ -62,7 +66,11 @@ echo "=== Step 4: Apply the workload ==="
6266kubectl apply -f ./tests/workloads/workload.yaml
6367
6468echo " Waiting for deployment to be ready..."
65- kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s
69+ if ! kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s; then
70+ echo " Deployment failed to become ready!"
71+ kubectl describe po wasm-spin
72+ exit 1
73+ fi
6674
6775echo " Checking pod status..."
6876kubectl get pods
You can’t perform that action at this time.
0 commit comments