Using fabric8io kubernetes-client; is it possible to remove a [custom] watcher?

7/14/2017

Watcher:

private final class CustomKubeWatcher implements Watcher<Pod> { ... }

Added using:

kubeClient.pods().inNamespace(kubeNamespace).watch(customKubeWatcher);

How do I stop the watcher? Does it get cleaned up when my client instance is GC'd?

https://github.com/fabric8io/kubernetes-client

-- mehmetg
java
kubernetes-health-check

1 Answer

7/14/2017

Unless I'm missing something, watch() will return a Watch object, which can be closed.

-- Laird Nelson
Source: StackOverflow