Skip to content
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

resyncPeriod=0 should imply no resync #2651

Closed
acmlearn opened this issue Dec 8, 2020 · 0 comments · Fixed by #2660
Closed

resyncPeriod=0 should imply no resync #2651

acmlearn opened this issue Dec 8, 2020 · 0 comments · Fixed by #2660
Assignees
Labels

Comments

@acmlearn
Copy link

acmlearn commented Dec 8, 2020

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).

@rohanKanojia rohanKanojia self-assigned this Dec 10, 2020
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Dec 11, 2020
…ncPeriod

Refactor Reflector to ignore resync if resyncPeriod is set to zero
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Dec 14, 2020
…ncPeriod

Refactor Reflector to ignore resync if resyncPeriod is set to zero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants