Skip to content

Commit aff9cb3

Browse files
committed
passing list-options in generic api based informers
1 parent e45408a commit aff9cb3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

util/src/main/java/io/kubernetes/client/informer/SharedInformerFactory.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,22 @@ public ApiListType list(CallGeneratorParams params) throws ApiException {
258258

259259
public Watchable<ApiType> watch(CallGeneratorParams params) throws ApiException {
260260
if (Namespaces.NAMESPACE_ALL.equals(namespace)) {
261-
return genericKubernetesApi.watch();
261+
return genericKubernetesApi.watch(
262+
new ListOptions() {
263+
{
264+
setResourceVersion(params.resourceVersion);
265+
setTimeoutSeconds(params.timeoutSeconds);
266+
}
267+
});
262268
} else {
263-
return genericKubernetesApi.watch(namespace);
269+
return genericKubernetesApi.watch(
270+
namespace,
271+
new ListOptions() {
272+
{
273+
setResourceVersion(params.resourceVersion);
274+
setTimeoutSeconds(params.timeoutSeconds);
275+
}
276+
});
264277
}
265278
}
266279
};

0 commit comments

Comments
 (0)