strimzi / kafka-access-operator

Operator for sharing access to Strimzi clusters across namespaces
Apache License 2.0
14 stars 13 forks source link

Use EventSource cache to fetch resources #28

Closed katheris closed 1 year ago

katheris commented 1 year ago

Kubernetes resources can be read from the JOSDK cache rather than making an explicit Kubernetes call to fetch them. This can be done in one of two ways:

  1. Use the context object and call context.getSecondaryResource (this requires a primaryToSecondary mapper function)
  2. Store a reference to the EventSource object at the class level and fetch the object from the cache in the event source.

Either way we should update the operator to make as few calls to Kubernetes as possible and instead rely on the JOSDK cache and event sources.

katheris commented 1 year ago

Completed in #30