mirror of https://github.com/k3s-io/k3s
![]() Currently kubelet syncs all pods every 10s. This is not preferred because * Some pods may have been sync'd recently. * This may cause all the pods to be sync'd at once, causing undesirable CPU spikes. This PR replaces the global syncs with independent, periodic pod syncs. At the end of syncing, each pod worker will enqueue itslef with a future timestamp ( current time + sync interval), when it will be due for another sync. * If the pod worker encoutners an sync error, it may requeue with a different timestamp to retry sooner. * If a sync is triggered by the update channel (events or spec changes), the pod worker would enqueue a new sync time. This change is necessary for moving to long or no periodic sync period once pod lifecycle event generator is completed. We will still rely on the mechanism to requeue the pod on sync error. This change also makes sure that if a sync does not succeed (either due to real error or the per-container backoff mechanism), an error would be propagated back to the pod worker, which is responsible for requeuing. |
||
---|---|---|
.. | ||
container_gc.go | ||
container_gc_test.go | ||
convert.go | ||
convert_test.go | ||
docker.go | ||
docker_test.go | ||
exec.go | ||
fake_docker_client.go | ||
fake_manager.go | ||
instrumented_docker.go | ||
labels.go | ||
manager.go | ||
manager_test.go |