fluxcd / helm-controller

The GitOps Toolkit Helm reconciler, for declarative Helming
https://fluxcd.io
Apache License 2.0
414 stars 163 forks source link

PostRenderersDigest observation improvements #972

Closed darkowlzz closed 6 months ago

darkowlzz commented 6 months ago

This adds a minor improvement to the implementation of the observing the post renderers digest in #965 by moving the observation set/update code from summarize() to atomic release reconciliation. summarize() is for summarizing the status conditions only and it is called by all the action sub-reconcilers. In addition, the post renderers digest value check is performed only for unprocessed new configuration. This is needed to prevent the atomic reconciliation from getting stuck in a loop when there are multiple upgrades, for example due to a config difference and a digest mismatch, and since the digest gets updated at the very end of a successful reconciliation, the release can get stuck. This make sure that the digest is checked only for unprocessed generation of the object. This behavior is only associated with the changes introduced here. Previously, the observation got updated early within the summarize() which got around such issue.

Also, adds more tests for various scenarios involving post renderers.

darkowlzz commented 6 months ago

I have added some more test scenarios involving post renderers in atomic release reconciler.

Did more manual testing observing the behavior, everything seems as before and correct. Also performed some upgrade test from v2beta2 to v2 with all the recent fixes, version upgrade doesn't cause helm upgrade of the existing releases. The releases remain in sync.

fluxcdbot commented 6 months ago

Successfully created backport PR for release/v1.0.x: