Avoid retries during helmreleases installations and upgrades
Summary
We've been relying on retries to workaround some issues during helmReleases installations and upgrades, but they are not efficient as they lead to useless and unpredictable uninstalls or rollbacks of helmReleases. It is however useful to have some kind of retry mechanism as some installation/upgrades may fail due to image pulling delays, CRDs not being installed, unavailable webhooks, aso. In these circumstances, it would be preferable that the Helm Controllers simply retries the installation of the stack as flux reconcile helmrelease --force
would do.
Until Helm controller provides such a feature, we can foresee 2 solutions to implement that feature:
- Use a kyverno policy to annotate Failed HelmReleases to trigger forced reconciliation
- Or develop a dedicated operator/controller if kyverno is not flexible enough.
Edited by Thomas Morin