-
Following the example, I found that the And after some investigation, I found an API, but seems it does filtering on the client side. So my question is how to create an Informer w/ server-side filtering rules? Looks like the Go client has such an API, any equivalent on Java side? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Could you please elaborate a bit on this point? |
Beta Was this translation helpful? Give feedback.
-
There are different levels to the informer related apis. At the core you are in control over how much the informer watches. pods().inAnyNamespace().inform(...) - watches all pods The inform methods however are available where a single item or a list of items is available: pods().inNamespace("ns").withLabel("some", "label").inform(...) - watches pods with the given label only in namespace ns. The resulting SharedIndexInformer you can use however your application needs - via its cache and event handlers. A method like informOnCondition is a convenience method to provide the evaluation of a predicate over an informer - you use this or methods like waitUntilReady when you don't generally need to track a given resource, but just need to be notified or block until a particular state is met. As far as I know there is no ability to have that high level of a predicate evaluated server-side. |
Beta Was this translation helpful? Give feedback.
There are different levels to the informer related apis. At the core you are in control over how much the informer watches.
pods().inAnyNamespace().inform(...) - watches all pods
The inform methods however are available where a single item or a list of items is available:
pods().inNamespace("ns").withLabel("some", "label").inform(...) - watches pods with the given label only in namespace ns.
The resulting SharedIndexInformer you can use however your application needs - via its cache and event handlers.
A method like informOnCondition is a convenience method to provide the evaluation of a predicate over an informer - you use this or methods like waitUntilReady when you don't generally need…