sylva-units - old root-dependency-xxxx Kustomizations sometimes remains

I've observed occurrences in dev environments where because of glitches in upgrades, there remains old root-dependency-xxxx Kustomizations from past iterations of sylva-units, and their root-dependency-xxxx-cm ConfigMap also remains.

This seems to be explained by the fact that Helm may fail to delete resources during a Helm release upgrade and this does not prevent the upgrade from proceeding.

This is of course unclean, but there is worse: we rely on the absence of root-dependency-<n-1> ConfigMap to prevent reconciliation of unit HelmRelease that haven't yet updated on version <n>. So if this ConfigMap isn't removed we have a risk of premature reconciliation of those.

The solution is to ensure in the kube-job of the root-dependency unit, that older root-dependency Kustomizations are deleted.

Assignee Loading
Time tracking Loading