Skip to content
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

factoring watch/list functionality out of config map updater and deployment cache #13

Open
wants to merge 2 commits into
base: global-components
Choose a base branch
from

Conversation

arschles
Copy link
Owner

@arschles arschles commented Aug 26, 2021

The config map updater and deployment cache share similar core functionality. They:

  • open a watch stream for a resource
  • periodically ping the same resource
  • update an internal storage system based on changes from the watch stream and updates from the periodic pinger
  • shut down when a context is done

This factors out the functionality in the first two and last bullet points into a separate WatcherLister struct. This is similar to the informers functionality in k8s.io/client-go, but significantly simpler, and agnostic of any storage concerns. taking that strategy achieves two major things:

  • keeps storage and event processing orthogonal to any watch/list/reconcile functionality
  • prevents much of the loss of type safety generally associated with the informers libraries

Checklist

…oyment cache

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant