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

⚠️ source: make the Informer source compatible with cache.Informer #383

Merged

Commits on Apr 3, 2019

  1. source: make the Informer source compatible with cache.Informer

    Before fc804a4 (kubernetes-sigs#267), the `cache.Informers` interface methods returned
    `k8s.io/client-go/tools/cache.SharedIndexInformer`s which were by default
    compatible with the built-in `source.Informer`. Users could create arbitrary
    `cache.Cache` instances (or get them from the `Manager`) and then use
    `controller.Watch` to drive a controller with a `source.Informer` from the
    `cache.Cache`.
    
    With fc804a4, the `cache.Informers` interface was changed to return
    `cache.Informer` instances; however, `source.Informer` was not updated to accept
    a `cache.Informer`, and so users can no longer use the built-in
    `source.Informer` with `cache.Cache`.
    
    The `cache.Informer` interface appears to satisfy the needs of
    `source.Informer`. This commit broadens `source.Informer` to accept a
    `cache.Informer`, restoring the prior capability while remaining compatible
    with `SharedIndexInformer` use.
    ironcladlou committed Apr 3, 2019
    Copy the full SHA
    bb84391 View commit details
    Browse the repository at this point in the history