fluxcd / helm-operator

Successor: https://github.com/fluxcd/helm-controller — The Flux Helm Operator, once upon a time a solution for declarative Helming.

Home Page:https://docs.fluxcd.io/projects/helm-operator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

by default how many retries does helm attempt

aizada92 opened this issue · comments

Hello , I have a question about Helm ,by default how many retries does helm attempt ? i was setting up notification for helm failures in fluxv2.

install:
    remediation:
      retries: 3
  upgrade:
    remediation:
      remediateLastFailure:  true  

I add this lines but how I can check if it is working ?

Thankyou

The number of retries is 0 by default:

https://fluxcd.io/docs/components/helm/api/#helm.toolkit.fluxcd.io/v2beta1.InstallRemediation

If you want to test if retries work, you can try enabling and adding a helm test which fails twice, to prove that three retries are executed. I'm not sure operationally how to manage that, it could reach out to a service which you control that responds "error error OK" or something more complicated than that, I'm not sure what you are testing for, but I can give a few ideas.

If you can think of another way to make sure the release fails so that it is retried, anything which causes the deployments to fail to become ready (a misconfiguration for example), or causes the services or ingresses to fail their readiness checks, should trigger the remediation and result in a retry. The trick is to think of something which will succeed after successive retries, if you don't care about that then testing this feature is a lot easier.

The retries should be mentioned in the kubectl describe helmreleases output as events, you will see that it retried because each retry gets its own error log event, although sometimes kubectl may decide to merge them as they will likely show the same errors from one failure to the next, it still will tell you that (x2/x3) event happened multiple times.

I should mention, this question is on the Helm Operator repo, which is from Flux v1 – Helm Operator is EOL. But you didn't ask a question that seemed related to it, so I assume you're asking about Flux v2.

If you meant to ask a question about Flux v2, that is aligned with the intent of how I have answered it.

(Closing, as this is apparently filed on the wrong repo)