Currently tofu destroy (and the scripts/pre-destroy-drain.sh step) do not touch user home directories.
Current behavior
pre-destroy-drain.sh deletes only LoadBalancer Services and Ingresses (to clear ELB ENIs that block VPC deletion).
- User home volumes are dynamically-provisioned PVCs created by KubeSpawner per user (EBS via the CSI driver). They are not owned by the daskhub Helm release.
tofu destroy deletes the EKS cluster/nodes directly. With the CSI controller gone, PVCs are never gracefully deleted, so the backing EBS volumes are left orphaned (each ~$0.08/GB-month) with no evacuation/backup of user data first.
- This is invisible today only because cae-testing uses dummy auth and no one spawned a server. On cae-dev/prod with real users, a destroy would strand (and silently keep billing) every user home volume.
Gaps
- No pre-destroy evacuation/snapshot of user home data.
- No deletion of user PVCs, so EBS volumes orphan.
verify-clean-teardown.sh has no authoritative EBS-volume check (name-based checks cover NAT/VPC/EIP/EKS/LB only).
Proposed fixes
- Add an opt-in PVC-cleanup phase to
pre-destroy-drain.sh (destructive to user data — guard behind an explicit flag / confirmation).
- Optionally snapshot user PVCs to S3/EBS-snapshot before deletion (evacuation).
- Add an authoritative EBS check to
verify-clean-teardown.sh:
aws ec2 describe-volumes --filters Name=tag:kubernetes.io/cluster/<cluster>,Values=owned → fail on any remaining available/in-use volume.
Context
Surfaced during teardown hardening (drain + verify) — the verify tag-index check was made advisory because resourcegroupstaggingapi lags ~1h; name-based checks are authoritative but do not yet cover EBS.
Currently
tofu destroy(and thescripts/pre-destroy-drain.shstep) do not touch user home directories.Current behavior
pre-destroy-drain.shdeletes only LoadBalancer Services and Ingresses (to clear ELB ENIs that block VPC deletion).tofu destroydeletes the EKS cluster/nodes directly. With the CSI controller gone, PVCs are never gracefully deleted, so the backing EBS volumes are left orphaned (each ~$0.08/GB-month) with no evacuation/backup of user data first.Gaps
verify-clean-teardown.shhas no authoritative EBS-volume check (name-based checks cover NAT/VPC/EIP/EKS/LB only).Proposed fixes
pre-destroy-drain.sh(destructive to user data — guard behind an explicit flag / confirmation).verify-clean-teardown.sh:aws ec2 describe-volumes --filters Name=tag:kubernetes.io/cluster/<cluster>,Values=owned→ fail on any remainingavailable/in-usevolume.Context
Surfaced during teardown hardening (drain + verify) — the verify tag-index check was made advisory because
resourcegroupstaggingapilags ~1h; name-based checks are authoritative but do not yet cover EBS.