tofu-controller
tofu-controller copied to clipboard
Add remediateLastFailure
This PR adds remediateLastFailure to Terraform CRD, the same for example, Helm controller has.
Current logic leads to manual intervention when retries are exceeded. It prevents the scheduled execution for Terraform after .spec.interval.
The new logic by default follows the old pattern but if .spec.remediation.remediateLastFailure: true controller will reset the retry count and schedule another Terraform execution after .spec.interval if retries exceeded.
Fixes https://github.com/flux-iac/tofu-controller/issues/1358