sylva-units: don't use 'lookup' to determine sylva-core GitRepo spec

Closes #1570 (closed)

Generally it's better to avoid lookup when we can, because lookup make the result of the rendering depend on the state of the system.

We didn't find a way to avoid that when integrating !2694 (merged), and thought that using lookup to determine the spec of the sylva-core GitRepository was an acceptable tradeoff.

I came back to this topic when hitting #1570 (closed).

Avoiding lookup helps in two ways:

  • we don't depend on having the sylva-units GitRepository being updated before the sylva-units HelmRelease (which is nicer because our kustomize| kubectl apply approach used to update these resources does not allow us to control in which order the resources are updated)
  • the current commit is instead set directly from values, so changing it naturally triggers a reconciliation of the HelmRelease (updating the sylva-units GitRepository would not, of course, trigger a full reconcilation of the HelmRelease before the next reconciliation)
Edited by Thomas Morin

Merge request reports

Loading