diff --git a/lib/jeannie/pipeline.sh b/lib/jeannie/pipeline.sh index b0343b4..7525309 100644 --- a/lib/jeannie/pipeline.sh +++ b/lib/jeannie/pipeline.sh @@ -7446,6 +7446,14 @@ require_pimox_app_worker_capacity() { local failures=0 local eligible_workers=0 + # The generated inventory describes kubeadm workers, not the selected + # cluster's live topology. Direct k3s bootstrap does not join these VMs; + # stale files from a previous deployment must not make them mandatory. + if [[ "${LAB_CLUSTER_RUNTIME:-kubeadm}" == k3s ]]; then + echo "Direct k3s runtime uses live scheduling preflight; ignoring the generated kubeadm/Pimox worker inventory." + return 0 + fi + if disabled_value "${enabled}"; then echo "Skipping Pimox worker readiness gate because LAB_PIMOX_APP_DEPLOY_REQUIRE_CAPACITY=${enabled}. Scheduling preflight still runs before apply." return 0 @@ -8113,6 +8121,7 @@ apps() { export KUBECONFIG_PATH="${TF_VAR_kubeconfig_path}" ensure_pimox_kubeconfig + cluster_context_require || return 1 require_argocd_application_controller require_pimox_app_worker_capacity "${app_selector}" if [[ "${deploy_website}" == "true" || "${deploy_demos}" == "true" || "${deploy_registry}" == "true" ]]; then