Description
This is just an idea to discuss for a feature.
Currently Informers and other event source are defined via instance. Problem is that currently in Dependent Resources if provides the event sources, and they want to share those this needs to be explicitly configured.
So providing just configuration would allow the framework to instantiate and set event sources for dependent resources and determine if there are multiple needed or just one of multiple resources.
For example if there are multiple ConfigMap dependent resources, but non of them use a label selector or any other special config, framework will create just one InformerEventSource, but if one of them needs a specific SecondaryToPrimaryMapper
and this is provided in the config, it will create two InformerEventSources.
This would allow theoretically to share InformerEventSources between controller. Note that this is on event source level, for informers this to some extent could be supported on informer level, see: fabric8io/kubernetes-client#5097