mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 14:02:56 +09:00
The three etcd Chainsaw scenarios share the singleton release name 'etcd' and the cluster-scoped DataStore/<namespace> the etcd chart provisions for Kamaji. On teardown Kamaji leaks its kamaji.clastix.io/TenantControlPlane finalizer on that DataStore — once the backing etcd is gone the reconcile that would drop it cannot complete — so the DataStore wedges in Terminating and the etcd HelmRelease uninstall hangs. In CI this errored every etcd case: the first scenario's stuck teardown blocked the next scenario's install (HelmRelease never Ready, "DataStore status: Terminating", etcd pods refusing :2381 because the CA issuer had no key material). Make teardown explicit instead of relying on Chainsaw auto-cleanup (which was waiting on the wedged uninstall): set skipDelete on each Test and have every scenario's ensure-clean drain the previous one — delete the etcd and force-clear the orphaned finalizer (no TenantControlPlane uses this per-namespace test DataStore) in a loop until the HelmRelease and DataStore are both gone. Each scenario then installs from a clean slate. Verified on a dev cluster: all three scenarios pass back-to-back where they previously cascaded. Assisted-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>