mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 12:43:32 +09:00
The worker-adoption render guard required meta.helm.sh/release-name == the parent release as a precondition to refuse a control-plane-only render. But Helm's prune gates solely on helm.sh/resource-policy=keep and never consults the live release-name (migration 54 documents this and its foreign-owner branch depends on it). A same-cluster, unpinned worker MachineDeployment whose release-name is empty (Helm annotations stripped out-of-band, or a DR restore of the CAPI objects) or foreign therefore slipped past the guard, yet Helm still entered it into the parent's prune set and deleted it on the transition upgrade: the exact worker-VM data loss the guard exists to prevent, in the exact case (migration 54 never ran for this cluster) it was written for. Refuse when a same-cluster, unpinned MachineDeployment is NOT owned by its kubernetes-nodes child release (release-name lacks the kubernetes-nodes-<cluster>- prefix), which catches parent, empty and foreign owners alike while exempting adopted and natively-created child pools. Add a regression fixture with an empty release-name that reddens under the old parent-release-name predicate, and keep every conjunct non-vacuous by mutation. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>