stack-orchestrator/stack_orchestrator/deploy/k8s
A. F. Dudley 7f12270939 bar-6cb: fix PV claimRef, namespace race, and PVC creation resilience
Three related fixes in the k8s deployer restart/up flow:

1. Clear stale claimRefs on Released PVs (_clear_released_pv_claim_refs):
   After namespace deletion, PVs survive in Released state with claimRefs
   pointing to deleted PVC UIDs. New PVCs can't bind until the stale
   claimRef is removed. Now clears them before PVC creation.

2. Wait for namespace termination (_wait_for_namespace_deletion):
   _ensure_namespace() now detects a terminating namespace and polls
   until deletion completes (up to 120s) before creating the new one.
   Replaces the racy 5s sleep in deployment restart.

3. Resilient PVC creation: wrap each PVC creation in error handling so
   one failure doesn't prevent subsequent PVCs from being attempted.
   All errors are collected and reported together.

Closes: bar-6cb, bar-31a, bar-fec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 08:33:45 +00:00
..
helm Fix pyright type errors across codebase 2026-01-22 01:10:36 -05:00
__init__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
cluster_info.py feat(k8s): per-service resource layering in deployer 2026-03-07 10:26:10 +00:00
deploy_k8s.py bar-6cb: fix PV claimRef, namespace race, and PVC creation resilience 2026-03-10 08:33:45 +00:00
helpers.py fix(k8s): expand etcd cleanup whitelist to preserve core cluster services 2026-03-07 17:56:13 +00:00
k8s_command.py Apply pre-commit linting fixes 2026-01-21 20:58:31 -05:00