Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not infinitely reconcile in case of exit code > 0 #284

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

raffis
Copy link
Member

@raffis raffis commented Sep 23, 2024

Current situation

Currently if the reconciler exits > 0 the controller infintely requeues the resource
without backoff.
The problem is that the controller watches for owned pods (reconcilers) which triggers the requeue also in case of the delete events.
And currently the controller deletes the reconciler pod in case of any exit code and recreate it. There is no way of having a backoff that way.

Proposal

It actually makes far more sense to just let the pod controller do the restart backoff of a reconciler.
The realm controller will now only delete the pod if exit==0. In case of an error the pod controller will just backoff restart the container.
If the reconciliation was sucessful (exit code == 0) the controller will delete the pod and only requeue with spec.interval. (or not requeueing at all if no interval is set).

@raffis raffis requested a review from a team as a code owner September 23, 2024 09:10
@github-actions github-actions bot added size/L and removed size/S labels Sep 23, 2024
@raffis raffis merged commit 5f5481e into master Sep 23, 2024
19 checks passed
@raffis raffis deleted the fix-infinite-reconcile branch September 23, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants