Commit Graph

285 Commits (98e6d2c1e552120f20d7d726c5779ecfcb7145e5)

Author SHA1 Message Date
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Yu-Ju Hong 2816c9df78 config_test: clean up unused function arguements 2015-09-11 17:18:29 -07:00
Yu-Ju Hong 69c3aa0872 Fix source annotation in kubelet
kubelet relies on source annotation to distinguish pods from different sources.
It should always annotate the source when receiving the pod to avoid any
confusion. This commit fixes that and also make sure we don't overwrite the
first seen time.
2015-09-11 14:52:16 -07: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
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
k8s-merge-robot 2e2def36a9 Merge pull request #13581 from caesarxuchao/APIGroup-testapi-2
Auto commit by PR queue bot
2015-09-04 20:38:45 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Pedro Roque Marques bf170a688c Update annotations in the kubelet.
When the pod annotations are updated in the apiserver, update the pod.
Annotations may be used to convey attributes that are required to the
pod execution, such as networking parameters.
2015-08-28 15:50:13 -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
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
Clayton Coleman 02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -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
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Clayton Coleman b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
jiangyaoguo 9ab4a46b9d Keep event reason in kubelet consistent with others 2015-08-12 19:00:09 +08:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Alex Robinson a9f0c4683f Limit the logging from kubelet attempting to read its manifest URL.
Without this, it logs an error every 20 seconds if nothing is at the
provided URL.
2015-07-30 17:47:33 +00:00
Alex Robinson cf011cad55 Support passing a header to the manifest URL in the kubelet.
Needed to support using GCE's v1 metadata API, which requires passing
the header "Metadata-Flavor: Google".
2015-07-30 17:11:27 +00:00
nikhiljindal fc4da6844e removing references to pre v1beta3 apis 2015-07-08 13:51:43 -07:00
Zach Loafman 9363285b4a Merge pull request #10320 from yujuhong/kubelet_logging
Kubelet: add and modify some logging messsages
2015-07-01 14:16:23 -07:00
Yu-Ju Hong f7fd7e9687 Kubelet: add and modify some logging messsages
This helps debug #6651
2015-06-24 16:29:19 -07:00
Kris Rousey d13421e084 Removing ContainerManifest 2015-06-24 11:31:34 -07:00
Yu-Ju Hong f96a8d0935 Kubelet: record the initial pod processing latency
Add a new latency metric for the time from seeing the pod for the first time
to starting a pod worker for it.

Also, change PodStartLatency to include this initial processing latency.
2015-06-19 12:07:55 -07:00
Justin Santa Barbara dee8d4b90b For kubelet, differentiate between the nodeName and the hostname
This will allow us to use a nodeName that is not the hostname,
for example on clouds where the hostname is not the natural identifier
for a node.
2015-06-18 12:40:01 -07:00
Satnam Singh e4f5529a2d Revert "Allow nodename to be != hostname, use AWS instance ID on AWS" 2015-06-18 11:27:55 -07:00
Justin Santa Barbara c28cdfbd43 For kubelet, differentiate between the nodeName and the hostname
This will allow us to use a nodeName that is not the hostname,
for example on clouds where the hostname is not the natural identifier
for a node.
2015-06-17 00:40:43 -04:00
Chao Xu b093af57ba cleanse common_test.go of v1beta1 2015-06-16 17:22:35 -07:00
Chao Xu ca72165b20 remove most references to api.PreV1Beta3 2015-06-03 20:09:03 -07:00
Chao Xu 97b29c7fe6 in pkg/kubelet/config/commont_test.go, remove check for v1beta1, add test cases for all registered version 2015-06-03 16:07:00 -07:00
Chao Xu d52cef11a4 add v1 tests to hack/test-go; let default value of Container.SecurityContext to be nil 2015-06-03 09:50:41 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 72ee028cab Gracefully delete pods from the Kubelet
This commit wires together the graceful delete option for pods
on the Kubelet.  When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default.  The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.

When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker.  When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04:00
Kris f4e2c738f6 Delete deprecated API versions
pkg/service:

There were a couple of references here just as a reminder to change the
behavior of findPort. As of v1beta3, TargetPort was always defaulted, so
we could remove findDefaultPort and related tests.

pkg/apiserver:

The tests were using versioned API codecs for some of their encoding
tests. Necessary API types had to be written and registered with the
fake versioned codecs.

pkg/kubectl:

Some tests were converted to current versions where it made sense.
2015-05-29 17:17:35 -07:00
Chao Xu 9c1153322e update PodSpec.Host to PodSpec.NodeName in /pkg/api/types.go and /pkg/api/v1beta3/types.go 2015-05-28 14:10:06 -07:00
Yu-Ju Hong 3f791db886 Kubelet: remove unused getHostFieldLabel function 2015-05-11 14:39:22 -07:00
Yu-Ju Hong ab5e0e0b5c Use the full hostname for mirror pod name.
This change appends the full hostname to the mirror pod name (instead of taking
the first token) so that if the hostname is overriden, we'd not be creating
unncessary name conflicts. An example would be that a user overrides the
hostnames to be "127.0.0.1" and "127.0.0.2", and both of them were resolved to
"127" for the mirror pod name suffix.

Also, because `uname -n` could return a FQDN or not, this change takes only
the first token of it as the hostname for consistency.
2015-05-07 12:59:49 -07:00
Zach Loafman 875e83a741 Revert "Revert "Security context - types, kubelet, admission"" 2015-05-05 16:02:13 -07:00
Zach Loafman f48904fd5e Revert "Security context - types, kubelet, admission" 2015-05-05 15:20:39 -07:00
Paul Weil 982bf19c20 security context initial implementation - squash 2015-05-05 13:46:13 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Brendan Burns 48d269e6ab Fix YAML parsing for v1beta3 objects in the kubelet for file/http 2015-04-29 11:38:36 -07:00
nikhiljindal dcc368c781 Removing more references to v1beta1 from pkg/ 2015-04-24 00:45:17 -07:00
Kris Rousey 81497f3ed2 Changing the scheduler package to use *api.Pod instead of api.Pod to
avoid unnecessary shallow copies. The change rippled through a lot of
code.
2015-04-17 13:34:31 -07:00
Yu-Ju Hong d7cf294c99 Kubelet: recreate mirror pod if the static pod changes
If a static pod changes, delete the corresponding mirror pod. When kubelet
could not see mirror pod from the API server update, it'd attemp to create a
new mirror pod with up-to-date specs.
2015-04-08 18:06:21 -07:00
Wojciech Tyczynski 8a5c76356c Revert "Stop the bleeding for #6059"
This reverts commit 6be09c5e97.
2015-04-08 13:29:29 +02:00
Daniel Smith c1390a0836 version field selector field names in the client 2015-04-07 16:59:57 -07:00
Daniel Smith 6be09c5e97 Stop the bleeding for #6059 2015-04-02 13:54:10 -07:00
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
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
saadali 826b61c76d Address nits from PR #3423 2015-01-13 23:34:37 -08:00
saadali 110ab6f1bd Split up kubelet "source seen" logic 2015-01-12 21:48:55 -08:00
Daniel Smith 55653568ae Merge pull request #3385 from erictune/source_api
Added kubelet config source from apiserver.
2015-01-12 15:47:15 -08:00
Eric Tune 18bcef5235 Added kubelet config source from apiserver. 2015-01-12 15:29:16 -08:00
Tim Hockin 905514a12b Ensure Namespace and UID are set in kubelet
Make all kubelet config sources ensure that UID and Namespace are defaulted, if
need be.

We can *almost* disable the "if blank" logic for UID, except for tests that
call APIs that do not run through SyncPods.  We really ought to be enforcing
invariants better.
2015-01-12 14:27:34 -08:00
saadali e1917cf900 Fix "Kubelet doesn't kill old pods when BoundPods is empty" issue 2015-01-12 12:39:47 -08:00
Daniel Smith 35f54addca Update more packages, tests, binaries for quantity
make etcd registry pass test
fix kubelet config for quantity
fix openstack for quantity
fix controller for quantity
fix last tests for quantity
wire into binaries
fix controller manager
fix build for 32 bit systems
2015-01-07 15:21:35 -08:00
Dawn Chen 2b91c1417c Create selfLink for pods from config files and indicate hostname as part of event source. 2015-01-06 16:08:20 -08:00
Tim Hockin 8b42534f77 Fix kubelet config tests 2015-01-06 13:02:41 -08:00
Tim Hockin 88fe5c6f46 Never set pod.Name in kubelet config code
I think it is time to tighten up input requirements.  The validation code will
reject a pod that has an empty name field.
2015-01-06 11:14:19 -08:00
Brendan Burns 7da0378f3c Track the sources that the kubelet has seen, and only delete pods
when every source has been seen at least once.
2014-12-17 13:08:43 -08:00
Sam Ghods 9a9a1e0939 Move from go-yaml/yaml to ghodss/yaml 2014-12-02 16:24:05 -08:00
Eric Tune 7d3e00c679 Remove never-needed return value.
Make some types private.
2014-11-21 15:11:45 -08:00
Tim Hockin ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
Dawn Chen 8ffbced280 Introduce terminationMessagePath to Container, and update conversion code
to assign the default path.

Move default setting for terminationMessagePath to conversion
from validation. Addressed other comments.
2014-11-10 10:55:56 -08:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Deyuan Deng acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Clayton Coleman 3f8d30881c Sort of pods in test case was incorrect 2014-10-20 17:45:01 -04:00
Tim Hockin 87b0b3ad67 Better config-file logging in kubelet 2014-10-20 08:49:55 -07:00
derekwaynecarr d590af2ce5 Fixup kubelet handlePodInfo to be namespace aware 2014-10-17 14:42:46 -04:00
Clayton Coleman 26cff8b9bf Rename the etcd path for pods to be /registry/nodes/<>/boundpods 2014-10-16 19:29:08 -04: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
Dawn Chen 33ef0ca159 Make watching error logging message less severe since it is expected.
Fix #1653
2014-10-14 16:42:28 -07:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Clayton Coleman 4e56dafecc Introduce some default log verbosity control
Move a lot of common error logging into better buckets:

glog.Errorf() - Always an error
glog.Warningf() - Something unexpected, but probably not an error
glog.V(0) - Generally useful for this to ALWAYS be visible
            to an operator
            * Programmer errors
            * Logging extra info about a panic
            * CLI argument handling
glog.V(1) - A reasonable default log level if you don't want
            verbosity
            * Information about config (listening on X, watching Y)
            * Errors that repeat frequently that relate to conditions
              that can be corrected (pod detected as unhealthy)
glog.V(2) - Useful steady state information about the service
            * Logging HTTP requests and their exit code
            * System state changing (killing pod)
            * Controller state change events (starting pods)
            * Scheduler log messages
glog.V(3) - Extended information about changes
            * More info about system state changes
glog.V(4) - Debug level verbosity (for now)
            * Logging in particularly thorny parts of code where
              you may want to come back later and check it
2014-09-25 16:30:14 -04:00
Daniel Smith bb0cd95a83 fix non-gofmt'd things 2014-09-24 14:27:10 -07:00