Merge pull request #41175 from StudyNick/zte-20170209

Automatic merge from submit-queue (batch tested with PRs 39418, 41175, 40355, 41114, 32325)

ResyncPeriod Comment

ResyncPeriod Comment:
// ResyncPeriod returns a function which generates a duration each time it is
// invoked; this is so that multiple controllers don't get into lock-step and all
// hammer the apiserver with list requests simultaneously.
This commit is contained in:
Kubernetes Submit Queue 2017-02-10 04:50:41 -08:00 committed by GitHub
commit a9dc65675b

View File

@ -93,6 +93,9 @@ controller, and serviceaccounts controller.`,
return cmd
}
// ResyncPeriod returns a function which generates a duration each time it is
// invoked; this is so that multiple controllers don't get into lock-step and all
// hammer the apiserver with list requests simultaneously.
func ResyncPeriod(s *options.CMServer) func() time.Duration {
return func() time.Duration {
factor := rand.Float64() + 1