Skip to content

Define a supported way of setting a cache on source.Kind #650

Closed
@alvaroaleman

Description

@alvaroaleman

In order to be able to write a controller that has informers in multiple clusters, one has to inject a cache into source.Kind. Options to do this include:

  • Just call kind.InjectCache, it has a nilcheck that will prevent the injectCache call from the controller to overwrite the cache. However this behavior doesn't have tests and may go away in the future
  • Write a wrapper around kind.Source that implements InjectCache with the nilcheck
  • Write a wrapper around kind.Source that does not implement inject.Cache

We should agree on one option, declare it the supported way to build multicluster controllers and probably document it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions