fix: ResourceGroup unnecessary condition updates #1571
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ResourceGroup controller has been updating the Reconciling
status condition to status=True and back to status=False every time
it attempts to reconcile. This is unnecessary and expensive. There
are no side-effects during reconciling, and no clients need to know
when the ResourceGroup controller is reconciling. In fact, this
causes several problems:
which triggers perpetual unnecessary updates.
This change fixes that problem by removing the initial status update
that set Reconciling status=True and also removing the case where
status=False with reason=ExceedTimeout. This means the Reconciling
condition will always be set to status=False after the ResourceGroup
controller has reconciled.
This deprecates the Reconciling condition, without fully removing
it, in case some client was still waiting for its status=False.
This should reduce the number of ResourceGroup status updates, and
reduce confusion by users who assumed that the Reconciling condition
was an aggregate of status.resourceStatuses.