osm icon indicating copy to clipboard operation
osm copied to clipboard

Implement a k8s.Controller that does not use informers

Open steeling opened this issue 3 years ago • 4 comments

This client should adhere to the k8s KubeController interface, but should implement methods on the k8s apiserver instead of on the informer client.

This can be used in places where we don't want to enable the informer cache, but do still want the abstractions provided by the meshcatalog and compute Interface

This can be done be either:

a) creating a new object with identical method signatures b) adding an option NoInformer() to the k8s.Client such that it queries the informer cache or the k8s master conditionally

steeling avatar Sep 07 '22 21:09 steeling

@keithmattix FYI @shashankram FYI this would be a pre-req to #4970

steeling avatar Sep 07 '22 21:09 steeling

We will still be using a SharedIndexInformer within the controller though right, or are you proposing to not use informers anymore?

shashankram avatar Sep 07 '22 21:09 shashankram

correct, i think just the CLI, and I believe @keithmattix has a use case for certificates where there is a concern of a potential race condition due to cache being out of sync?

This is more to allow more pieces of the code to access the underlying k8s infra through the mesh catalog or compute.Interface

steeling avatar Sep 07 '22 21:09 steeling

correct, i think just the CLI, and I believe @keithmattix has a use case for certificates where there is a concern of a potential race condition due to cache being out of sync?

This is more to allow more pieces of the code to access the underlying k8s infra through the mesh catalog or compute.Interface

Ok if that helps avoiding duplication and simplifies CLI, sounds reasonable

shashankram avatar Sep 07 '22 21:09 shashankram

This issue will be closed due to a long period of inactivity. If you would like this issue to remain open then please comment or update.

github-actions[bot] avatar Dec 17 '22 00:12 github-actions[bot]

Issue closed due to inactivity.

github-actions[bot] avatar Dec 25 '22 00:12 github-actions[bot]