-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add helper to reschedule all objects for reconciliation #555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks nice!
kube-runtime/src/controller/mod.rs
Outdated
/// Trigger a reconciliation for all managed objects whenever `trigger` emits a value | ||
/// | ||
/// For example, this can be used to reconcile all objects whenever the controller's configuration changes. | ||
pub fn reconcile_all_on(mut self, trigger: impl Stream<Item = ()> + Send + Sync + 'static) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this looks surprisingly simple!
Any chance you can put an example here for it? (can mark it no_run
if it pulls in too much)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never actually runs (the Controller
is never polled) since that would require a K8s cluster to run against.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it illustrates the use case well! Thank you.
Now I guess users can wrap the stream in whatever read-write protection they want and push an item into it from a http endpoint / whatever hook they want.
released in 0.58, thanks again for all of these! |
Fixes #551