Skip to content

Get from the Context if there is already a next reconciliation scheduled #2268

Closed
@csviri

Description

@csviri

This is just an idea that will allow certain optimizations in the reconciler implementation.

The feature would be to check if there is already a next reconciliation scheduled:

context.isNextReconciliationImminent()

If there is a next reconciliation scheduled means, there was an event regarding a change in the primary resource or some secondary resources. That means that some resources changed since the reconciliation started. Based on this user could decide to skip some possibly heavy operations, like even small things like calling the API server to update the status since there will be a new reconciliation shortly that will do it anyways - so this will reduce the number of K8S API Calls.

On the other hand, now there is no such thing that would be similar to "snapshot isolation" (except for the primary resource), thus when reconciliation happens always the actual resources are accessed in the cache. So unless the event/change arrived after a target secondary resource was reconciled, the reconciliation already happened on the actual resource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureneeds-discussionIssue needs to be discussed more before working on it

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions