Commit Graph

3699 Commits (9707a944c25310883125fb6ae2c5979e09fb95d1)

Author SHA1 Message Date
nikhiljindal 1b87060aec Adding GetFieldSelector() to client.EventInterface 2015-03-20 13:58:23 -07:00
Tim Hockin 4375376e9c Rename Service.ContainerPort to TargetPort in v1b3
Fix all callers and examples.  Part of multi-port service cleanup.
2015-03-20 13:50:06 -07:00
Tim Hockin bfadae77e0 Promote volume plugins, prep for persistent vols
Move pkg/kubelet/volume/... to pkg/volume/...
Some renames to make the soon-to-come persistent volumes work clearer.
2015-03-20 13:49:40 -07:00
Yifan Gu 487d34e409 kubelet: add container runtime cache and fake runtime. 2015-03-20 13:15:20 -07:00
Yifan Gu 319d537cf9 kubelet: add container runtime interface. 2015-03-20 13:15:20 -07:00
Wojciech Tyczynski 9c4ef28b2d Comments 2015-03-20 20:13:16 +01:00
Wojciech Tyczynski 3b367f8ab8 Refactor file_test.go 2015-03-20 20:13:16 +01:00
Abhishek Gupta b0c23c1046 Headless Services: Adding option to specify None for PortalIP 2015-03-20 12:10:03 -07:00
Victor Marmol c5f73516b6 Merge pull request #5704 from wojtek-t/kubelet_file_read_pod
Kubelet read pods from file
2015-03-20 10:00:49 -07:00
Victor Marmol e94c5c3fa9 Merge pull request #5677 from smarterclayton/remove_healthz_global
Remove global map from healthz
2015-03-20 08:32:39 -07:00
Satnam Singh ec77230386 Merge pull request #5416 from smarterclayton/use_utc_serialized_and_local_otherwise
Use UTC when marshalling times and Local when unmarshalling
2015-03-20 08:32:26 -07:00
Victor Marmol dd74fa7f85 Merge pull request #5703 from fgrzadkowski/empty_pod_docs
Add documentation explaining there must be at least one container in a Pod
2015-03-20 08:07:25 -07:00
Wojciech Tyczynski 7a7e64331c Kubelet file read both ContainerManifest and Pod 2015-03-20 12:09:09 +01:00
Filip Grzadkowski a48e9af28d Add documentation explaining there must be at least one container in a Pod 2015-03-20 11:10:30 +01:00
Wojciech Tyczynski c5d8c391fb Refactor kubelet/config to share code 2015-03-20 09:40:52 +01:00
Victor Marmol fc8f4411ef Correct documentation about stats arguments. 2015-03-19 22:11:04 -07:00
Clayton Coleman 6918a4d32e Replace automatic YAML decoding with opt-in YAML decoding
Base codecs no longer automically handle YAML.  Instead, clients
must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
2015-03-20 00:03:56 -04:00
Clayton Coleman 71abc99dbe Expose a ToJSON and runtime.YAMLDecoder helper
Enables clients to optionally handle YAML
2015-03-20 00:03:56 -04:00
Clayton Coleman 022c103699 Update RollingUpdater to use resource.Builder
Remove last usage of ResourceFromFile
2015-03-20 00:03:54 -04:00
Clayton Coleman 84ab8f7254 Reduce probe logging level
Too chatty for normal operation
2015-03-19 23:06:21 -04:00
Victor Marmol b6d2cf4b3e Merge pull request #5685 from yujuhong/pod_status
Kubelet: per-pod workers should avoid grabbing the pod array lock
2015-03-19 18:54:36 -07:00
Yu-Ju Hong 0d0fb5f07b Kubelet: per-pod workers should avoid grabbing the pod array lock
Per-pod worker syncs the pod and container status, and write the pod status in
the pod status cache. Given that it already owns a copy of the pod, it can
bypass the additional pod lookup step completely. This change adds a new
generatePodStatusByPod() method to achieve this. In general, per-pod worker
should avoid accessing the internal pod array completely, as this would may
lead to high contention.

This change also changes the return type of GetPodByFullName to reflect the
name, and consolidates GetPodByFullName() and GetPodByName().
2015-03-19 18:25:41 -07:00
Brian Grant 699dc96c7b Merge pull request #5085 from smarterclayton/allow_graceful_delete
Support graceful deletion of resources
2015-03-19 17:58:31 -07:00
Clayton Coleman 015bc3b7bd Remove global map from healthz
It currently is impossible to use two healthz handlers on different
ports in the same process.  This removes the global variables in favor
of requiring the consumer to specify all health checks up front.
2015-03-19 19:49:44 -04:00
Tim Hockin 1cbde2c5c7 Merge pull request #5664 from calfonso/nfs_mount_plugin
Addresses cross compile for syscall.Unmount by delegating to Mount.
2015-03-19 16:19:01 -07:00
Tim Hockin 4ee6eb8c73 Make net plugins build on non-unix 2015-03-19 16:15:33 -07:00
CJ Cullen 7ddcecfd1c Revert "Revert "[WIP] southbound networking hooks in kubelet"" 2015-03-19 16:14:13 -07:00
Zach Loafman b5d1e538df Revert "[WIP] southbound networking hooks in kubelet" 2015-03-19 16:08:08 -07:00
Tim Hockin 1ce5dda691 Merge pull request #5069 from rajatchopra/network_hooks
[WIP] southbound networking hooks in kubelet
2015-03-19 15:03:53 -07:00
CJ Cullen f6d8d5f800 Merge pull request #5522 from fabioy/expose-label.fix
Add "--labels" option to the "expose" kubectl command.
2015-03-19 14:40:15 -07:00
Rajat Chopra 7857aa7751 kubelet networking plugin 2015-03-19 14:15:52 -07:00
Chris Alfonso 9d0c9e7dc3 Addresses cross compile for syscall.Unmount by delegating to Mount. 2015-03-19 16:46:14 -04:00
Jerzy Szczepkowski c0ff504ad3 Merge pull request #5501 from jszczepkowski/kubelet-spechost
Running resource predicate on kubelet.
2015-03-19 21:34:27 +01:00
Clayton Coleman 428d2263e5 Graceful deletion of resources
This commit adds support to core resources to enable deferred deletion
of resources.  Clients may optionally specify a time period after which
resources must be deleted via an object sent with their DELETE. That
object may define an optional grace period in seconds, or allow the
default "preferred" value for a resource to be used. Once the object
is marked as pending deletion, the deletionTimestamp field will be set
and an etcd TTL will be in place.

Clients should assume resources that have deletionTimestamp set will
be deleted at some point in the future.  Other changes will come later
to enable graceful deletion on a per resource basis.
2015-03-19 15:33:32 -04:00
Victor Marmol 6f6485909e Merge pull request #5598 from wojtek-t/kubelet_http_read_pod
Kubelet read pods from http
2015-03-19 11:49:28 -07:00
Tim Hockin 9bc2b0c2db Merge pull request #4601 from calfonso/nfs_mount_plugin
NFSMount storage plugin for kubelet.
2015-03-19 11:19:12 -07:00
Victor Marmol 84ee72d4a7 Merge pull request #5631 from dchen1107/podstatus
Remove PodIP from ContainerStatus
2015-03-19 11:03:10 -07:00
Wojciech Tyczynski c512c549a1 Kubelet http read both ContainerManifest and Pod 2015-03-19 18:57:00 +01:00
Dawn Chen 4910be6dcb Remove PodIP from ContainerStatus 2015-03-19 10:42:01 -07:00
Chris Alfonso 1a45e37d17 NFSMount storage plugin for kubelet.
* If you want to test this out when an actual NFS export a good place
 to start is by running the NFS server in a container:

docker run -d --name nfs --privileged cpuguy83/nfs-server /tmp

More detail can be found here:
https://github.com/cpuguy83/docker-nfs-server
2015-03-19 13:37:38 -04:00
CJ Cullen 2e7356bca7 Merge pull request #5534 from bprashanth/generic_storage_interface
Add a GenericRESTStorage interface
2015-03-19 09:35:06 -07:00
CJ Cullen 80914498e4 Merge pull request #5610 from jlowdermilk/kubectl-flags
Declare kubectl validate flag once
2015-03-19 09:26:10 -07:00
Filip Grzadkowski f89f91b7bd Validate that there is at least one container in the pod 2015-03-19 12:31:53 +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
gmarek cbf57ee324 Merge pull request #5588 from hurf/master
Fix comments on caculating scores.
2015-03-19 07:44:11 +01:00
Yu-Ju Hong 187cbcfabf Merge pull request #5627 from vmarmol/fix-test
Fix data race in imageManager test.
2015-03-18 18:24:18 -07:00
Yu-Ju Hong 05c61d2e47 Merge pull request #5622 from vmarmol/http
Add SelfLink to Kubelet http source.
2015-03-18 18:09:05 -07:00
Victor Marmol 6db6e41a34 Merge pull request #5632 from yujuhong/manifest
kubelet/config/http_test: use versioned ContainerManifest
2015-03-18 17:58:19 -07:00
Yu-Ju Hong 7b71780dfc kubelet/config/http_test: use versioned ContainerManifest 2015-03-18 17:40:40 -07:00
Dawn Chen 52e1ee9d5b Merge pull request #5619 from vmarmol/rate
Spread out pod status updates to apiserver.
2015-03-18 17:26:02 -07:00
Victor Marmol 3a3b950009 Fix data race in imageManager test.
The background monitoring thread was using the DockerClient before we
had written our fake data. This commit stops the background thread from
running during tests.

Fixes #5611.
2015-03-18 17:02:03 -07:00
Victor Marmol ce96182cc3 Add SelfLink to Kubelet http source. 2015-03-18 16:38:41 -07:00
Prashanth Balasubramanian 960e16c397 Embed etcdgeneric in RESTStorage for pods 2015-03-18 16:31:33 -07:00
Brian Grant 11f9733599 Merge pull request #5587 from nikhiljindal/enable3
Updating integration tests to test both API versions - v1beta1 and 3
2015-03-18 16:14:20 -07:00
Victor Marmol cda4b6c598 Spread out pod status updates to apiserver.
Lowers pod status interval to every 2m and spreads updates within that
time window.
2015-03-18 15:43:07 -07:00
nikhiljindal 7e36bbab3c Updating integration tests to test both API versions - v1beta1 and 3 2015-03-18 15:24:11 -07:00
Clayton Coleman d516a86633 Use UTC when marshalling times and Local when unmarshalling
Marshal to UTC and read into Local, which means clients automatically
show local time and stored values are always consistent.
2015-03-18 17:44:35 -04:00
Yifan Gu 027f6854d0 kubelet: Remove docker container in prober's interface
Also change
kubelet.docketIDToRef[dockertools.DockerID]*api.ObjectReference{} to
kubelet.containerIDToRef[string]*api.ObjectReference{}.
2015-03-18 14:28:27 -07:00
Jeff Lowdermilk 39211af25e Declare kubectl validate flag once 2015-03-18 14:00:19 -07:00
Yu-Ju Hong 6e8a8b741a Kubelet: simplify the lock acquring pattern
Avoid holding both podStatusesLock and podLock at the same time.
2015-03-18 11:45:29 -07:00
CJ Cullen c34200824c Merge pull request #5584 from brendandburns/err
start normalizing error handling in watch.
2015-03-18 10:49:34 -07:00
Jeff Lowdermilk 72699606a9 Merge pull request #5541 from deads2k/deads-expose-resolve-local-paths
allow any number of kubeconfig files
2015-03-18 10:46:47 -07:00
Victor Marmol 9586b39bb7 Merge pull request #5555 from fgrzadkowski/sync_pod_status
Periodically update pod status from kubelet.
2015-03-18 10:14:07 -07:00
Jeff Lowdermilk e92067d102 Merge pull request #5481 from TamerTas/issue#4470
Remove cmd from kubectl/cmd/factory
2015-03-18 10:03:25 -07:00
Dawn Chen f746123438 Merge pull request #5580 from ncdc/docker-ParseRepositoryTag
Use docker's ParseRepositoryTag when pulling
2015-03-18 08:55:56 -07:00
Dawn Chen 9e781bc57d Merge pull request #5569 from vmarmol/image-gc
Garbage collecting images in the Kubelet.
2015-03-18 08:55:08 -07:00
Tamer Tas b39e31d8a3 Remove cmd from kubectl/cmd/factory 2015-03-18 14:23:14 +02:00
Filip Grzadkowski 1a352b74ba Periodically update pod status from kubelet. 2015-03-18 12:11:39 +01:00
gmarek a3b137ce8e Cleanup of validation.go 2015-03-18 08:59:35 +01:00
Brendan Burns 6d763dce2b start normalizing error handling in watch. 2015-03-17 21:04:55 -07:00
Victor Marmol d78ecf820e Garbage collecting images in the Kubelet.
Integrated the imageManager into the Kubelet and applies the garbage
collection policy every 5 minutes. The default policy allows up to 90%
disk usage, after which images are garbage collected to bring limit back
down to 80%.

Fixes #157.
2015-03-17 17:56:02 -07:00
Jeff Lowdermilk faab509a23 Merge pull request #5543 from you-n-g/master
add get available versions commmand
2015-03-17 17:34:33 -07:00
Andy Goldstein 7b07960758 Use docker's ParseRepositoryTag when pulling 2015-03-17 20:15:13 -04:00
Tim Hockin 7e42fc86fd Merge pull request #5573 from brendandburns/err
Set the emptyNameError to be a bad request.  Always return a JSON error.
2015-03-17 16:43:22 -07:00
Brendan Burns 4725ecac3f Set the emptyNameError to be a bad request. Always return a JSON error. 2015-03-17 16:17:14 -07:00
Yu-Ju Hong b84de4e986 Merge pull request #5571 from vmarmol/fix
Adding errors to Kubelet events.
2015-03-17 16:14:58 -07:00
Dawn Chen cbe4a1a679 Merge pull request #5510 from vmarmol/gc
Introduce and implement container GC policy
2015-03-17 16:02:17 -07:00
Victor Marmol 0c664a343c Adding errors to Kubelet events.
This will help while debugging issues that generate events.

Also removed unecessary log line.
2015-03-17 15:55:25 -07:00
Zach Loafman 5496686f33 Revert "Use docker's ParseRepositoryTag when pulling" 2015-03-17 15:16:33 -07:00
Salvatore Dario Minonne 31ddefc347 Finalize fields.Selector 2015-03-17 22:55:43 +01:00
Dawn Chen 2a5610dbcb Merge pull request #5558 from ncdc/docker-ParseRepositoryTag
Use docker's ParseRepositoryTag when pulling
2015-03-17 12:56:22 -07:00
Victor Marmol d1ed571e28 Use containerGC in the Kubelet.
New policy default is 100 containers max.

Fixes #5457.
2015-03-17 10:50:32 -07:00
Victor Marmol 4c17c09a8f Separate GC policy into containerGC struct.
The policy today takes a min GC age, max dead containers per pod, and
max containers overall. When GC is called, only dead containers created
more than min GC age ago are considered. The policy tries to keep one
dead instance of every pod's containers.
2015-03-17 10:50:06 -07:00
Dawn Chen 5a04bf6316 Merge pull request #5512 from vmarmol/igc
Introduce and implement image GC policy
2015-03-17 10:36:22 -07:00
Victor Marmol 6b9b2a5ef1 Merge pull request #5401 from yujuhong/syncstatic
Sync static pods from Kubelet to the API server
2015-03-17 10:36:05 -07:00
Andy Goldstein c08f41c18b Use docker's ParseRepositoryTag when pulling 2015-03-17 13:23:17 -04:00
fabioy 401451c510 Add "--labels" option to the "expose" kubectl command. 2015-03-17 09:47:57 -07:00
Victor Marmol 6bcbf12a3d Add image garbage collection policy to imageManager. 2015-03-17 09:19:04 -07:00
Victor Marmol 303a1f7ea1 Adding cAdvisor API to get image usage information. 2015-03-17 09:17:38 -07:00
Tim Hockin 879a39bcc4 Merge pull request #5192 from quinton-hoole/2015-03-06-service-namespace-clash
Fix service namespace clash
2015-03-17 09:10:50 -07: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
Victor Marmol 668e2dbcd8 Merge pull request #5502 from wojtek-t/completely_remove_bound_pods
Remove BoundPod type from source code
2015-03-17 08:09:50 -07:00
Brendan Burns 5fb18c6f33 Merge pull request #5101 from justinsb/aws_getnoderesources
Add support for GetNodeResources to AWS
2015-03-17 07:30:34 -07:00
Brendan Burns b2ed6b3255 Merge pull request #3171 from anguslees/openstack-provider
OpenStack updates
2015-03-17 07:30:08 -07:00
Young 97b647207e add get available versions commmand 2015-03-17 13:51:18 +00:00
Filip Grzadkowski 18b728ff44 Revert "Periodically update pod status from kubelet." 2015-03-17 13:51:45 +01:00
deads2k 8555ed3ede allow any number of kubeconfig files 2015-03-17 08:49:34 -04:00
Wojciech Tyczynski e6d188fca8 Remove BoundPod structure 2015-03-17 10:27:41 +01:00
Quinton Hoole cc72eaec3a Fix services namespace clash.
Serve identically names services in different namespaces on different external IP addresses.
2015-03-16 18:19:19 -07:00
Victor Marmol c04ceec27f Merge pull request #5531 from GoogleCloudPlatform/rel-0.13
Release 0.13.0
2015-03-16 17:06:57 -07:00