I am not entirely sure but I believe that the relevant Go code ends up retrying forever:
https://github.com/kubernetes/client-go/blob/dcf16a0f3b52098c3d4c1467b6c80c3e88ff65fb/tools/cache/reflector.go#L128-L137
But Reflector#start() will bomb out if it can't list things:
|
final KubernetesResourceList<? extends T> list = ((Listable<? extends KubernetesResourceList<? extends T>>)this.operation).list(); |
That line will throw a KubernetesClientException, and that's it. I think this whole method should (internally) be trying this list-and-watch loop forever.
For more details, see also the ListAndWatch function:
https://github.com/kubernetes/client-go/blob/dcf16a0f3b52098c3d4c1467b6c80c3e88ff65fb/tools/cache/reflector.go#L165-L275
Another way to put this is that currently Reflector#start() really just models ListAndWatch, but it should be modeling Run in reflector.go as well.
Complicating matters is the fact that the fabric8 client will automatically try to reconnect watches if they fail.
I am not entirely sure but I believe that the relevant Go code ends up retrying forever:
https://github.com/kubernetes/client-go/blob/dcf16a0f3b52098c3d4c1467b6c80c3e88ff65fb/tools/cache/reflector.go#L128-L137
But
Reflector#start()will bomb out if it can't list things:microbean-kubernetes-controller/src/main/java/org/microbean/kubernetes/controller/Reflector.java
Line 625 in ee05d9e
That line will throw a
KubernetesClientException, and that's it. I think this whole method should (internally) be trying this list-and-watch loop forever.For more details, see also the
ListAndWatchfunction:https://github.com/kubernetes/client-go/blob/dcf16a0f3b52098c3d4c1467b6c80c3e88ff65fb/tools/cache/reflector.go#L165-L275
Another way to put this is that currently
Reflector#start()really just modelsListAndWatch, but it should be modelingRuninreflector.goas well.Complicating matters is the fact that the fabric8 client will automatically try to reconnect watches if they fail.