-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the bug
The ReflectorRunnable sets a random 5-10mins timeout for watch call. However, this timeout doesn’t really affect watch call , because: in SharedInformerFactory, it implements a ListerWatcher whose watch call uses underlying client timeout.
At SharedInformerFactory, line 212 returns the call with correct timeout (5-10mins): Call call = callGenerator.generate(params);
However, line 214 generates a new Call object apiClient.getHttpClient().newCall(call.request()). The timeout of the new Call object uses the underlying OkHttpClient.callTimeoutMillis as call timeout, which is by default 0. I understand that the comment says it wants 0 (unlimited) read timeout, but it's not respecting the call timeout, which makes the random 5-10mins timeout for watch call meaningless in ReflectorRunnable.
This means SharedInformerFactory always sets watch call timeout to the callTimeoutMillis of the underlying OkHttpClient (by default 0, unlimited), but not the one set by ReflectorRunnable (5-10mins). If users use default settings, call timeout is 0 - there will never be client-side timeout triggered.
Client Version
At least 13.0.0 and above
Kubernetes Version
n/a
Java Version
n/a
To Reproduce
Create a new SharedInformerFactory using all default settings.
Expected behavior
SharedInformerFactory's listerWatcherFor() should respect the call timeout from CallGenerator.
KubeConfig
n/a
Server (please complete the following information):
n/a
Additional context
n/a