How it works
- 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.
Selectable via the configuration service:
Operator operator = new Operator(overrider ->
overrider.withInformerPool(new AlwaysNewInformerPool()));
Status / notes
- 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
How it works
InformerClassifiercomposed of:SharedIndexInformer.informerListLimitis 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).not missed.
API / configuration
New strategy interface
InformerPoolwith two implementations:DefaultInformerPool(default) — shares informers as described above.AlwaysNewInformerPool— never shares; one informer per event source (previous behavior). Use to opt out.Selectable via the configuration service:
Status / notes
@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-ConfigurationServicesingleton);AbstractConfigurationServicecaches it.Tasks
InformerPoolabstraction +DefaultInformerPool(sharing, reference-counted) andAlwaysNewInformerPoolConfigurationServiceOverrider.withInformerPool(...)