Commit Graph

133 Commits (903fb42a361c1f1b1d069313e39bfbf2dedd0dce)

Author SHA1 Message Date
saadali e0f71cb21f Make each new instance of kubelet generate a new event channel (instead of reusing existing). 2015-03-30 14:22:16 -07:00
Yu-Ju Hong 793a3c0c63 Use the first token of hostname for generating static pod names
This increases the readability of pods by avoiding long names.

This fixes #5936
2015-03-26 16:12:49 -07:00
Yu-Ju Hong 4e909c6cee Kubelet: no need to overwrite SelfLink for pods from the apiserver
Pods from the apiserver should already have SelfLink set. There is no need to
create one ourselves.
2015-03-25 16:34:02 -07:00
Yifan Gu 31bb11ac2a kubelet: Move pod name helpers to pkg/kubelet/container/runtime.go 2015-03-24 16:08:04 -07:00
Clayton Coleman d020ca00b8 Pass hostname to all kubelet config sources instead of os.Hostname()
Make applyDefaults be tied to the current config source.
2015-03-23 15:58:45 -04:00
Clayton Coleman b442f76961 Syntax errors in file_test were added right as validation became more strict 2015-03-23 14:43:09 -04:00
Victor Marmol 4e3c07543e Merge pull request #5784 from wojtek-t/applyDefaultsInTryDecode
Hide applyDefaults method under pkg/kubelet/config
2015-03-23 07:32:00 -07:00
Wojciech Tyczynski b395c40e19 Refactor pkg/kubelet/config 2015-03-23 10:29:46 +01:00
Clayton Coleman 65425f690c Move field errors to pkg/util/fielderrors
Allows pkg/api to take a reference to labels.Selector and fields.Selector
2015-03-22 17:43:34 -04: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
Wojciech Tyczynski 7a7e64331c Kubelet file read both ContainerManifest and Pod 2015-03-20 12:09:09 +01:00
Wojciech Tyczynski c5d8c391fb Refactor kubelet/config to share code 2015-03-20 09:40:52 +01: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
Wojciech Tyczynski c512c549a1 Kubelet http read both ContainerManifest and Pod 2015-03-19 18:57:00 +01:00
Filip Grzadkowski f89f91b7bd Validate that there is at least one container in the pod 2015-03-19 12:31:53 +01: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
Yu-Ju Hong 7b71780dfc kubelet/config/http_test: use versioned ContainerManifest 2015-03-18 17:40:40 -07:00
Victor Marmol ce96182cc3 Add SelfLink to Kubelet http source. 2015-03-18 16:38:41 -07:00
Filip Grzadkowski 1a352b74ba Periodically update pod status from kubelet. 2015-03-18 12:11:39 +01:00
Salvatore Dario Minonne 31ddefc347 Finalize fields.Selector 2015-03-17 22:55:43 +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
Filip Grzadkowski 18b728ff44 Revert "Periodically update pod status from kubelet." 2015-03-17 13:51:45 +01:00
Filip Grzadkowski 336525a27d Periodically update pod status from kubelet. 2015-03-16 23:03:03 +01:00
Victor Marmol bdc1981eb5 Merge pull request #5433 from wojtek-t/remove_bound_pods
Remove BoundPods from Kubelet
2015-03-16 13:38:24 -07:00
Wojciech Tyczynski 5d95e9e671 Remove BoundPods from Kubelet 2015-03-16 19:17:21 +01:00
Dawn Chen 34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Wojciech Tyczynski 9f2f10d6db Make scheduler to watch PodSpec.Host instead Status.Host 2015-03-12 13:38:58 +01:00
Eric Tune ac7bf05079 Kubelet has not even heard of etcd. 2015-03-11 16:29:31 -07:00
Paul Morie a486ab078f Fix selfLink issues in integration test 2015-03-10 14:40:16 -04:00
nikhiljindal 916ca9cc68 Changing v1beta3 field selectors to be camelCased 2015-03-09 18:01:01 -07:00
Clayton Coleman 0f87337667 Kubelet tests broken on Macs with uppercase names
Hostname behavior across operating systems is inconsistent (Macs can
have uppercase host names, so can some other systems).  In general,
always strings.ToLower(os.Hostname()).
2015-03-08 23:44:32 -04:00
Yu-Ju Hong fe70be9261 kubelet: revamp the pod/container naming scheme
There are two main goals for this change.

 1. Fix the naming scheme in kubelet so that it accepts DNS subdomain
    name/namespaces correctly (#4920). The design is discussed in #3453.

 2. Prepare for syncing the static pods back to the apiserver(#4090). This
    includes

  - Eliminate the source component in the internal full pod name (#4922). Pods
    no longer need sources as they will all be sync'd via apiserver.

  - Changing the naming scheme for the static (file-, http-, and etcd-based)
    pods such that they are distinguishable when syncing back to the apiserver.

The changes includes:
  *	name = <pod.Name>-<hostname>
  * namespace = <cluster_namespace> (i.e. "default" for now).
  * container_name = k8s_<contianer_name>.<hash_of_container>_<pod_name>_<namespace>_<uid>_<random>

Note that this is not backward-compatible, meaning the kubelet won't recognize
existing running containers using the old naming scheme.
2015-03-06 13:14:45 -08:00
Yu-Ju Hong 32fd331e73 Revert "Split up kubelet "source seen" logic"
We want to sync pods from file/http/etcd sources to the apiserver, hence
differentiating sources is no longer desired.

This reverts commit 110ab6f1bd.
2015-03-06 12:57:48 -08:00
Paul Morie 02b18edac6 Allow multiple sources to be used with record package 2015-03-05 13:54:29 -05:00
Tim Hockin fdea7252a4 Merge pull request #5001 from brendandburns/api3
Embed VolumeSource in v1beta3 and internal.
2015-03-04 09:50:14 -08:00
Brendan Burns fb90b56bf6 Embed VolumeSource in v1beta3 and internal. 2015-03-04 02:25:40 -08:00
Daniel Smith c4822dc060 Revert "Revert "Adding converter functions to convert field label selectors to internal version before matching""
This reverts commit 5f35a67002.
2015-03-02 15:00:09 -08:00
Zach Loafman 5f35a67002 Revert "Adding converter functions to convert field label selectors to internal version before matching" 2015-02-28 11:42:49 -08:00
Daniel Smith 554b1c847c add occasional polling to reflector 2015-02-27 16:59:14 -08:00
nikhiljindal 48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08:00
Tim Hockin 607b736a3f Rename volume source types to be consistent. 2015-02-23 12:39:57 -08:00
Wojciech Tyczynski 25c8f07c67 Batch updates of multiple Pods. 2015-02-18 16:46:16 +01:00
derekwaynecarr c0ce15c588 Make list watch take a ListFunc and WatchFunc, provide default funcs from client 2015-02-15 22:26:05 -05:00
Abhishek Shah febf8c9b2c Fixed formattting issues in etcd.go 2015-02-10 12:03:40 -08:00
Abhishek Shah f136886dde Updated logging. If etcd-pod-dir-fetch fails because dir was absent, an info message is logged. 2) For all other reasons, the regular error message is logged. 2015-02-09 18:03:58 -08:00
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08:00
Dan Mace 5ee943d683 Support namespacing in cache.Store implementations
Support namespacing in cache.Store by framing the interface functions
around interface{} and providing a key function to each Store implementation.

Implementation of a fix for #2294.
2015-01-29 17:39:49 -05:00
Dawn Chen b0bcee7b40 Increase timeout for all testcases in file_test.go 2015-01-28 11:27:15 -08:00
Tim Hockin d63162b7e7 Make kubelet's HTTP source go through conversion 2015-01-22 14:09:37 -08:00