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>-cm ConfigMap that stops working, and prevents reconciliations, as soon as root-dependency-<n>-cm replaces root-dependency-<n-1>-cm; this situation resolves when the parent Kustomization updates them to use root-dependency-<n>-cm ConfigMap
  • 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 of root-dependency-<n-1> HelmRelease will cleanly prevent reconciliation of all HelmReleases until their parent Kustomization updates them to depend on root-dependency-<n> HelmRelease instead
Edited Nov 19, 2024 by Thomas Morin
Assignee Loading
Time tracking Loading