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

Wait for the Namespace and Account informers to sync before controller startup #154

Merged
merged 1 commit into from
Aug 1, 2024

Commits on Aug 1, 2024

  1. Add functionality to wait for the Namespace and Account cache

    informers to sync before proceeding with the creation of the reconcilers.
    
    Key changes:
    - Publish `informer.HasSynced` to the top level structs for namespace and
      accout caches
    - Use these `informer.HasSynced` to wait for the caches to sync using
      `"k8s.io/client-go/tools/cache"`.
    - We call the wait mechanism right after the function that spins the informers
      a.k.a `caches.Run`.
    
    Last to note, we are using a `context.TODO()` context, as a temporary workaround
    until we figure out a better mechanism for context cancellation.
    a-hilaly committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    43c2f75 View commit details
    Browse the repository at this point in the history