java-operator-sdk
java-operator-sdk copied to clipboard
Define Event Sources Using `@ControllerConfiguration` Annotation
It would be elegant to define event sources using annotations (just as we define dependent resources).
Proposed design for annotation would look like this:
@ControllerConfiguration(
eventSources = @EventSources(informers = @Informer(resourceType = ConfigMap.class,
followNamespaceChanges = true),others = @EventSource(type = MyPollingEventSource.class)))
public class SampleReconciler
where @Informer annotation would have most of the configurations, that could be defined by the config builder:
see: https://github.com/java-operator-sdk/java-operator-sdk/blob/6fd141fe1c3922fed11995814a222bcce446b015/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/Informer.java
Notes:
- these event sources won't be subject of configuration override.