File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Expand file tree Collapse file tree 3 files changed +21
-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 @@ -41,8 +41,11 @@ echo "Applying KWasm node installer job..."
4141kubectl apply -f ./minikube-kwasm-job.yml
4242
4343echo " Waiting for node installer job to complete..."
44- kubectl 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+ if ! kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=minikube-provision-kwasm --timeout=60s; then
45+ echo " Node installer job failed!"
46+ kubectl describe pod -n kwasm
47+ exit 1
48+ fi
4649
4750# Verify the SystemdCgroup is set to true
4851if docker exec $NODE_NAME cat /etc/containerd/config.toml | grep -A5 " spin" | grep -q " SystemdCgroup = true" ; then
@@ -62,7 +65,11 @@ echo "=== Step 4: Apply the workload ==="
6265kubectl apply -f ./tests/workloads/workload.yaml
6366
6467echo " Waiting for deployment to be ready..."
65- kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s
68+ if ! kubectl wait --for=condition=Available deployment/wasm-spin --timeout=120s; then
69+ echo " Deployment failed to become ready!"
70+ kubectl describe po wasm-spin
71+ exit 1
72+ fi
6673
6774echo " Checking pod status..."
6875kubectl get pods
You can’t perform that action at this time.
0 commit comments