fix(test): reuse kind cluster on stop/start cycle in deploy test

Use --skip-cluster-management to avoid destroying and recreating the
kind cluster during the stop/start volume retention test. The second
kind create fails on some CI runners due to cgroups detection issues.

Use --delete-volumes to clear PVs so fresh PVCs can bind on restart.
Bind-mount data survives on the host filesystem; provisioner volumes
are recreated fresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feature/k8s-jobs
Prathamesh Musale 2026-03-10 05:13:26 +00:00
parent 1375f209d3
commit 35f179b755
1 changed files with 8 additions and 6 deletions

View File

@ -225,12 +225,14 @@ else
delete_cluster_exit delete_cluster_exit
fi fi
# Stop then start again and check the volume was preserved # Stop then start again and check the volume was preserved.
$TEST_TARGET_SO deployment --dir $test_deployment_dir stop # Use --skip-cluster-management to reuse the existing kind cluster instead of
# Sleep a bit just in case # destroying and recreating it (which fails on some CI runners due to cgroups issues).
# sleep for longer to check if that's why the subsequent create cluster fails # Use --delete-volumes to clear PVs so fresh PVCs can bind on restart.
sleep 20 # Bind-mount data survives on the host filesystem; provisioner volumes are recreated fresh.
$TEST_TARGET_SO deployment --dir $test_deployment_dir start $TEST_TARGET_SO deployment --dir $test_deployment_dir stop --delete-volumes --skip-cluster-management
sleep 5
$TEST_TARGET_SO deployment --dir $test_deployment_dir start --skip-cluster-management
wait_for_pods_started wait_for_pods_started
wait_for_log_output wait_for_log_output
sleep 1 sleep 1