You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An informer's identity is captured by an InformerClassifier composed of:
target cluster (API server URL, including the remote client used for multi-cluster event sources)
resource type (or group/version/kind for generic resources)
watched namespace
label, field, and shard selectors
configured item store
Event sources whose classifiers are equal share one SharedIndexInformer.
The pool is reference-counted: the informer is created on first use and stopped only when the last user releases it.
informerListLimit is intentionally not part of the identity — if two otherwise-equivalent sources request different limits, the existing informer is reused (a warning is logged, first-configured limit wins).
Indexers are not part of the identity, since they can be added to a shared informer independently (avoid indexer name collisions).
Works with dynamic event source registration: registering a source for a resource already backed by a running informer reuses it, and the informer replays its current cache to the newly added handler so initial state is
not missed.
API / configuration
New strategy interface InformerPool with two implementations:
DefaultInformerPool (default) — shares informers as described above.
AlwaysNewInformerPool — never shares; one informer per event source (previous behavior). Use to opt out.
Marked @Experimental: the runtime behavior is production-ready, but the configuration API may still change in a non-backwards-compatible way.
ConfigurationService.informerPool() must return the same instance per config service (a per-ConfigurationService singleton); AbstractConfigurationService caches it.
Tasks
InformerPool abstraction + DefaultInformerPool (sharing, reference-counted) and AlwaysNewInformerPool
Activity
csviri commentedon Oct 25, 2024
This will be needed for this.
fabric8io/kubernetes-client#6501 ✔️