-
-
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
Examples of spawning Informer tasks #201
Comments
Usually you'd want to |
Informer now returns one event for every object by default on boot (except for deleted ones), that might make it easier. But if you actually need periodic sweeps of external resources (because the owning kube object got deleted and the controller booted), then hopefully the WIP |
As this issue is quite old and examples have received quite a lot of futures based revamping (as well as controller-rs + version-rs being added to examples in readme). So feel happy closing this now after #299 But for some closure for this particular setup in the new
The certificate management example seems like a common use case. An example that does this in some basic form would be very helpful! |
I have forgotten what I was trying to do with this, time to close the ticket! |
I just upgraded an "old" kube-rs app to use the latest futures goodness. It was quite a learning curve to go from
thread::spawn()
to futures spawn. Perhaps some examples will help the next soul?My code manages ingress objects and tls secrets to go along with them. I scan on boot, looking for expired certs. I also start an informer so new ingresses get certs ASAP.
Spawning a task for periodic full sweep of ingresses:
spawning a task for the informer to work:
where
ingress_informer_poller
looks like:then we need to join the two tasks so they are held and continue to be driven by tokio:
The text was updated successfully, but these errors were encountered: