-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reflector#start() does not retry infinitely #13
Comments
I believe this code: …is actually implemented by the fabric8 client, more or less: …so the problem may simply reduce to the body of the |
Ah, wait; this is already handled: microbean-kubernetes-controller/src/main/java/org/microbean/kubernetes/controller/Reflector.java Lines 1031 to 1057 in ee05d9e
There could be better logging here. I'll add logging and then close this issue. |
Need to also review the Go code to see if the "full replace" operation occurs in the event of a failure-and-retry occurrence. |
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
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 modelsListAndWatch
, but it should be modelingRun
inreflector.go
as well.Complicating matters is the fact that the fabric8 client will automatically try to reconnect watches if they fail.
The text was updated successfully, but these errors were encountered: