-
Notifications
You must be signed in to change notification settings - Fork 4
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
Not using Informer cache for Pipelines and ISBServices #95
Comments
So, I've been trying to figure out 2 different possible ways to handle this:
I thought it would be nice if we could do 1 if it's easy. After seeing the comment on watching unstructured objects here, I think it may work to change the existing Watch for Pipelines (as an example) to:
but if that does work, we still need to use this Informer cache in the actual calls to |
This article Hao found is a good read: https://medium.com/@timebertt/kubernetes-controllers-at-scale-clients-caches-conflicts-patches-explained-aa0f7a8b4332 One thing I see in there is: By default, the client.Client created by a controller-runtime Manager is a DelegatingClient. It delegates Get and List calls to a Cache and all other calls to a client, that talks directly to the API server. Exceptions are requests with *unstructured.Unstructured objects and object kinds that were configured to be excluded from the cache in the DelegatingClient. It kind of sounds like it's saying that a |
I guess before we begin on this work, we also should probably make sure that nothing will go wrong as a result of having slightly older Pipelines and ISBServices. Right now we always have the latest and greatest ones. What will be the result of having a slightly older one? (I will try to think about this as well.) cc @xdevxy |
added this issue |
I added this comment. I think it might be wise, if we are in the PPND strategy to actually get the Pipeline from the K8S API instead of the Informer. In any case, I think the strategy we choose should be able to get the unstructured resource from either the K8S API or from the Informer. |
Describe the bug
We made a decision that in Numaplane we don't need to define the Pipeline/ISBService specs - therefore we are using the Kubernetes Dynamic client to create/update/get resources.
It looks like currently, we are not using an Informer cache and instead are making multiple repeated calls to GET from the Kubernetes API directly.
Assuming that we stick with the decision to use dynamic client (which may first be worth a deep dive analysis), we can incorporate a Dynamic client Informer described here.
See slack thread.
Expected behavior
When calling Get() for a given resource multiple times in a row when the resource hasn't changed, I shouldn't hit the K8S API every time. Instead, my resource should be updated asynchronously into my local cache.
Message from the maintainers:
Impacted by this bug? Give it a 👍. We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: