Commit Graph

20 Commits (3215e8535ae8afcf850fbaac9df7ff9abe42f9e0)

Author SHA1 Message Date
Random-Liu 1b1f2766ed Avoid StatusManager.syncPod when there is no corresponding mirror pod for static pod. 2016-09-07 17:03:15 -07:00
Andrey Kurilin 9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
Euan Kemp eeee8b54ea kubelet: delete unused pod manager method 2016-07-08 15:15:54 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Tim St. Clair f2f3caf744 Rename **/manager.go 2016-06-21 15:11:31 -07:00
Paul Morie 8dafc776de Godoc for kubelet pod manager 2016-06-13 10:54:01 -04:00
Random-Liu cb6fe9e7ef Delete pod with uid as precondition. 2016-05-05 14:34:49 -07:00
Tim St. Clair 7b6d843309 Move test-only files to test-only packages 2016-03-01 09:11:32 -08:00
Chao Xu 184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Chao Xu f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
Chao Xu cddd7b56a4 replace client with clientset in kubelet and other places 2016-02-02 20:28:45 -08:00
Yu-Ju Hong 25f2c6f330 Improve mirror pod creation/deletion
- Ignore the "not found" error on deletion.
 - Recognize the "already exists" error on creation and check if the existing
   pod meets requirement. If so, don't report an error.
 - Immediately create a mirror pod after a successful deletion, if needed.
2016-01-21 16:01:14 -08:00
Tim St. Clair d2532b50ce Correct backwards pod mappings
The mapping of static pod <--> mirror pod UIDs was backwards in a couple
places. Fortunately, they canceled each other out. Fixed, and added a
test case.
2015-11-24 18:32:44 -08:00
k8s-merge-robot 7b281c946b Merge pull request #17270 from timstclair/mirrorpods
Auto commit by PR queue bot
2015-11-21 22:55:26 -08:00
Tim St. Clair fbc5a7d034 Sync status to new mirror pods 2015-11-13 18:09:17 -08:00
Yu-Ju Hong bc6414a873 kubelet: add a generic pod lifecycle event generator
This change introduces pod lifecycle event generator (PLEG), and adds a generic
PLEG. The generic PLEG relies on relisting to discover container events, and is
container-runtime-agnostic. Both docker and rkt are changed to use generic
PLEG.
2015-11-13 09:55:36 -08:00
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
Yu-Ju Hong f8aa206ffa Stores hash of pod manifest in mirror pod's annotation
Use the hash to track whether the mirror pod is a truthful representation of
the static pod.
2015-10-20 15:44:31 -07:00
Yu-Ju Hong 2c76c55bb9 kubelet: move PodManager and MirrorClient to a subpackage
This change moves pod_manager.go and mirror_client.go to a separate package.
Also made necessary, minor changes to facilitate testing.
2015-10-12 16:34:18 -07:00