Commit Graph

113 Commits (11b9b309d3e6ebccc1ff58a95bd030c7c88e88e9)

Author SHA1 Message Date
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
Tim Hockin 4ff2865cd1 Make kubelet's file source go through conversion
See comments for details.  Same problem exists in HTTP source, but I want to
float this for review first.
2015-01-22 13:10:59 -08:00
Tim Hockin ffb2b62726 Merge pull request #3725 from dchen1107/cleanup
Generate pod.Name when pod.Name == "" for both HTTP and file sources.
2015-01-22 13:10:27 -08:00
Dawn Chen ec77507915 Generate pod.Name when pod.Name == "" for both HTTP and file sources.
Fix #3584
2015-01-22 12:53:30 -08:00
Tim Hockin 30219f8dfa Merge pull request #3664 from thockin/pull-if
Pull if
2015-01-21 13:05:28 -08:00
Tim Hockin 81343aac63 Change PullPolicy constants to match 2015-01-21 12:48:56 -08:00
Tim Hockin 819803b79f Make VolumeSource not be a pointer
There's no reason for it to be a pointer.
2015-01-20 17:54:04 -08:00
Brian Grant dd45246150 Merge pull request #3587 from dchen1107/image
Clean up Kubernetes PullPolicy
2015-01-20 17:18:26 -08:00
Tim Hockin 60ec08db93 Rename HostDir to HostPath in v1beta3 2015-01-20 15:56:44 -08:00
Dawn Chen aec4594a8d Introduce validatePullPolicyWithDefault to validation. 2015-01-20 11:54:22 -08:00
Daniel Smith 46f8a56dba Merge pull request #3376 from erictune/channel_api
Kublet watches Pods.
2015-01-15 14:48:12 -08:00
Eric Tune 2e002b1095 Add second pod to test. 2015-01-15 13:36:49 -08:00
saadali b57cc6a11c Increase timeout for TestEtcdSourceExistingBoundPods test 2015-01-14 17:06:04 -08:00
Daniel Smith 46827720b3 Merge pull request #3493 from saad-ali/testFor3467
Add test case for EtcdSource ExistingBoundPods
2015-01-14 16:35:26 -08:00
saadali a1c287ede9 Add test case for EtcdSource ExistingBoundPods 2015-01-14 16:15:08 -08:00
Tim Hockin 1be3de895c Move util.UID to pkg/types 2015-01-14 15:22:21 -08:00
Daniel Smith c13ae34b02 Merge pull request #3445 from saad-ali/fix3172
Remove CONDITION from event object completely
2015-01-14 15:03:06 -08:00
Daniel Smith 8a764c02d5 Merge pull request #3478 from thockin/uid_type
Use a strong type for UID fields
2015-01-14 14:20:22 -08:00
saadali 90dfdcecd5 Remove CONDITION from event object completely
# *** ERROR: *** Some files have not been gofmt'd.  To fix these
# errors, run gofmt -s -w <file>, or cut and paste the following:
#   gofmt -s -w pkg/kubecfg/resource_printer.go pkg/proxy/config/config.go pkg/runtime/types.go
#
# Your commit will be aborted unless you override this warning. To
# commit in spite of these format errors, delete the following line:
#   COMMIT_BLOCKED_ON_GOFMT
2015-01-14 14:17:16 -08:00
Dawn Chen 009c5e1129 Using ExtractObj instead of ExtractToList since BoundPods is not a List type 2015-01-14 14:05:47 -08:00
Tim Hockin e86d4cd3c6 Use a strong type for UID fields 2015-01-14 13:53:43 -08:00