mirror of https://github.com/k3s-io/k3s
ResyncPeriod Comment
parent
bd17091e16
commit
4f19bcb3f0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue