If you open a watch, it will stay open even if 1000 events have passed (because the server hasn't seen a change to your object). You just can't look further back in time than 1000 events when starting a watch.
On Nov 25, 2016, at 3:37 AM, Michal Fojtik <[email protected]> wrote: I think there is also a limit of how many events the watcher process before it drops and I think that limit is set to 1000 events. On Fri, Nov 18, 2016 at 11:17 PM, Clayton Coleman <[email protected]> wrote: > All connections to the API server are given a timeout (and there is a > maximum). Also, any intervening proxy could be set with a lower > connection timeout. > > I can't remember whether the API server timeout should be returning an > error. But you definitely will have an upper bound on watch duration. > > > On Nov 18, 2016, at 5:12 PM, John Mazzitelli <[email protected]> wrote: > > > > I have a watcher setup: > > > > ==== > > func watch() { > > fieldSelector := fields.OneTermEqualSelector("spec.nodeName", > nodeName) > > listOptions := api.ListOptions{Watch: true, FieldSelector: > fieldSelector } > > watcher, err := d.Client.Pods(v1.NamespaceAll).Watch(listOptions) > > > > go func() { > > for event := range watcher.ResultChan() { // <-- why does this > chan close sometimes? > > ... > > } > > } > > } > > ==== > > > > And this works most of the time. But every now and then that > watcher.ResultChan gets closed and breaks the for-loop. But at no time did > my code actually close the watcher. It just closes for some unknown reason > that I've yet to replicate. > > > > Has anyone seen this before? A watcher channel just closing for no > apparent reason? > > > > Under what conditions would a watcher like this close? Maybe there is > some condition that I am not aware of where the watcher channel will close > (again, MY code doesn't call Close() though). > > > > _______________________________________________ > > users mailing list > > [email protected] > > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > > _______________________________________________ > users mailing list > [email protected] > http://lists.openshift.redhat.com/openshiftmm/listinfo/users >
_______________________________________________ users mailing list [email protected] http://lists.openshift.redhat.com/openshiftmm/listinfo/users
