Problem
The dominant, platform-independent cause of the IT teardown-timeouts is a Kubernetes
namespace-deletion race: when kuttl runs kubectl delete namespace, the StatefulSet controller
recreates a Pod that GC removed while its StatefulSet was still active. The recreated Pod wedges on
generic-ephemeral-volume PVC ownership and/or the listener/secret CSI mount and holds
kubernetes.io/pvc-protection, so the namespace stays Terminating until the step times out.
The fix that removes this race is to stop the StatefulSets before the namespace is
deleted - but adding that step to every test by hand is unnecessary overhead and we want to avoid this.
Proposal
Add a single shared teardown step (via the beku shared/ directory from #1) that runs before
kuttl deletes the namespace:
- Delete all SDP custom resources in the namespace dynamically —
kubectl api-resources --verbs=delete --namespaced -o name | grep '\.stackable\.tech' → delete
each. Product-agnostic; no per-operator hardcoding.
- Wait for the StatefulSets to be gone (so nothing is recreated during namespace deletion).
- Force-delete any lingering Pods (
--grace-period=0 --force) so we don't wait out long termination
grace periods.
depends on stackabletech/beku.py#40
Problem
The dominant, platform-independent cause of the IT teardown-timeouts is a Kubernetes
namespace-deletion race: when kuttl runs
kubectl delete namespace, the StatefulSet controllerrecreates a Pod that GC removed while its StatefulSet was still active. The recreated Pod wedges on
generic-ephemeral-volume PVC ownership and/or the listener/secret CSI mount and holds
kubernetes.io/pvc-protection, so the namespace staysTerminatinguntil the step times out.The fix that removes this race is to stop the StatefulSets before the namespace is
deleted - but adding that step to every test by hand is unnecessary overhead and we want to avoid this.
Proposal
Add a single shared teardown step (via the
bekushared/directory from #1) that runs beforekuttl deletes the namespace:
kubectl api-resources --verbs=delete --namespaced -o name | grep '\.stackable\.tech'→ deleteeach. Product-agnostic; no per-operator hardcoding.
--grace-period=0 --force) so we don't wait out long terminationgrace periods.
depends on stackabletech/beku.py#40