mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 22:13:18 +09:00
The pre-delete unpin hook discovered this pool's hash-suffixed KubevirtMachineTemplates through `kubectl get ... 2>/dev/null | grep ... || true`, which turned an API or RBAC failure into an empty result: the Job then reported success while the keep-annotated templates stayed pinned and leaked on uninstall (Helm skips keep-annotated resources). That contradicts the unpin() contract right above it, where annotate failures are deliberately propagated. Split the list out of the pipe so its failure fails the Job (set -e, bounded by backoffLimit/activeDeadlineSeconds, logs retained), while a successful-but-empty listing still no-ops the loop. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>