improve how we prevent unit HelmRelease from reconciling with old state
A possible evolution that will help, is to change how we prevent a unit HelmRelease with its old definition from reconciling after the start of reconciliations for an update of sylva-units HelmRelease.
- today, on all unit HelmReleases, we have a fake entry in valuesFrom pointing to
root-dependency-<n-1>-cmConfigMap that stops working, and prevents reconciliations, as soon asroot-dependency-<n>-cmreplacesroot-dependency-<n-1>-cm; this situation resolves when the parent Kustomization updates them to useroot-dependency-<n>-cmConfigMap - the drawback is that when "old" HelmReleases are prevented from reconciling because the ConfigMap is missing, we have reconciliation errors that we then must tell sylvactl to ignore
- a better solution would be to:
- have the root-dependency unit create a
root-dependency-<n>HelmRelease - on all unit HelmReleases, set a
dependsOn: .. root-dependency-<n>so that the removal ofroot-dependency-<n-1>HelmRelease will cleanly prevent reconciliation of all HelmReleases until their parent Kustomization updates them to depend onroot-dependency-<n>HelmRelease instead
- have the root-dependency unit create a
Edited by Thomas Morin