Commit Graph

3399 Commits (7358084fd5bb9c4eaab537f745a55912b5352412)

Author SHA1 Message Date
Victor Marmol ab3c9de34b Refactoring cAdvisor interface into a package.
This will make it easier to start running the real cAdvisor alongside
Kubelet. This change is primarily no-op refactoring. The main behavioral
change is that we always create a cAdvisor interface and expect it to
always be available. When we make a request, if cAdvisor is not
connected the request fails with a connection error. This failure is
handled today as well.
2015-03-09 11:19:05 -07:00
Alex Mohr d98485242e Merge pull request #4780 from jdef/bug_4757
add unit test for #4757
2015-03-09 11:13:53 -07:00
Rohit Jnagal 8798b0ae14 Merge pull request #5158 from thockin/use_fuzz_no_custom
Use new gofuzz features
2015-03-09 10:13:46 -07:00
Rohit Jnagal 77546692a7 Merge pull request #5187 from vmarmol/wait-docker
Kubelet: wait up to 5m for Docker to come up.
2015-03-09 10:09:09 -07:00
Victor Marmol ca84aae454 Kubelet: wait up to 5m for Docker to come up.
The Kubelet assumes Docker is running during its execution and on
machine boot it is a race between Docker coming up and Kubelet calling
Docker. This PR waits for Docker to be up before the Kubelet begins
doing useful work. On timeout, Kubelet exits and expects to be
restarted.
2015-03-09 09:50:34 -07:00
Clayton Coleman d016f478e0 Ignore changes to creation timestamp from clients on update
CreationTimestamp is not an authoritative field (like UID) so mismatches
can be safely ignored.
2015-03-09 12:04:35 -04:00
James DeFelice bf02d17244 rebased to master 2015-03-09 14:08:11 +00:00
James DeFelice 4943fe937b implemented nil err checks, cc @yujuhong @davidopp 2015-03-09 14:06:27 +00:00
James DeFelice e5350d61a8 added comment suggested by @davidopp 2015-03-09 14:06:27 +00:00
James DeFelice 436790ccd1 add unit test for #4757
fixed compilation error
2015-03-09 14:06:27 +00: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
Brendan Burns 7c654a3d1b Expand test coverage in master, kubectl/cmd/util, pkg/registry/resourcequota, and api/rest. 2015-03-07 15:24:39 -08:00
Brendan Burns f505a33998 Differentiate between server error messages and client error messages in kubectl 2015-03-07 11:39:23 +01:00
Tim Hockin fd1e49ce2f Use new gofuzz features 2015-03-07 00:04:14 -08:00
Vish Kannan 53ec66caf4 Merge pull request #5152 from vmarmol/cadvisor-dep
Rename cAdvisor info API to cadvisorApi
2015-03-06 18:09:28 -08:00
Victor Marmol 1866adddd3 Merge pull request #5157 from yifan-gu/clean_prober
Adjust prober's logging verbose.
2015-03-06 18:04:12 -08:00
Yifan Gu da5d7c7814 Adjust prober's logging. 2015-03-06 17:30:29 -08:00
Victor Marmol 798513844c Merge pull request #5148 from yifan-gu/clean_prober
Refactor pkg/kubelet/kubelet.go: probeContainer().
2015-03-06 17:04:57 -08:00
Yifan Gu 276fb1731c Refactor pkg/kubelet/kubelet.go: probeContainer().
Put the retry loop in probe.go into a function.
2015-03-06 16:57:20 -08:00
Yifan Gu 131e8a0e35 Refactor pkg/kubelet/kubelet.go: probeContainer().
Update the probe_test.go.
2015-03-06 16:38:09 -08:00
Yifan Gu 09af0cd3b5 Refactor pkg/kubelet/kubelet.go: probeContainer().
Split the function into probeContainerLiveness() and probeContainerReadiness().
2015-03-06 16:37:58 -08:00
Abhishek Gupta baa61fa157 Adding test cases for namespace checks 2015-03-06 16:31:15 -08:00
Abhishek Gupta 5ce4558955 Using only pods within the namespace for spreading logic 2015-03-06 16:31:15 -08:00
Victor Marmol 43b469bd9f Rename cAdvisor info API to cadvisorApi 2015-03-06 16:06:38 -08:00
Dawn Chen 9439c0f3bd Merge pull request #5103 from yujuhong/naming
kubelet: revamp the pod/container naming scheme
2015-03-06 15:58:58 -08:00
Vish Kannan 9e5c79a587 Merge pull request #5151 from vmarmol/cadvisor-dep
Update cAdvisor godep
2015-03-06 15:56:48 -08:00
Vishnu Kannan 28aef4ba53 Add json description to v1beta3 API. 2015-03-06 23:53:35 +00:00
Victor Marmol a35f4374c5 Update cAdvisor ContainerInfo references to v1 API.
The cAdvisor data structures were versioned recently. We use the v1
versions so this commit makes that explicit.
2015-03-06 15:42:06 -08:00
Daniel Smith 05ea93f985 Merge pull request #5147 from a-robinson/func
Re-add the defer statements around the monitor() calls in the apiserver.
2015-03-06 15:31:45 -08:00
Alex Robinson 60f0e9d673 Fix the broken calls to the monitor() by having it take arguments as pointers.
This is needed for the changes to various labels from later in the function
to be picked up.
2015-03-06 23:16:44 +00:00
Brian Grant a858c7423e Merge pull request #5070 from vishh/issue_3628
Adding description to some of the v1beta3 objects.
2015-03-06 14:49:11 -08:00
Brian Grant f557837d43 Merge pull request #5066 from vmarmol/man
Adding links to relevant docs from API types.
2015-03-06 14:46:43 -08:00
Eric Tune c12303eaa3 Merge pull request #4749 from derekwaynecarr/make_quota_more_efficient
Make admission control plug-ins work from indexes
2015-03-06 14:11:12 -08:00
Vishnu Kannan bd83093b0b Adding description to some of the v1beta3 objects. 2015-03-06 21:50:50 +00:00
Eric Tune b259640a5f Merge pull request #5072 from justinsb/fix_aws_test
Fix the logic around the AWS instance test
2015-03-06 13:49:41 -08: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
Deyuan Deng 50de1a80c2 kubelet should take a client interface 2015-03-06 15:01:55 -05:00
Dawn Chen 2d0743b143 Merge pull request #5019 from yujuhong/reject_pods
kubelet: reject pods on host port conflict
2015-03-06 11:42:04 -08:00
Dawn Chen 3835e0e6e6 Merge pull request #4943 from vmarmol/image-manager
Implementing ImageManager to take over image lifecycle.
2015-03-06 11:09:38 -08:00
Victor Marmol 3ae717be97 Merge pull request #5094 from gmarek/client4
Refactor Kubelets syncPod function by wrapping some functionalities into separate functions
2015-03-06 10:58:05 -08:00
Victor Marmol 4f3f073f3c Implementing ImageManager to take over image lifecycle.
All images are tracked, when they were created and when they were last
used. FreeSpace() evicts these images in least recently used order,
breaking ties with oldest first.
2015-03-06 10:48:28 -08:00
Yu-Ju Hong 3ccdb8db98 kubelet: reject pods on host port conflict
When a host port conflict is detected, kubelet should set the pod status to
fail. The failed status will then be polled by other components at a later time,
which allows replication controller to create a new pod if necessary.

To achieve this, this change stores the pod status information in a status map
upon the detecton of port conflict. GetPodStatus() consults this status map
before attempting to query docker. The entries in the status map will be removed
when the pod is no longer associated with the node.
2015-03-06 10:46:49 -08:00
Deyuan Deng 3c460831ca Use FormatInt instead of string for external id. 2015-03-06 13:45:52 -05:00
Daniel Smith 244766ac89 Merge pull request #5002 from satnam6502/proxy-200
Do not fail status 200 responses to proxy calls
2015-03-06 10:20:07 -08:00
Daniel Smith b0f49449e1 Merge pull request #4985 from thockin/gofuzz
Update gofuzz dep
2015-03-06 10:19:01 -08:00
gmarek 4a01a4dbf5 Refactor Kubelets syncPod function by wrapping some functionalities into functions 2015-03-06 18:32:11 +01:00
Tim Hockin ca265c5705 Merge pull request #4898 from gmarek/client2
Loosen label and annotation validation and related tests
2015-03-06 09:14:24 -08:00
Tim Hockin 788d9994a1 Merge pull request #5132 from pmorie/mount-refactor
Fix mount refactor nits
2015-03-06 09:00:01 -08:00
Paul Morie 17b51a93a3 Fix mount refactor nits 2015-03-06 11:46:07 -05:00
Tim Hockin f9e2df3a10 Define semantic equal for time 2015-03-06 08:21:39 -08:00
Tim Hockin 0b38282b9b Fuzz util.Time with no nsec because JSON 2015-03-06 08:21:10 -08:00
Tim Hockin b3304c49ad Use deep spew in serialization test & go obj diff 2015-03-06 08:21:10 -08:00
Brendan Burns 5b6a78fc77 Place external load balancers in a namespace, and add a test to validate the behavior. 2015-03-06 17:16:27 +01:00
Brendan Burns 2700871b04 Merge pull request #5013 from smarterclayton/misc_fixup
Small cleanups to a number of client behaviors
2015-03-06 15:41:34 +01:00
Brendan Burns de669b5435 Merge pull request #5058 from bprashanth/resourceVersion_doc
Clarify resourceVersion documentation
2015-03-06 15:41:12 +01:00
Brendan Burns 2263d86a7b Merge pull request #5073 from yujuhong/immutable
v1beta1/v1beta2: fields that cannot be updated are marked immutable
2015-03-06 15:40:43 +01:00
derekwaynecarr 2ed8eed004 Make admission control plug-ins work from indexes 2015-03-06 09:36:57 -05:00
Brendan Burns d4755704b1 Merge pull request #5104 from liggitt/secure_kubelet
Plumb tls and cert options into kubelet start
2015-03-06 15:32:23 +01:00
Brendan Burns 784dd82880 Merge pull request #5117 from lavalamp/fix4
Make unexported fields panic (informatively) instead of silently passing
2015-03-06 15:21:54 +01:00
gmarek 26b7fbeedf apply comments 2015-03-06 13:21:40 +01:00
Satnam Singh cb4c931b0b Do not fail status 200 responses to proxy calls 2015-03-06 00:29:19 -08:00
gmarek bb8a4f5ed3 apply comments 2015-03-06 08:23:22 +01:00
gmarek 726a5af075 Loosen label and annotation validation and related tests 2015-03-06 08:23:22 +01:00
Mike Danese 438052c453 fix variable shadowing bug in etcd_tools.go 2015-03-05 22:34:28 -08:00
Dawn Chen 54b2b47caa Merge pull request #4756 from vishh/kubelet
Relax constraints on container status while fetching container logs
2015-03-05 21:49:48 -08:00
Daniel Smith 3ef3777192 Make unexported fields panic (informatively)
...Also fix some incorrect calls to semantic.DeepEqual, and a bug where
it returned true incorrectly.
2015-03-05 21:40:37 -08:00
Prashanth Balasubramanian 1ed3f7ffcd Clarify documentation around resourceVersion 2015-03-05 20:57:22 -08:00
Yu-Ju Hong 823ea36cb1 v1beta1/v1beta2: fields that cannot be updated are marked "cannot be udpated" 2015-03-05 18:05:13 -08:00
Victor Marmol 79f2773745 Merge pull request #5120 from dchen1107/docker
monit health check kubelet and restart unhealthy one
2015-03-05 17:39:03 -08:00
Dawn Chen 7a47ea8913 Ask monit health check kubelet; if failed, restart. 2015-03-05 17:29:38 -08:00
Dawn Chen 43b4f41202 Allow /healthz check from localhost 2015-03-05 17:27:56 -08:00
Victor Marmol b314dc6025 Merge pull request #5032 from yifan-gu/clean_syncPod
Refactor pkg/kubelet/kubelet.go: syncPod().
2015-03-05 17:24:20 -08:00
Yifan Gu ed1823e276 Refactor pkg/kubelet/kubelet.go: syncPod().
Makes the syncPod() takes only the containers that belongs to the pod.
2015-03-05 16:40:50 -08:00
Justin Santa Barbara bf031fb082 Don't allow duplicate values in NodeAddresses 2015-03-05 16:40:28 -08:00
Victor Marmol 33e6c3ebb3 DockerCache doesn't get containers at startup.
Fixes #5092.
2015-03-05 16:25:13 -08:00
Vishnu Kannan f6910803a9 Relax constraints on container status while fetching container logs 2015-03-06 00:19:52 +00:00
Satnam Singh 61e38920a5 Do not fail status 200 responses to proxy calls 2015-03-05 16:19:13 -08:00
Salvatore Dario Minonne 75f2efb500 moving ParseSelector to Parse for labels only. 2015-03-05 22:39:36 +01:00
Jordan Liggitt 02622b1401 Plumb tls and cert options into kubelet start 2015-03-05 16:30:52 -05:00
Brian Grant 4624d116f3 Merge pull request #5061 from thockin/docs1
Better docs for Services and public IPs.
2015-03-05 11:52:38 -08:00
Daniel Smith 6453bf3e61 Merge pull request #4974 from pmorie/record-sources
Allow multiple sources to be used with record package
2015-03-05 11:51:08 -08:00
Paul Morie 02b18edac6 Allow multiple sources to be used with record package 2015-03-05 13:54:29 -05:00
Paul Morie 8ef04a8425 Factor mount utility code out gce_pd volume plugin 2015-03-05 13:49:32 -05:00
Brian Grant 9fcb48cab6 Merge pull request #4434 from ddysher/node-hostip
Node addresses
2015-03-05 10:33:15 -08:00
Brian Grant 58a9045f75 Merge pull request #5081 from vmarmol/put
Specified that PUT is a replace and not an update.
2015-03-05 10:32:55 -08:00
Clayton Coleman 2c286fea4c Merge pull request #4803 from derekwaynecarr/ignore_terminated_pods
Filter irrelevant pods from quota
2015-03-05 12:41:57 -05:00
Tim Hockin a1dd6a92bb Merge pull request #4801 from brendandburns/default_port
Clean up "default" service port handling.
2015-03-05 09:01:19 -08:00
derekwaynecarr 21031e37c7 Filter irrelevant pods from quota 2015-03-05 10:18:19 -05:00
Justin Santa Barbara e25c9f8644 Fix the logic around the AWS instance test
We test that when we get instances with the same name that we get an error
2015-03-05 09:31:47 -05:00
Justin Santa Barbara cc81742e40 Implement EC2 filter in tests 2015-03-05 09:06:29 -05:00
Tim Hockin af37dc0e16 Better docs for Services and public IPs.
Fixes #2738
2015-03-04 22:13:57 -08:00
Daniel Smith 6bd842676d Merge pull request #5076 from satnam6502/redirect
Fix implementation of REDIRECT
2015-03-04 17:53:41 -08:00
Daniel Smith feb98caac2 Merge pull request #5075 from thockin/fix_inline
Fix VolumeSource inline in JSON
2015-03-04 17:24:06 -08:00
Victor Marmol 5d919d6935 Specified that PUT is a replace and not an update.
Fixes #3112.
2015-03-04 17:02:42 -08:00
roberthbailey dff0bd1cbf Merge pull request #5056 from justinsb/ignore_regex_quotes
Strip single-quotes around regex for AWS
2015-03-04 16:42:23 -08:00
Satnam Singh 123ca7de53 Specify HTTP for REDIRECT 2015-03-04 16:37:15 -08:00
Tim Hockin 4cb46825f2 Fix VolumeSource inline in JSON 2015-03-04 15:53:32 -08:00
Victor Marmol c422213f54 Adding links to relevant docs from API types.
Partially addresses #3606.
2015-03-04 15:12:09 -08:00
Daniel Smith 4e7bccab02 Merge pull request #4991 from fabioy/etcdcheck-fix
Fix the etcd version check and have it return the version string.
2015-03-04 14:55:49 -08:00