make root-dependency unit reconciliation quicker

Context

we rely on a kube-job of the root-dependency unit to ensure that units downstream in the dependency chain cannot reconcile prematurely: when release n+1 of sylva-units is deployed all units Kustomizations are updated to be made dependent on root-dependency-<n+1> (ie. on root-dependency-<n+1> Kustomization being _ready), and to avoid the race were they would reconcile before their dependencies have been updated to depend on root-dependency-<n+1>, the root-dependency-<n+1> Kustomization produces a Job that only finishes when all Kustomization have been updated for the new release.

Problem

The script for this job relies on kubectl wait Kustomizations on all Kustomizations, which:

  • (a) is slow because it treats Kustomizations sequentially (in my dev env it takes ~20s) -- ideally the root-dependency would reconcile mostly instantly and not delay the reconciliation of following units
  • (b) has the drawback of requiring a properly tuned timeout (which may need to be increased with the number of Kustomizations we have in sylva-units)

Proposition

Find a way to make this script faster, with parallel checking of all Kustomizations.

Assignee Loading
Time tracking Loading