Commit Graph

811 Commits (e83bf49f863017840ad91cca8bec0303fea3009f)

Author SHA1 Message Date
k8s-merge-robot 4c46bc3243 Merge pull request #13989 from yujuhong/sync_first
Auto commit by PR queue bot
2015-09-16 17:16:23 -07:00
k8s-merge-robot f6fb0a58b6 Merge pull request #13874 from timstclair/status-manager
Auto commit by PR queue bot
2015-09-16 00:46:01 -07:00
Yu-Ju Hong 8f8541b4cd kubelet: make sure sync loop is run before performing housekeeping
Otherwise, kubelet may kill the existing pods before having a chance to update
the desired pods.
2015-09-15 13:11:55 -07:00
gmarek 4b8ddf3d7e Add information about ports opened by Kubelet to API 2015-09-15 14:24:55 -04:00
Wojciech Tyczynski 5da52558e6 Fix watch with RV=0 in Kubelet. 2015-09-14 16:45:58 +02:00
k8s-merge-robot 6f01200188 Merge pull request #13727 from jiangyaoguo/fix-reason-reporting-in-kubelet
Auto commit by PR queue bot
2015-09-11 12:32:20 -07:00
Tim St. Clair 1f91fffb57 Move kubelet.statusManager to status.Manager
This refactor is in preparation for moving more state handling to the
status manager. It will become the canonical cache for the latest
information on running containers and probe status, as part of the
prober refactoring.
2015-09-11 12:22:01 -07:00
k8s-merge-robot bfc60709b1 Merge pull request #13468 from yifan-gu/rkt_doc
Auto commit by PR queue bot
2015-09-10 20:32:08 -07:00
jiangyaoguo 62c0c35307 Fix reporting reason in kubelet
1. Make reason field of StatusReport objects in kubelet in CamelCase format.
2. Add Message field for ContainerStateWaiting to describe detail about Reason.
3. Make reason field of Events in kubelet in CamelCase format.
4. Update swagger,deep-copy and so on.
2015-09-11 10:01:08 +08:00
Daniel Smith b225c1d47a Run gofmt (separate commit for easy rebases) 2015-09-10 17:17:59 -07:00
Daniel Smith 15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
k8s-merge-robot ee7168d868 Merge pull request #13815 from robertabbott/abbott/kubelet_get_instead_of_list
Auto commit by PR queue bot
2015-09-10 15:59:01 -07:00
Yifan Gu e7b9c50ba1 kubelet/rkt: add support for different stage1 image.
Also enable grace stop for service files.
2015-09-10 14:58:03 -07:00
tummychow 78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Bobby Abbott 9a5f43e16d Kubelet#GetNode now uses GetNodeInfo instead of List
Both GetNode and the cache.ListWatch listfunc in the
kubelet package call List unnecessary.

GetNodeInfo is sufficient for GetNode and makes looping
through a list of nodes to check for a matching name
unnecessary.

resolves #13476
2015-09-10 10:50:41 -07:00
Chao Xu 002dcc6343 Merge pull request #13737 from wojtek-t/switch_to_node_in_registry
Rename "minion" to "node" in few places.
2015-09-09 17:49:22 -07:00
Wojciech Tyczynski cd1ac360de Rename "minion" to "node" in few places. 2015-09-09 16:18:23 +02:00
jiangyaoguo 1460a1fb9e Rate limit events in kubelet
1. Add EvnetRecordQps and EventBurst parameter in kubelet.
2. If  EvnetRecordQps and EventBurst was set, rate limit events in kubelet
with a independent ratelimiter as setted.
2015-09-09 16:57:21 +08:00
feihujiang d713826aa9 Add pod name to error message when getting logs of a container 2015-09-07 17:03:54 +08:00
James DeFelice de064f4254 fix kubelet syncLoop busy loop upon close of updates chan 2015-09-04 17:56:02 +00:00
Abhi Shah c9f2d3151b Merge pull request #13155 from derekwaynecarr/enforce_limits
Map cpu limits to cpu-quota in docker run
2015-09-03 16:28:04 -07:00
Abhi Shah d923e61dda Merge pull request #13397 from yujuhong/housekeeping
kubelet: define the housekeeping period
2015-09-03 15:46:29 -07:00
derekwaynecarr 5dc74e8dbf Add support for CFS quota in kubelet 2015-09-03 13:44:28 -04:00
Brendan Burns ac958e5320 Merge pull request #12513 from brendandburns/tc2
integrate bandwidth shaping and the kubelet.
2015-09-02 09:44:10 -07:00
Yu-Ju Hong 08ec796995 kubelet: remove orphaned pod directories properly
PR #13293 added a safety check to not remove a pod directory if the child
volumes directory is not empty. This logic is faulty because kubelet may have
directory structures podUID/volumes/volumeKind/volumeName. E.g.,
`056db95d-50ee-11e5-a2e4-42010af0ba1d/volumes/kubernetes.io~empty-dir/default-token-al3r2`

This change fixes that by properly listing all volumes under a pod.
2015-09-01 15:39:17 -07:00
k8s-merge-robot 5331a26c5b Merge pull request #13293 from yujuhong/pod_dir
Auto commit by PR queue bot
2015-09-01 04:59:55 -07:00
Yu-Ju Hong 13b268b378 kubelet: define the minimum housekeeping period
Before, kubelet performs global cleanup tasks every iteration. After the
PR #13003, kubelet performs the tasks on every sync internval (10 seconds).
This PR decouples the housekeeping period with the sync internval to ensure
that kubelet cleans up promptly, while not too often (no more than once every
minimum housekeeping period).
2015-08-31 17:28:20 -07:00
Brendan Burns 9f3ef68ebc integrate bandwidth shaping and the kubelet. 2015-08-30 22:24:09 -07:00
k8s-merge-robot 4a7115d272 Merge pull request #11955 from pedro-r-marques/flag_resolv_conf
Auto commit by PR queue bot
2015-08-30 21:03:54 -07:00
Yu-Ju Hong 8774f6efa2 kubelet: don't remove any pod directory with non-empty volumes
If the volumes directory is not empty, it implies that volumes may not have
been properly cleaned up yet. Do not attempt to remove the pod directory.
2015-08-27 22:18:51 -07:00
Yu-Ju Hong 697197d383 Kubelet: do not remove pod directory if any container is still running
If there are any running container in the pod, we cannot remove the volume.
Therefore, we should not attempt to remove the pod directory.
2015-08-27 18:19:13 -07:00
Pedro Roque Marques 99b1da848d Add kubelet '--resolv-conf' flag.
Allow the user to specify the resolver configuration file that is used
to determine the default DNS parameters. This defaults to the system's
/etc/resolv.conf.
2015-08-26 15:41:36 -07:00
Yu-Ju Hong c7afae75f5 Merge pull request #13103 from yujuhong/restart_count
Kubelet: fix container restart counts
2015-08-26 15:13:10 -07:00
Yu-Ju Hong b906e34576 kubelet: trigger pod workers independently
Currently, whenever there is any update, kubelet would force all pod workers to
sync again, causing resource contention and hence performance degradation.

This commit flips kubelet to use incremental updates (as opposed to snapshots).
This allows us to know what pods have changed and send updates to those pod
workers only. The `SyncPods` function has been replaced with individual
handlers, each handling an operation (ADD, REMOVE, UPDATE). Pod workers are
still triggered periodically, and kubelet performs periodic cleanup as well.

This commit also spawns a new goroutine solely responsible for killing pods.
This is necessary because pod killing could hold up the sync loop for
indefinitely long amount of time now user can define the graceful termination
period in the container spec.
2015-08-25 17:52:01 -07:00
Yu-Ju Hong 9f508e9422 Merge pull request #13076 from invenfantasy/master
Cleanup deprecated Forever function
2015-08-25 10:07:10 -07:00
Nikhil Jindal 8846c841a8 Merge pull request #12648 from samsabed/crashloop
back off restarts of crashlooping containers
2015-08-24 18:54:13 -07:00
Yu-Ju Hong 1e26cdfb67 kubelet: fix container restart counts
This commit ensures that the container restart count increments monotonically
when there is no kubelet restarts.
2015-08-24 12:50:05 -07:00
Nikhil Jindal a1c5f3f45d Merge pull request #12876 from yujuhong/pod_status
kubelet: switch to using pod UID as the key in status manager
2015-08-24 10:39:02 -07:00
Sam Abed 995cb15bb6 back off restarts of crashlooping containers
Signed-off-by: Sam Abed <samabed@gmail.com>
2015-08-24 21:43:17 +10:00
caogaojin 60cb4406e9 Cleanup deprecated Forever function
Since util.Forever function has been deprecated, we should cleanup these
pieces of code.
2015-08-24 10:31:59 +08:00
Clayton Coleman f5c4a3e7a6 Handle graceful termination in the Kubelet
Supports pods that are gracefully deleted on the server being
handled in the Kubelet

preStop is limited to the grace period of the pod in execution.
2015-08-21 10:18:21 -04:00
Saad Ali 9b01580946 Merge pull request #12872 from runningwild/master
Fix several problems with using rkt on gce
2015-08-20 15:46:16 -07:00
Jonathan Wills 80e799fc0c Allow configuring the rkt binary in a kubelet with a flag.
This is necessary because coreos comes with rkt installed, and if we want to use a different version
we need some way to avoid the default one.
2015-08-19 09:42:13 -04:00
Robert Bailey 08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Yu-Ju Hong 0c84b837cf kubelet: switch to using pod UID as the key in status manager
We chose to use podFullName (name_namespace) as key in the status manager
because mirror pod and static pod share the same status. This is no longer
needed because we do not store statuses for static pods anymore (we only
store statuses for their mirror pods). Also, reviously, a few fixes were
merged to ensure statuses are cleaned up so that a new pod with the same
name would not resuse an old status.

This change cleans up the code by using UID as key so that the code would
become less brittle.
2015-08-18 14:39:02 -07:00
Robert Bailey 11d5712278 Merge pull request #12736 from deads2k/relax-pull-secret-constraints
tolerate missing image pull secrets:
2015-08-18 11:48:01 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Clayton Coleman 780accb3ba Kubelet should garbage collect dead pods
The sync loop should check for terminated pods that are no longer
running and clear them. The status loop should never write status
if the pod UID changes. Mirror pods should be deleted immediately
rather than gracefully.
2015-08-18 09:08:44 -04:00
Clayton Coleman 89f1f3b1b8 Alter graceful deletion to not use TTL
Avoid TTL by deleting pods immediately when they aren't
scheduled, and letting the Kubelet delete them otherwise.

Ensure the Kubelet uses pod.Spec.TerminationGracePeriodSeconds
when no pod.DeletionGracePeriodSeconds is available.
2015-08-18 09:08:43 -04:00
Clayton Coleman b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00