Commit Graph

952 Commits (cf97063cfab93dfb4e06f0e6d27dcd053d845dd3)

Author SHA1 Message Date
Dawn Chen 34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Victor Marmol dc96ea6300 Run cAdvisor inside the Kubelet.
cAdvisor is started as a Kubelet dependency during startup of the
Kubelet before the sync loops start.
2015-03-13 16:06:02 -07:00
Victor Marmol b00e82ed93 Merge pull request #5466 from dchen1107/docker
Fix a regression introduced lately: When any given PodInfraContainer on ...
2015-03-13 16:04:01 -07:00
Satnam Singh ce7658a302 Merge pull request #5445 from vmarmol/unused
Remove unused handleUpdate() in Kubelet.
2015-03-13 16:00:17 -07:00
Dawn Chen 732d4cb2b9 Fix a regression introduced lately: When any given PodInfraContainer on a node
is killed, kubelet kills all remaining containers no matter which pod that
container belongs to.

Fixed #5373
2015-03-13 15:46:30 -07:00
Dawn Chen 0cc2b62b4a Merge pull request #5265 from ddysher/kubelet-post-status
kubelet post node status to master
2015-03-13 15:29:22 -07:00
Tim Hockin caca5e7358 Add tmpfs support to EmptyDir
# *** ERROR: *** docs are out of sync between cli and markdown
# run hack/run-gendocs.sh > docs/kubectl.md to regenerate

#
# Your commit will be aborted unless you regenerate docs.
    COMMIT_BLOCKED_ON_GENDOCS
2015-03-13 13:36:13 -07:00
Vish Kannan 13253d09e1 Merge pull request #5444 from vmarmol/lock
Lock access and update to Kubelet pods.
2015-03-13 11:06:50 -07:00
Victor Marmol 04233cdb88 Remove unused handleUpdate() in Kubelet. 2015-03-13 10:35:50 -07:00
Victor Marmol 0e485310cf Lock access and update to Kubelet pods. 2015-03-13 10:31:26 -07:00
gmarek 3489d1ae01 Refactor kubelet syncPod method 2015-03-13 18:22:42 +01:00
Victor Marmol 4675fcc57d Make ParseDockerName() return an error.
This forces callers to handle cases where the container name could not
be parsed.
2015-03-12 16:33:16 -07:00
Dawn Chen ee4e887183 Merge pull request #5395 from vmarmol/fix
Garbage collect unidentified Kubernetes containers.
2015-03-12 12:58:22 -07:00
Victor Marmol 51122998e3 Garbage collect unidentified Kubernetes containers.
These containers may be caused by a change in the Kubernetes naming
convention. The old containers are killed, the new ones started, but the
old ones are never GC'd. This change makes Kubelet GC all Kubernetes
containers, old and new.

Fixes #5372.
2015-03-12 11:40:35 -07:00
Brian Grant 19b6c85fa5 Merge pull request #5363 from wojtek-t/no_bound_pods_in_scheduler
Make scheduler to watch PodSpec.Host instead Status.Host
2015-03-12 10:57:03 -07:00
Victor Marmol 2939abb6cb Merge pull request #5383 from wojtek-t/kubelet_test
Speedup pkg/kubelet/runonce_test.go
2015-03-12 10:22:03 -07:00
Victor Marmol f9d2ab6e48 Use time.Sleep() instead of <-time.After(). 2015-03-12 09:25:09 -07:00
Wojciech Tyczynski dca3db0a50 Speedup pkg/kubelet/runonce_test.go 2015-03-12 17:12:04 +01:00
Timothy St. Clair 308bb84cf3 Minor cleanup for etcd cleaning from kubelet 2015-03-12 09:39:22 -05:00
Wojciech Tyczynski 9f2f10d6db Make scheduler to watch PodSpec.Host instead Status.Host 2015-03-12 13:38:58 +01:00
Eric Tune ae9bc28f8b Remove mentions of etcd in kubelet. 2015-03-11 16:40:20 -07:00
Eric Tune ac7bf05079 Kubelet has not even heard of etcd. 2015-03-11 16:29:31 -07:00
Brendan Burns b53b2e1de0 Add and extend timeouts. 2015-03-11 14:12:46 -07:00
Dawn Chen 88e0b04916 Merge pull request #5287 from ncdc/master
Remove debugging log message from ExecInContainer
2015-03-11 09:45:37 -07:00
Wojciech Tyczynski 0ffd607c79 PodWorkers test. 2015-03-11 16:58:22 +01:00
Wojciech Tyczynski 80576dfed3 Change PodWorkers to have desired cache. 2015-03-11 16:38:31 +01:00
Andy Goldstein 0c798bbe52 Remove debugging log message from ExecInContainer 2015-03-11 10:07:14 -04:00
Deyuan Deng 9982aaa960 kubelet post node status to master 2015-03-10 23:17:36 -04:00
Brian Grant 9aa744925e Merge pull request #5030 from simon3z/nodeinfo
Add support for fetching node collected information
2015-03-10 14:05:41 -07:00
Paul Morie a486ab078f Fix selfLink issues in integration test 2015-03-10 14:40:16 -04:00
markturansky c7e619d4a0 Change volume.NewBuild arg from podUID to ObjectReference 2015-03-10 14:40:16 -04:00
Brian Grant 186f17737e Merge pull request #5252 from erictune/remove_etcd_flags
Remove --etcd_servers flag from kubelet and proxy.
2015-03-10 11:06:12 -07:00
Dawn Chen 106e38ebb3 Merge pull request #5213 from yifan-gu/clean_syncPod
Refactor pkg/kubelet/kubelet.go: shouldContainerBeRestarted().
2015-03-10 09:44:32 -07:00
Brian Grant 6062e14313 Merge pull request #5220 from nikhiljindal/camelCaseFieldSelectors
Changing v1beta3 field selectors to be camelCased
2015-03-10 09:35:03 -07:00
Eric Tune 2ca265ae3b Remove --etcd_servers flag from kubelet and proxy.
All the distros that use this have been updated,
or have PRs out to update them, or owners
have been asked to fix RPMs.

Removing this prevents further use of this model.

Remove now dead code: EtcdClientOrDie

Remove now dead pkg/proxy/config/etcd.go.

Remove unused imports.
2015-03-10 09:29:09 -07:00
Federico Simoncelli 644d775bc1 kubelet: retport system info in node information
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-10 10:11:02 -04:00
Federico Simoncelli 1b18440f35 kubelet: add GetNodeInfo implementation
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-10 10:11:01 -04:00
Mike Danese c1b1f29bdc migrate healthz in pkg/kubelet/server.go to custom health checks 2015-03-09 19:26:07 -07:00
nikhiljindal 916ca9cc68 Changing v1beta3 field selectors to be camelCased 2015-03-09 18:01:01 -07:00
Yifan Gu 241ef34fba Refactor pkg/kubelet/kubelet.go: shouldContainerBeRestarted().
Simplify the function signature.
2015-03-09 17:42:57 -07:00
Victor Marmol e187be9fe1 Merge pull request #5143 from vmarmol/cadvisor-pkg
Refactoring Kubelet's cAdvisor interface into a package.
2015-03-09 11:36:03 -07:00
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
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 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
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
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
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
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 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
gmarek 4a01a4dbf5 Refactor Kubelets syncPod function by wrapping some functionalities into functions 2015-03-06 18:32:11 +01: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
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
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
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
Jordan Liggitt 02622b1401 Plumb tls and cert options into kubelet start 2015-03-05 16:30:52 -05: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
Tim Hockin fdea7252a4 Merge pull request #5001 from brendandburns/api3
Embed VolumeSource in v1beta3 and internal.
2015-03-04 09:50:14 -08:00
Eric Tune fd8361edf2 Merge pull request #5021 from justinsb/log_kubelet_internalerror
Log HTTP InternalServerErrors in the kubelet
2015-03-04 08:22:15 -08:00
Eric Tune 2ec257eb49 Merge pull request #5023 from justinsb/fix_typo_in_test
Fix typo in test
2015-03-04 08:12:08 -08:00
Justin Santa Barbara 7725cd23ec Fix typo in test 2015-03-04 10:10:08 -05:00
Derek Carr cb1e044a60 Merge pull request #4923 from lavalamp/fix4
Allow reflector to do full resync periodically
2015-03-04 09:58:03 -05:00
Justin Santa Barbara b681a45fb6 Log HTTP InternalServerErrors in the kubelet
Otherwise we just get a stack trace and no message
2015-03-04 09:48:44 -05:00
Brendan Burns fb90b56bf6 Embed VolumeSource in v1beta3 and internal. 2015-03-04 02:25:40 -08:00
Victor Marmol 71e545bf81 Merge pull request #4970 from dchen1107/podstatus
Hide POD container from end users
2015-03-02 17:15:24 -08:00
Dawn Chen dad365fb2b Hide POD container from end users 2015-03-02 17:03:28 -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
Brendan Burns fe973461f5 Merge pull request #4916 from thockin/plural_21_endpoints
Rename type Port to ContainerPort
2015-03-02 10:53:32 -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
Tim Hockin ea548b8260 Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-27 21:05:59 -08:00
Daniel Smith 554b1c847c add occasional polling to reflector 2015-02-27 16:59:14 -08:00
Dawn Chen 0fec31a11e Merge pull request #4918 from vmarmol/handle-crash
Handle crash in per-pod thread and container killer.
2015-02-27 16:54:37 -08:00
Victor Marmol c7e7ecdf2c Handle crash in per-pod thread and container killer. 2015-02-27 16:33:46 -08:00
Daniel Smith d68c738fcf Merge pull request #4575 from nikhiljindal/versionedFieldSelector
Adding converter functions to convert field label selectors to internal version before matching
2015-02-27 16:33:15 -08:00
nikhiljindal 48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08:00
Victor Marmol cc3c4414f8 Merge pull request #4915 from yujuhong/hostport
kubelet: record an event with a clear reason on host port conflict
2015-02-27 16:04:04 -08:00
Yu-Ju Hong 241df2d3be kubelet: record an event with a clear reason on host port conflict
Currently, kubelet silently ignores pods that caused host port conflict. This
commit surfaces the error by recording an event.

It also makes sure that kubelet iterates through the pods in the order of the
creation timestamp, which ensures that pods created later are ignored on
conflict.
2015-02-27 15:51:53 -08:00
Victor Marmol 556acc792b Adding ContainersPerPodCount metric.
This will let us know the composition of pods in clusters.
2015-02-27 11:27:09 -08:00
Victor Marmol a9301b1996 Adding metric for latency of SyncPods (synching all pods). 2015-02-27 11:11:43 -08:00
Victor Marmol cbf93822ac Adding metrics to measure latency of Docker operations.
Part of #4604.
2015-02-27 10:26:06 -08:00
Victor Marmol ed0f5885b5 Adding sync pod latency metric (again).
Latency is broken down by create, update, and sync pods.

Part of #4604.
2015-02-27 09:35:20 -08:00
Wojciech Tyczynski a973f57d6b Thread per pod 2015-02-27 13:27:29 +01:00
Sami Wagiaalla 9150cb9d95 Catch kubelet-master hostname mismatch during health check
During the kubelet's /healthz responce check to see if the
hostname used by the master matches the hostname the kubelet
knows itself by. If not fail the health check.

Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-02-26 10:22:03 -05:00
Vish Kannan e3af23e6e9 Merge pull request #4792 from vmarmol/mon-containers-per-pod
Add Kubelet metrics for pod and container counts.
2015-02-25 18:51:22 -08:00
Victor Marmol 95464349d5 Add Kubelet metrics for pod and container counts.
Part of #4604.
2015-02-25 12:18:59 -08:00
Daniel Smith ec8ecf3993 Merge pull request #4494 from brendandburns/race
Add protection for the pods member varaible.
2015-02-25 10:41:32 -08:00
Brendan Burns 801ad909ca Add protection for the pods member varaible.
Address comments.
2015-02-24 19:36:11 -08:00
Vish Kannan 0b15f2ff65 Merge pull request #4784 from vmarmol/pod-restart
Kill infra pod when a container is restarted.
2015-02-24 13:37:08 -08:00
Vish Kannan c561c8b0b1 Merge pull request #4753 from vmarmol/mon
First Kubelet metric and overall plumbing.
2015-02-24 12:51:34 -08:00
Victor Marmol aadbf221d2 Kill infra pod when a container is restarted.
Revert 0e20f7d736.
Fixes #4759.
2015-02-24 11:52:05 -08:00
Rohit Jnagal e77322a561 Merge pull request #4755 from yifan-gu/cleanup
pkg/kubelet: Fix logging.
2015-02-24 10:12:02 -08:00
Rohit Jnagal 590a62ffe5 Merge pull request #4767 from mikedanese/kind-to-type
Rename {Node,Pod}ConditionKind -> {Node,Pod}ConditionType
2015-02-24 10:10:57 -08:00
Yifan Gu 1a5a842ac5 pkg/kubelet: Fix logging. 2015-02-24 09:47:10 -08:00
Wojciech Tyczynski dcef5e2955 Introduce DockerCache in Kubelet. 2015-02-24 09:10:07 +01:00
Mike Danese 5267127af1 api: rename conditionkind -> conditiontype 2015-02-23 22:13:21 -08:00
Victor Marmol c40a60e945 Adding image pull latency metric.
Also adding TODOs for other metrics.

Part of #4604.
2015-02-23 16:30:29 -08:00
Rohit Jnagal 50700419ea Merge pull request #4732 from yifan-gu/cleanup
Remove outdated const.
2015-02-23 16:06:32 -08:00
Victor Marmol f5beb04c53 Adding Prometheus /metrics handler. 2015-02-23 15:42:04 -08:00
Victor Marmol d880be0301 Merge pull request #4738 from vmarmol/fix-pull
Remove pullLock from Kubelet.
2015-02-23 14:34:10 -08:00
Rohit Jnagal b261d8c60a Merge pull request #4724 from mikedanese/readiness-states-cleanup
Don't lock readinessStates on concurrent reads
2015-02-23 14:29:11 -08:00
Rohit Jnagal cbcd35539f Merge pull request #4718 from cjcullen/pdtest
Fix PD detach (fix the mount path/device name calculation).
2015-02-23 14:28:02 -08:00
Daniel Smith 650f6cb826 Revert "Multi-port Endpoints" 2015-02-23 13:53:21 -08:00
Tim Hockin eed36455a7 Merge pull request #4653 from thockin/secret_fixups
Secrets fixups
2015-02-23 13:49:19 -08:00
Victor Marmol a6d975c929 Remove pullLock from Kubelet.
The lock was only ever used to grab a read lock before container pulls.
2015-02-23 13:27:55 -08:00
Tim Hockin 607b736a3f Rename volume source types to be consistent. 2015-02-23 12:39:57 -08:00
CJ Cullen 54e8240916 Fix PD detach (fix the mount path/device name calculation).
Fix readonly PD attach (don't try to format).
Add an e2e test to verify that PDs are attached and detached correctly.
Add an e2e test to verify that readonly PDs can be attached to >1 pods.
2015-02-23 12:19:22 -08:00
Yifan Gu a631252abf Remove outdated const. 2015-02-23 11:00:38 -08:00
Mike Danese d6fb8ce05a Don't lock readinessStates on concurrent reads. 2015-02-23 10:49:39 -08:00
Tim Hockin e0fd83096c Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-21 22:26:38 -08:00
Victor Marmol ccdbad89ce Merge pull request #4677 from vmarmol/ooms
Check Docker init PID is valid before we use it.
2015-02-20 13:53:01 -08:00
Andy Goldstein bd2eb2fa8f Fix flaky exec/portforward tests
Fixes #4676
2015-02-20 16:29:57 -05:00
Victor Marmol da2f4b6d61 Check Docker init PID is valid before we use it.
This gives us an error if the PID is not returned as we expect.
2015-02-20 13:10:40 -08:00
Tim Hockin 7fe7f8a542 move pkg/kubelet/server to cmd/kubelet/app 2015-02-20 08:49:12 -08:00
Tim Hockin 646621e0e8 Merge pull request #3763 from ncdc/remote-exec-port-forward
Add streaming remote command execution and port forwarding
2015-02-20 08:40:33 -08:00
Victor Marmol d22fefd72d Merge pull request #4650 from xiang90/cadvisor
pkg/kubelet: minor fixes for cadvisor.go
2015-02-20 08:35:27 -08:00
Andy Goldstein 5bd0e9ab05 Add streaming command execution & port forwarding
Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
2015-02-20 09:57:02 -05:00
rsokolowski e81ef667c2 Fix broken kubelet_test.go. 2015-02-20 11:20:12 +01:00
Dawn Chen efac150039 Merge pull request #4563 from xiang90/syncpod
pkg/kubelet: recreate infra pod if the pod is changed
2015-02-20 00:29:26 -08:00
Dawn Chen 530c1559e1 Merge pull request #4647 from vmarmol/ooms
Make POD container last OOM victim
2015-02-20 00:25:52 -08:00
Xiang Li 5dc20421dc pkg/kubelet: drop the unnecessary method receiver 2015-02-19 21:40:17 -08:00
Xiang Li c6d8bd8f5e pkg/kubelet: return error when there is no cadvisor connection 2015-02-19 21:35:57 -08:00
Xiang Li ce1ced4322 pkg/kubelet: make comments follow go-style 2015-02-19 21:34:52 -08:00
Xiang Li 6433e2dd2b pkg/kubelet: uncaptialize the error message in cadvisor.go 2015-02-19 21:30:24 -08:00
Victor Marmol 8649628c6c Make POD container last OOM victim.
Setting the oom_score_adj of the PID of the POD container to -100 which is less
than the default of 0. This ensures that this PID is the last OOM victim
chosen by the kernel.

Fixes #3067.
2015-02-19 19:24:01 -08:00
Victor Marmol 2d1a8d0da0 Allow ApplyOomScoreAdj to specify what PID to adjust for. 2015-02-19 17:16:31 -08:00
Daniel Smith b7b537efc7 fix confusing defer 2015-02-19 17:11:32 -08:00
Victor Marmol 40cb417901 Merge pull request #4531 from wojtek-t/batch_requests_in_kubelet
Batch updates of multiple Pods.
2015-02-19 10:50:26 -08:00
Jerzy Szczepkowski d614fc7fcc Fire event for pod when mount fails.
Implemented firing event for pod when mount of external volume fails. Fixes #4540.
2015-02-19 11:08:36 +01:00
Wojciech Tyczynski 702ad7732f Applied comments 2015-02-19 08:01:16 +01:00
Eric Tune af67829eca Merge pull request #4515 from pmorie/secrets_wip
Secret volume plugin iteration 1
2015-02-18 15:57:31 -08:00
Xiang Li 0e20f7d736 pkg/kubelet: recreate infra pod if the pod is changed 2015-02-18 15:05:16 -08:00
Dawn Chen 8022c74b55 Merge pull request #4473 from xiang90/server
pkg/kubelet/server.go: minor fixes
2015-02-18 14:50:51 -08:00
Paul Morie a42ff94c8f Add secret volume plugin and e2e test 2015-02-18 16:27:44 -05:00
Xiang Li 6b91901bd3 pkg/kubelet: minor fixes in server.go 2015-02-18 13:18:45 -08:00
Prashanth Balasubramanian 9427f75788 Cadvisor returns richer errors to the kubelet server. 2015-02-18 09:31:28 -08:00
Wojciech Tyczynski 25c8f07c67 Batch updates of multiple Pods. 2015-02-18 16:46:16 +01:00
Dawn Chen c843adbd8f Create docker.Container obj with Name. Integration test is using fake_docker_client
to create and start a fake container. When StartContainer, it pass a name as docker
ID for testing purpose, but leave Name uninitialized. This PR fixes such issue.

Fixed #4472.
2015-02-17 15:23:21 -08:00
Dawn Chen bafa240187 Add debugging information for #4472 2015-02-17 13:28:15 -08:00
Clayton Coleman 4859aa7cd8 Merge pull request #4453 from derekwaynecarr/make_quota_more_efficient
Make ListWatch work with a ListFunc and WatchFunc
2015-02-17 14:48:11 -05:00
Nikhil Jindal 81d0a88f1e Merge pull request #4459 from xiang90/kubulete
kubelet: minor cleaning up
2015-02-17 10:18:47 -08:00
Xiang Li 042dc1faa3 pkg/kubelet: uncaptialize error message 2015-02-16 09:33:20 -08:00
Xiang Li 2437e94248 pkg/kubelet: fix wrong code path in runContainer 2015-02-16 09:32:37 -08:00
Xiang Li 13bb378d1c pkg/kubelet: reduce indentation 2015-02-16 08:46:41 -08:00
Xiang Li edc926ffcb pkg/kubelet: capitalize message in print 2015-02-16 08:40:07 -08:00
Xiang Li da6d1da12d pkg/kubelet: remove unused var in handlers.go 2015-02-16 08:38:10 -08:00
Mike Danese 4ba8ecd1fb move api.Probe timeout default to central defaults 2015-02-15 23:44:55 -08:00
Xiang Li 3c2ead5b29 pkg/kubelet: minor cleanup for probe.go 2015-02-15 22:25:14 -08:00
derekwaynecarr c0ce15c588 Make list watch take a ListFunc and WatchFunc, provide default funcs from client 2015-02-15 22:26:05 -05:00
Dawn Chen 20dc1c2481 Merge pull request #4410 from brendandburns/fixer
Don't delete the pod infrastructure container on health check failures.
2015-02-13 15:18:27 -08:00
Victor Marmol 5d6ad845cc Use Docker name (not ID) to parse Kubernetes components.
Since the parsing function doesn't return an error all the components
returned empty strings. This caused us to enforce the MaxContainerLimit
as a global limit instead of a per-container limit.

Fixes #4413.
2015-02-13 13:08:15 -08:00
Brendan Burns 4ad3ea438d Revert "Revert "Add an event for health check failures.""
This reverts commit fc4e711a8c.
2015-02-13 09:23:13 -08:00
Clayton Coleman 09f18031fe Merge pull request #4285 from brendandburns/auth
Add a more detailed error message for potential auth fails in docker pull.
2015-02-13 12:08:48 -05:00
Saad Ali fc4e711a8c Revert "Add an event for health check failures." 2015-02-13 08:10:45 -08:00
Saad Ali c112f8f1bb Merge pull request #4408 from brendandburns/printing
Add an event for health check failures.
2015-02-13 07:59:26 -08:00
Brendan Burns 5e49a606e1 Address changes. 2015-02-12 21:39:42 -08:00
Brendan Burns 8b7dfc9359 Return logs for failed and succeeded pods too. 2015-02-12 21:36:25 -08:00
Brendan Burns 4dbf98e98f Don't delete the pod infrastructure container on health check failures. 2015-02-12 21:28:32 -08:00
Brendan Burns c03a435501 Add an event for health check failures. 2015-02-12 19:08:23 -08:00
Brendan Burns 0532c46217 Add a more detailed error message for potential auth fails in docker pull. 2015-02-12 17:00:59 -08:00
Eric Tune dd8f335380 Merge pull request #4376 from dchen1107/podstatus
Fix podstatus issue caused by docker's resource temporarily unavailable issue
2015-02-12 13:16:09 -08:00
Dawn Chen af54c62766 Fix podstatus issue caused by docker's resource temporarily unavailable error 2015-02-11 23:52:58 -08:00
Vishnu Kannan 922881fcd2 Improve error handling for '/containerLogs' API in kubelet. 2015-02-12 02:22:26 +00:00
Eric Tune 9ea4d2f814 Merge pull request #4323 from dchen1107/podstatus
Check if kubelet does know such Pod before querying status.
2015-02-11 11:13:50 -08:00
Dawn Chen f5f2b6f773 Check if kubelet does know such Pod before querying status. 2015-02-11 10:16:04 -08:00
Dawn Chen c55921676c Merge pull request #4271 from ArtfulCoder/logging_etcd
Updated etcd-pod-dir-fetch logging.
2015-02-10 13:41:06 -08:00
Abhishek Shah febf8c9b2c Fixed formattting issues in etcd.go 2015-02-10 12:03:40 -08:00
Mike Danese c72c2a0d1e added tests 2015-02-10 08:30:13 -08:00
Mike Danese 3d0cd81feb refactor pkg/probe ProbeRunners to interfaces and move global probers into kubelet field for testability 2015-02-10 08:30:11 -08:00
Mike Danese 043794492e implement readiness. 2015-02-10 08:30:09 -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
Brendan Burns cc7279f6a8 Actually use the safeFormatAndMounter... 2015-02-06 17:01:05 -08:00
Zach Loafman b77abb5945 Merge pull request #4221 from brendandburns/pd_fix
Make gce_safe_format_and_mount actually work correctly.
2015-02-06 14:50:20 -08:00
Brendan Burns 3d6c9fc9e8 Fix gce_pd to only use safe_format_and_mount when mounting block devices. 2015-02-06 12:41:21 -08:00
Brendan Burns 35fa143b29 Revert "Revert "Start using GCE safe format and mount for mounting disks.""
This reverts commit 858a85e8fe.
2015-02-06 10:09:00 -08:00
Brendan Burns 94d852e8a6 Merge pull request #4214 from brendandburns/pd_fix
Revert "Start using GCE safe format and mount for mounting disks."
2015-02-06 09:58:51 -08:00
Brendan Burns 858a85e8fe Revert "Start using GCE safe format and mount for mounting disks."
This reverts commit 3f109d6d46.
2015-02-06 09:58:03 -08:00
Dawn Chen 05de54249f Merge pull request #4191 from simon3z/master
api: add image's id to ContainerStatus
2015-02-06 09:35:44 -08:00
Federico Simoncelli e01df69565 api: add image's id to ContainerStatus
Sometimes for external applications it is important to identify
exactly what images are running. Since tags can be moved to point
to newer builds this information can be used to identify old images
running.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-06 09:01:14 -05:00
Brian Grant 175e9caa55 Merge pull request #4194 from dchen1107/podstatus
Kubelet decides podStatus
2015-02-05 17:18:39 -08:00
Brendan Burns 3f109d6d46 Start using GCE safe format and mount for mounting disks.
This removes the need for disks to be formatted.
2015-02-05 17:01:37 -08:00
Mike Danese 14bfec92f2 rename probe.Status to probe.Result. 2015-02-05 15:49:58 -08:00
Dawn Chen f762e062f2 Kubelet decides podStatus 2015-02-05 15:49:41 -08:00
Brendan Burns 8e6f5c7201 Merge pull request #3593 from commonlisp/master
Add timeouts to HealthChecks and retry checks
2015-02-05 15:40:22 -08:00
Brendan Burns 8b25b43039 Merge pull request #4117 from wojtek-t/validate_docker_version
Check Docker version in Kubelet /healthz handler
2015-02-05 10:06:33 -08:00
George Kuan e8c33b7916 Add timeouts to HealthChecks and retry checks
Fixes issue #3532. Added timeouts for HTTP and TCP checks
and enabled kubelet/probe to kubelet#maxRetries times
before declaring Failure.

Added Probe.TimeoutSecs to API

Probe variants now check container.LivenessProbe.TimeoutSeconds
Also added a test for timeouts in http_test.go.
2015-02-05 06:04:45 -08:00
Wojciech Tyczynski 1a3419f970 Fix the min allowed Docker version. 2015-02-05 02:34:04 +01:00
Brendan Burns cfe5b14114 Wait until containers actually finish running before trying to clean up
volumes or pods.
2015-02-04 17:28:41 -08:00
Wojciech Tyczynski 524cdba101 Fix hack/test-cmd.sh test. 2015-02-05 01:58:26 +01:00
Brendan Burns 6e897524be Merge pull request #4093 from nelcy/master
Fix orphaned pod & volume cleanup order. Volumes need to be unmounted before pod cleanup.
2015-02-04 14:38:20 -08:00
Wojciech Tyczynski ead67108ce Use existing method to get Docker version. 2015-02-04 20:50:21 +01:00
Wojciech Tyczynski 78f66a6ce9 Check Docker version in Kubelet /healthz handler 2015-02-04 18:31:24 +01:00
chakri 9508b2bf12 Fix orphaned pod & volume cleanup order. Volumes need to be unmounted before pod cleanup. 2015-02-04 01:46:28 +00: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
Brian Grant 2903fce2b8 Merge pull request #4031 from jbeda/hyperkube-kubelet
Convert kubelet and proxy to hyperkube
2015-02-02 18:08:59 -08:00
Tim Hockin 1ee1702be0 Merge pull request #3808 from brendandburns/master
Add a mounter that uses google's safe_format_and_mount.
2015-02-02 16:29:10 -08:00
Brendan Burns ac21ac24fa Add a mounter that uses google's safe_format_and_mount. 2015-02-02 16:16:20 -08:00
Tim Hockin ac399fb354 Merge pull request #3967 from brendandburns/fixer
Be a little more careful when removing mount points.
2015-02-02 15:46:18 -08:00
Joe Beda 76df5471b5 Covert the kubelet binary to hyperkube.
This leaves `pkg/kubelet/server/server.go` looking a little ugly as there is an extra layer of "config" structs that isn't needed.  This is left as a TODO for now.
2015-02-02 14:03:13 -08:00
Joe Beda d96afdd645 Move 'pkg/standalone' package to 'pkg/kubelet/server'.
This paves the way to hyperkube for the kubelet.
2015-02-02 14:03:13 -08:00
Brendan Burns 7f06fbb081 Be a little more careful when removing mount points. 2015-02-02 12:35:24 -08:00
Vishnu Kannan 5e36f63f8b Adding ResourceRequirementSpec to v1beta1, v1beta2, and v1beta3 APIs. The old resource
quantities 'CPU' and 'Memory' will be preserved until support for v1beta1 and v1beta2 APIs are
dropped.
Improved resource validation in the process.
2015-02-01 02:19:55 +00:00
Clayton Coleman 556e59b512 Merge pull request #3810 from ironcladlou/cache-namespacing
Support namespacing in cache.Store
2015-01-30 13:19:41 -05:00
Brian Grant 207d0f5d40 Merge pull request #3878 from thockin/infra_name
Use a constant for the pod infra container name
2015-01-30 09:18:00 -08:00
Ye Yin 248624fc1f Add docker's add/drop capabilites 2015-01-30 15:09:31 +08:00
Brendan Burns a0b8429d2e Reverse the order of unmounting and removing the pd disk.
This should mean that we retry detaching if the original detach fails for some reason.
2015-01-29 16:13:12 -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
Mrunal Patel 19e0605f5b Replace "net" by "pod infra" in docs and format strings. 2015-01-28 15:03:06 -08:00
Tim Hockin 804643a04b Merge pull request #3818 from mikedanese/probe-refactor
break api.Probe out of api.LivenessProbe
2015-01-28 12:41:35 -08:00
Dawn Chen b0bcee7b40 Increase timeout for all testcases in file_test.go 2015-01-28 11:27:15 -08:00
Mike Danese 78f33e950a rename api.LivenessProbe to api.Probe and break out Actions 2015-01-28 11:20:44 -08:00
Tim Hockin c8f61885df Merge pull request #3695 from mikedanese/ready
refactor pkg/health into more reusable pkg/probe
2015-01-28 11:00:32 -08:00
Tim Hockin 70ab406751 Use a constant for the pod infra container name
This is an implementation detail that has leaked out of kubelet.  Use a
constant to prevent divergence, for now.  Plan to get rid of it.

@dchen1107
2015-01-28 10:13:02 -08:00
Paul Morie 962bdda0dc Fix typo in kubelet 2015-01-28 12:00:53 -05:00
Tim Hockin 371637a5fc Merge pull request #3845 from brendandburns/disk
Detach the PD disk from the VM in some failure cases.
2015-01-27 15:46:36 -08:00
Tim Hockin 7e6f3af937 Merge pull request #3817 from mrunalp/feature/shared_ipc
Shared IPC namespace for containers in a pod
2015-01-27 15:41:34 -08:00
Brendan Burns bc055d2bd0 Detach the PD disk from the VM in some failure cases. 2015-01-27 13:58:42 -08:00
Mike Danese 5dc6362f8a rename probe.Healthy to probe.Success and renam probe.Unhealthy to probe.Failure. 2015-01-27 11:20:30 -08:00
Mike Danese 6eb0b89cbd add Probers to Probe pkgs. 2015-01-27 11:20:30 -08:00
Mike Danese a298402bd4 remove pkg/health and move everything over to pkg/probe 2015-01-27 11:20:30 -08:00
Mike Danese 5ee4071cf1 migrated tests 2015-01-27 11:20:29 -08:00
Mike Danese ee56a1d3e3 create pkg/probe as successor to pkg/health. 2015-01-27 11:20:29 -08:00
Brendan Burns 7e558a7535 Merge pull request #3813 from mattmoor/master
Fix for issue 3797.
2015-01-27 09:56:49 -08:00
Mrunal Patel b6a0ff1003 IP: Shared IPC. 2015-01-27 09:26:36 -08:00
Brendan Burns e5c38a825b Fix unit tests @ main. 2015-01-26 22:12:24 -08:00
Matt Moore 2d396797a9 Fix for issue 3797.
Docker's logic for resolving credentials from .dockercfg accepts two kinds of matches:
1. an exact match between the dockercfg entry and the image prefix
2. a hostname match between the dockercfg entry and the image prefix

This change implements the latter, which permits the docker client to take .dockercfg entries of the form:
   https://quay.io/v1/
and use them for images of the form:
   quay.io/foo/bar
even though they are not a prefix-match.
2015-01-26 14:06:12 -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