Commit Graph

21 Commits (c292d2e8d6fcd1bb5b3cb211d53abc8a277c1c48)

Author SHA1 Message Date
Yu-Ju Hong b4b0bc75c4 Kubelet: pass the acutal pod for status update
Pod status update should include the ObjectMeta of the pod. This change is
required for #5738 to merge.
2015-03-25 09:58:46 -07:00
Yifan Gu 13250c904f kubelet: Replace GetKubeletDockerContainers with GetPods in syncPod/SyncPods. 2015-03-24 16:01:38 -07:00
Jerzy Szczepkowski 34a8a3a844 Running node selector predicate on kubelet.
Added checking on kubelet if scheduled pods have matching node selector. This is the last step to fix #5207.
2015-03-23 08:21:58 +01:00
Jerzy Szczepkowski 5845f6ad48 Running resource predicate on kubelet.
Added checking on kubelet if scheduled pods do not exceed resources. Related to #5207.
2015-03-19 10:40:10 +01:00
Yu-Ju Hong 929fb63b33 Sync static pods from Kubelet to the API server
Currently, API server is not aware of the static pods (manifests from
sources other than the API server, e.g. file and http) at all. This is
inconvenient since users cannot check the static pods through kubectl.
It is also sub-optimal because scheduler is unaware of the resource
consumption by these static pods on the node.

This change syncs the information back to the API server by creating a
mirror pod via API server for each static pod.

 - Kubelet creates containers for the static pod, as it would do
   normally.

 - If a mirror pod gets deleted, Kubelet will re-create one. The
   containers are sync'd to the static pods, so they will not be
   affected.

 - If a static pod gets removed from the source (e.g. manifest file
   removed from the directory), the orphaned mirror pod will be deleted.

Note that because events are associated with UID, and the mirror pod has
a different UID than the original static pod, the events will not be
shown for the mirror pod when running `kubectl describe pod
<mirror_pod>`.
2015-03-17 08:45:56 -07:00
Wojciech Tyczynski 5d95e9e671 Remove BoundPods from Kubelet 2015-03-16 19:17:21 +01:00
Victor Marmol 2939abb6cb Merge pull request #5383 from wojtek-t/kubelet_test
Speedup pkg/kubelet/runonce_test.go
2015-03-12 10:22:03 -07:00
Victor Marmol f9d2ab6e48 Use time.Sleep() instead of <-time.After(). 2015-03-12 09:25:09 -07:00
Wojciech Tyczynski dca3db0a50 Speedup pkg/kubelet/runonce_test.go 2015-03-12 17:12:04 +01:00
Yu-Ju Hong 3ccdb8db98 kubelet: reject pods on host port conflict
When a host port conflict is detected, kubelet should set the pod status to
fail. The failed status will then be polled by other components at a later time,
which allows replication controller to create a new pod if necessary.

To achieve this, this change stores the pod status information in a status map
upon the detecton of port conflict. GetPodStatus() consults this status map
before attempting to query docker. The entries in the status map will be removed
when the pod is no longer associated with the node.
2015-03-06 10:46:49 -08:00
Paul Morie 02b18edac6 Allow multiple sources to be used with record package 2015-03-05 13:54:29 -05:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Johan Euphrosine 14c3b9d900 runonce: handle inspect error 2014-10-21 13:38:11 -07:00
Johan Euphrosine 6cd0c261b3 runonce: better container state detection 2014-10-21 12:00:51 -07:00
Clayton Coleman 892942af8f Read BoundPods from etcd instead of ContainerManifestList
There are three values that uniquely identify a pod on a host -
the configuration source (etcd, file, http), the pod name, and the
pod namespace. This change ensures that configuration properly
makes those names unique by changing podFullName to contain both
name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for
pods not in the default namespace at this time.
2014-10-16 19:29:08 -04:00
Johan Euphrosine 0fc5e68207 runonce: isPodRunning returns no error 2014-10-08 22:34:40 -07:00
Johan Euphrosine dbb2342688 runonce: list kubelet container between each iteration 2014-10-08 22:28:41 -07:00
Johan Euphrosine 14c5fd405d kubelet: only check for container listed in the manifest
also wait 1 retryDelay before polling state after syncing.
2014-10-08 17:49:21 -07:00
Daniel Smith 2d048bc0f2 fix captured loop variable 2014-10-07 13:57:30 -07:00
Johan Euphrosine fa1dcd0a8b kubelet: add basic test for runonce 2014-10-03 18:02:30 -07:00
Johan Euphrosine f91162cf78 kubelet: add --runonce flag, exits after starting pod from the manifest 2014-10-03 18:02:30 -07:00