fix(web-backend): poll-until-exists antes de kubectl wait rancher-webhook (race bootstrap tenant)

Sincroniza el template vivo con el fix del repo IDP (RANCHER-WEBHOOK-RACE-RECOVERY).
kubectl wait falla con NotFound si el Deployment aun no existe.
This commit is contained in:
2026-06-13 16:49:35 +00:00
parent 632ad1d507
commit 7ccece522c

View File

@@ -221,6 +221,14 @@ jobs:
# El re-dispatch ~5-10min después recupera natural, pero degrada el smoke # El re-dispatch ~5-10min después recupera natural, pero degrada el smoke
# E2E. Espera explícita evita el flake. # E2E. Espera explícita evita el flake.
run: | run: |
# `kubectl wait` falla con NotFound si el Deployment aún no existe:
# durante el bootstrap del cluster tenant, `rancher-webhook` puede no
# haberse creado todavía cuando corre este step. Primero esperamos a
# que el objeto APAREZCA (poll), luego a que esté Available.
until kubectl get deployment rancher-webhook -n cattle-system >/dev/null 2>&1; do
echo "Esperando a que el Deployment rancher-webhook exista en cattle-system..."
sleep 5
done
kubectl wait deployment rancher-webhook \ kubectl wait deployment rancher-webhook \
-n cattle-system \ -n cattle-system \
--for=condition=Available \ --for=condition=Available \