Replies: 2 comments 3 replies
-
After digging more into this I found out that |
Beta Was this translation helpful? Give feedback.
-
Hey there, we do indeed discard the root event type as you've noticed for watcher streams. This is because it's a bit of an anti-pattern to try to build specific behaviour against the enum variants because Kubernetes does not guarantee delivery of events (i.e. when your app is down, or have network desyncs) and this is a pretty common scenario. In particular;
Thus, it is better to either say you want all Added + Updated events (through |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am learning both rust and kube-rs at the same time so I admit some things are still confusing for me despite reading most of the rust book once.
I am trying to monitor events related to multiple kube entities, I first started with API.watch which led me to watcher and that's where I am but...
the documentation for API.watch says that watcher is a most robust way to do that and the example here show nicely how to batch multiple streams (pods, deployments in my case) but they don't return the same objects, when using API.watch I get added, deleted, updated but when using the watcher I get only the resulting objects.
is there a way to do https://github.com/kube-rs/kube/blob/main/examples/multi_watcher.rs but keeping the added/updated/deleted information ?
Thanks for any pointer in the right direction :)
Beta Was this translation helpful? Give feedback.
All reactions