Skip to content

Informer should retry on errors in set-up phase

Ishita Mittal requested to merge ishita/issue-56 into main

closes #56 (closed)

With the help of @feleouet, we have added a retry condition here to ensure that we successfully fetch the list of Custom Resource Definitions (CRDs) from the Kubernetes API even if there are temporary problems, like transient network issues. It tries the operation multiple times with increasing wait periods between attempts until it either succeeds or a certain number of retries is reached. This way, our function can handle temporary errors smoothly and is more reliable.

We also need to increase the amount of time for the CheckFluxCRDs function will spend trying to list the Custom Resource Definitions (CRDs) from the Kubernetes API as even if there is some transient n/w issue it could have enough time for retry attempts before the timeout is reached.

We are also creating a flag in this MR --retry-backoff-timeout (default value 10ms) to set the duration for the base delay of the backoff timeout for the retries of the first API connection.

Edited by Ishita Mittal

Merge request reports