operator-framework / operator-framework/java-operator-sdk
Resource Event Source for Notification Based External Events
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 944
- Forks
- 242
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 43
Description
For Kubernetes resources we already have this cache in Informer, for external resources we have the CachingInboundEventSource for a resource oriented event coming from an external system. And two flavors of polling event source: PollingEventSource and PerResourcePollingEventSource.
What we don't have covered is the situation for an external resource when it is capable to notify about change, but the notification not contains the resource it self. Typically such external events are comming from AWS resources, like from RDS:
see: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-cloudwatch-events.sample.html
A sample event does not contains the resource itself.
( see also: Event Notification https://martinfowler.com/articles/201701-event-driven.html )
We have two options here either the dependent resource fetches the resource on reconcile and puts it into local cache. Or we prepare an even source that when receives an inbound event also fetches and caches the resource (then triggers and event).
This would be much more optimal, since we just don't fetch resource on every reconcile. So the event source logic should look like this:
sequenceDiagram
participant InboundFetchingEventSource
participant ExternalService
participant EventHandler
ExternalService->>InboundFetchingEventSource: Send Resource Changed Event
InboundFetchingEventSource->>ExternalService: Fetch The Whole Resource
InboundFetchingEventSource->>InboundFetchingEventSource: Cache The Resource
InboundFetchingEventSource->>EventHandler: Propagate Event About The Change
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing CachingInboundEventSource, PollingEventSource, and PerResourcePollingEventSource implementations to understand their event and caching behavior. The work is complete when an inbound notification without a resource fetches and caches the whole external resource, then propagates a change event to the event handler.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100