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: ResourceGroup unnecessary condition updates #1571

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karlkfi
Copy link
Contributor

@karlkfi karlkfi commented Feb 26, 2025

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:

  • kstatus constantly flaps from Current to InProgress
  • the resourceVersion is constantly going up
  • etcd is being filled up with changes, increasing memory and storage
  • watch events are being propegated to controllers, like the RGC,
    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.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from karlkfi. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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:
- kstatus constantly flaps from Current to InProgress
- the resourceVersion is constantly going up
- etcd is being filled up with changes, increasing memory and storage
- watch events are being propegated to controllers, like the RGC,
  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.
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.

1 participant