Skip to content

Conversation

@agill17
Copy link
Contributor

@agill17 agill17 commented Jan 9, 2021

This fixes the use case when a user wants to install a CR with only 1 retry. This is done by setting maxRetries to 0. It works like backOffLimit in a k8s job.

Bug was, when spec.maxRetries is set to 0 and this is first reconcile, controller was checking the status failureCount number which by default is 0. So when both are 0, the controller would not reconcile the CR.

Every new reconcile for every new CR, the failureCount in status will always start with 0, so we need to exclude failureCount check when checking whether a CR maxRetries has been met.

@agill17 agill17 requested a review from RichardMills January 9, 2021 02:21
@agill17 agill17 self-assigned this Jan 9, 2021
@agill17 agill17 added the bug Something isn't working label Jan 9, 2021
@agill17 agill17 changed the title fix the chicken and egg problem when maxRetries is set to 0 for initial CR reconciles fix(maxRetries): avoid chicken and egg problem when maxRetries is set to 0 for initial CR reconciles Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants