Skip to content

Create a Generic Polling Event Source #651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
csviri opened this issue Nov 3, 2021 · 1 comment
Closed

Create a Generic Polling Event Source #651

csviri opened this issue Nov 3, 2021 · 1 comment
Assignees
Labels
devex-epic needs-discussion Issue needs to be discussed more before working on it
Milestone

Comments

@csviri
Copy link
Collaborator

csviri commented Nov 3, 2021

Polling an external system for statuses and propagating event if its state changed is something that we can support in a generic way with an Event Source that handles the polling and caching part.

Some aspects to discuss:

  1. There are 2 ways a polling could happen. Generic poller (not making a request per custom resource), like listing some changes from an API. The other approach is polling per custom resource, thus make requests for each custom resource, since the request could be different based on spec or other parameters related to particular custom resource instance.

  2. An interesting design question again popping up here is how the event source knows about the custom resources, if some information is needed from them. This is something that we've already discussed before. For cleanup for example we propagate an event for all the event sources, if a custom resource is deleted and the TimerEventSource has scheduled event for that event source, we want to cancel it. So there's a callback to let the TimerEventSource know that the custom resource is deleted. The question is if we should not have callback on other cases, like when a custom resource created or updated. (Such callback could be implemented now of course manually from the controller.)

@csviri
Copy link
Collaborator Author

csviri commented Dec 15, 2021

closing, implemented under mentioned umbrella issue and PR: #729

@csviri csviri closed this as completed Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex-epic needs-discussion Issue needs to be discussed more before working on it
Projects
None yet
Development

No branches or pull requests

1 participant