Closed acmlearn closed 3 years ago
Tried to test SharedInformerFactory examples using the blog https://rohaan.medium.com/introduction-to-fabric8-kubernetes-java-client-informer-api-b945082d69af.
When testing with 0 resync period, it is still relisting the updates within seconds. sharedInformerFactory.sharedIndexInformerFor( Pod.class, // POJO for Pod resource PodList.class, // POJO for Pod list resource 0 * 1000L); // resync period
As per definition for ResyncPeriod: if non-zero, will re-list this often (you will get OnUpdate calls, even if nothing changed). Otherwise, re-list will be delayed as long as possible (until the upstream source closes the watch or times out, or you stop the controller). https://github.com/kubernetes/client-go/blob/fb61a7c88cb9f599363919a34b7c54a605455ffc/tools/cache/controller.go#L337
created it under kubernetes-client project https://github.com/fabric8io/kubernetes-client/issues/2651
Tried to test SharedInformerFactory examples using the blog https://rohaan.medium.com/introduction-to-fabric8-kubernetes-java-client-informer-api-b945082d69af.
When testing with 0 resync period, it is still relisting the updates within seconds. sharedInformerFactory.sharedIndexInformerFor( Pod.class, // POJO for Pod resource PodList.class, // POJO for Pod list resource 0 * 1000L); // resync period
As per definition for ResyncPeriod: if non-zero, will re-list this often (you will get OnUpdate calls, even if nothing changed). Otherwise, re-list will be delayed as long as possible (until the upstream source closes the watch or times out, or you stop the controller). https://github.com/kubernetes/client-go/blob/fb61a7c88cb9f599363919a34b7c54a605455ffc/tools/cache/controller.go#L337