Skip to content

How to create Informer w/ server-side filtering rules? #5011

Answered by shawkins
pan3793 asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@pan3793
Comment options

Comment options

You must be logged in to vote
3 replies
@pan3793
Comment options

@shawkins
Comment options

@pan3793
Comment options

Answer selected by pan3793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants