Merge pull request #105272 from wojtek-t/add_jittering_for_kubelet

Add jittering for Kubelet status computing
This commit is contained in:
Kubernetes Prow Robot 2021-09-28 00:20:42 -07:00 committed by GitHub
commit 9005160245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1468,8 +1468,10 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) {
go kl.volumeManager.Run(kl.sourcesReady, wait.NeverStop)
if kl.kubeClient != nil {
// Start syncing node status immediately, this may set up things the runtime needs to run.
go wait.Until(kl.syncNodeStatus, kl.nodeStatusUpdateFrequency, wait.NeverStop)
// Introduce some small jittering to ensure that over time the requests won't start
// accumulating at approximately the same time from the set of nodes due to priority and
// fairness effect.
go wait.JitterUntil(kl.syncNodeStatus, kl.nodeStatusUpdateFrequency, 0.04, true, wait.NeverStop)
go kl.fastStatusUpdateOnce()
// start syncing lease