You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to specify an initial value for resourceVersion when building a kube::runtime::watcher::watcher(..).
Use case: watch various resources (pods, events, &c) and sync them to Kafka. Use the bookmarks to establish a stable restart point when application restarts.
Describe the solution you'd like
I would like to be able to specify a previously returned resourceVersion from the K8s API to establish a starting location for watcher streams.
This framework is already utilizing this feature internally. I would like to be able to provide the initial state for this value in order to achieve this objective.
Describe alternatives you've considered
N/A
Documentation, Adoption, Migration Strategy
As can be seen in the K8s documentation here, the K8s API maybe be called via: GET /api/v1/namespaces/default/pods?watch=1&resourceVersion=987654&allowWatchBookmarks=true. This framework is already using this feature, but the starting value for resourceVersion is not exposed.
Target crate for feature
kube-runtime
The text was updated successfully, but these errors were encountered:
hm, while you could possibly use watch bookmarks for this type of bookkeeping (at least the KEP for bookmarks intends them for this), the watcher in kube is designed for the long-lived controller/reflector use case, where you keep the full set of what you need in memory, rather than some partial watch state. Partial watch state is generally not something we want to pass around because we want controllers to always have complete state available when ready (so allowing them to start with partial state is a footgun to us).
If your use case is mainly to avoid duplicating uploads, then you could consider trying to run an Api::watch directly with WatchParams::streaming_lists (say) and do the book-keeping from that. Have never tried to rely on bookmarks myself like this, but I expect that will be an easier approach.
Would you like to work on this feature?
maybe
What problem are you trying to solve?
I would like to be able to specify an initial value for
resourceVersion
when building akube::runtime::watcher::watcher(..)
.Use case: watch various resources (pods, events, &c) and sync them to Kafka. Use the bookmarks to establish a stable restart point when application restarts.
Describe the solution you'd like
I would like to be able to specify a previously returned
resourceVersion
from the K8s API to establish a starting location for watcher streams.This framework is already utilizing this feature internally. I would like to be able to provide the initial state for this value in order to achieve this objective.
Describe alternatives you've considered
N/A
Documentation, Adoption, Migration Strategy
As can be seen in the K8s documentation here, the K8s API maybe be called via:
GET /api/v1/namespaces/default/pods?watch=1&resourceVersion=987654&allowWatchBookmarks=true
. This framework is already using this feature, but the starting value forresourceVersion
is not exposed.Target crate for feature
kube-runtime
The text was updated successfully, but these errors were encountered: