Ensure that HelmReleases honor unit dependencies
Since the introduction of root-dependency, we ensure that Kustomizations are reconciled following units dependencies order during sylva-units updates.
There was however a corner case for HelmReleases, as there was nothing to prevent periodic reconciliations during these updates, which could lead to some unpredictable results.
In order to prevent such reconciliations, we add a valueFrom to all HelmReleases that refers to a ConfigMap produced by root-dependency.
As root-dependency-check--cm will be pruned when root-dependency-<n+1> will be reconciled, HelmRelease reconciliation will be blocked until the controlling Kustomization reconciles and updates the valuesFrom to use root-dependency-check-<n+1>-cm ConfigMap
The implementation could be fairly simple, but it requires the capability to merge unit_helmrelease_spec_default.valuesFrom with units spec valuesFrom. We introduced merge-append (copied from sylva-vapi-cluster) for that purpose, and generalized its use for units defaults and templates (in a distinct commit).
Testing have shown that the use of that template does not have too much performance impact, we get:
time helm template . --values management.values.yaml on main
real 0m8,790s
user 0m11,346s
sys 0m0,171s
time helm template . --values management.values.yaml on this branch
real 0m8,944s
user 0m11,525s
sys 0m0,111s
note @aseitz: If this one is merged, we'll have to move merge-append to sylva-library