k3s/pkg/kubelet/dockertools
Yu-Ju Hong 2eb17df46b kubelet: independent pod syncs and backoff on error
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.
2015-11-03 13:29:08 -08:00
..
container_gc.go Pass the ContainerGCPolicy in Runtime.GarbageCollect 2015-10-09 06:57:10 +08:00
container_gc_test.go Pass the ContainerGCPolicy in Runtime.GarbageCollect 2015-10-09 06:57:10 +08:00
convert.go Rename imported package local name kubeletTypes to kubetypes 2015-10-09 10:24:31 -07:00
convert_test.go Use strong type for container ID 2015-10-07 10:58:05 -07:00
docker.go Move findPodContainer to docker_test.go 2015-11-02 09:49:07 -08:00
docker_test.go Move findPodContainer to docker_test.go 2015-11-02 09:49:07 -08:00
exec.go run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
fake_docker_client.go Move docker label related functions into labels.go and add pod name, pod namespace and pod uid into docker label 2015-10-29 22:42:25 -07:00
fake_manager.go Adding a kubelet flag to optionally enable parallel image pulls. 2015-10-22 17:19:51 -07:00
instrumented_docker.go typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
labels.go Move TerminationMessagePath into docker label. 2015-11-02 14:32:58 -08:00
manager.go kubelet: independent pod syncs and backoff on error 2015-11-03 13:29:08 -08:00
manager_test.go kubelet: independent pod syncs and backoff on error 2015-11-03 13:29:08 -08:00