Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

(refactor): Centralize informer handling #4793

Closed
keithmattix opened this issue Jun 7, 2022 · 2 comments
Closed

(refactor): Centralize informer handling #4793

keithmattix opened this issue Jun 7, 2022 · 2 comments
Assignees
Labels
kind/refactor Related to code refactor

Comments

@keithmattix
Copy link
Contributor

Please describe the Improvement and/or Feature Request

We currently tightly couple our informers to specific objects (e.g. k8s controller, configurator, smi, and policy). The drawback to this approach is that no other component of the code can access these informer caches, respond to events, or otherwise interact with k8s objects except by:

  1. depending on one of the aforementioned objects (creating coupling where it may not need to be)
  2. creating new informers and duplicating the event handling/caching (opening the door for inconsistencies between the two caches)

I'm proposing that we centralize our informer handling in one object whose pointer can be passed around to any other object that may need to access an informer. This prevents engineers from having to create new, expensive informers, and it allows us to have opinionated patterns for informer use.

Scope (please mark with X where applicable)

  • Envoy Control Plane [X]

Possible use cases

@keithmattix keithmattix added the kind/refactor Related to code refactor label Jun 7, 2022
@keithmattix keithmattix self-assigned this Jun 7, 2022
@shashankram
Copy link
Member

@keithmattix I believe this is a duplicate of #4551. Do you agree?

@keithmattix
Copy link
Contributor Author

Oh I completely forgot that issue existed. Yeah this is the same thing; feel free to close

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/refactor Related to code refactor
Projects
None yet
Development

No branches or pull requests

2 participants