Dawn Chen
563f2965ba
Populate last terminated container information
2015-04-09 16:10:13 -07:00
Daniel Smith
629d94657e
Merge pull request #6624 from gmarek/status_to_subresource
...
Update NodeStatus use subresources.
2015-04-09 16:00:15 -07:00
Victor Marmol
40acaef454
Merge pull request #6607 from yujuhong/mirror_update
...
Kubelet: recreate mirror pod if the static pod changes
2015-04-09 10:29:55 -07:00
Yifan Gu
b868f421e0
kubelet: Move pod infra container image setting to dockertools.
2015-04-09 09:53:07 -07:00
gmarek
ccc56d3c3c
Update NodeStatus use subresources.
2015-04-09 14:07:40 +02: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
Yifan Gu
4b945e7218
kubelet: Remove GetRecentDockerContainersWithNameAndUUID().
...
Add unit tests to test the restart behaviour under different
restart policy.
2015-04-08 09:44:23 -07:00
Yifan Gu
ddf323ee00
kubelet: Remove GetRecentDockerContainersWithNameAndUUID().
...
Always call GetPodStatus().
2015-04-08 09:44:23 -07:00
Yifan Gu
6103b144e0
kubelet: Remove GetRecentDockerContainersWithNameAndUUID().
...
Use the pod status to get the recent stopped containers in
shouldContainerBeRestarted().
2015-04-08 09:44:23 -07:00
gmarek
72182735b9
Remove Node Controllers ability to pull status from Kubelet
2015-04-08 09:44:42 +02:00
Quinton Hoole
c670071e87
Revert "kubelet: Remove GetRecentDockerContainersWithNameAndUUID."
2015-04-07 14:25:10 -07:00
Nikhil Jindal
842b9d8d3a
Merge pull request #6493 from smarterclayton/make_client_pluggable
...
Make the client.Fake more powerful by standardizing how the fake loads data
2015-04-07 12:48:27 -07:00
Victor Marmol
cb0850d7cf
Merge pull request #6527 from yujuhong/remove_unused
...
Remove unused code in kubelet/server_test.go
2015-04-07 12:30:39 -07:00
Clayton Coleman
51db3bd654
Create a new testclient package that can be backed by disk files
...
Standardize how our fakes are used so that a test case can use a
simpler mechanism for providing large, complex data sets, as well
as represent queries over time.
2015-04-07 14:56:15 -04:00
Yu-Ju Hong
d6b4633432
Remove unused code in kubelet/server_test.go
...
The code creates a channel and a go routine waiting for update, which is never
used by any test. Remove the unused code.
2015-04-07 11:55:19 -07:00
Yifan Gu
ba1ad9fad2
kubelet: Refactor RunInContainer/ExecInContainer/PortForward.
...
Replace GetKubeletDockerContainers() with findContainer().
2015-04-06 17:14:46 -07:00
Yifan Gu
a8c02412b2
kubelet: Remove GetRecentDockerContainersWithNameAndUUID().
...
Use the pod status to get the recent stopped containers in
shouldContainerBeRestarted().
2015-04-06 12:43:49 -07:00
Dawn Chen
67c1678e7e
Merge pull request #6378 from yujuhong/docker_manager
...
RFC: Kubelet: a step towards to better encapsulation of docker functions
2015-04-02 14:22:26 -07:00
Yu-Ju Hong
d01bc660b5
Kubelet: a step towards to better encapsulation of docker functions
...
We want to stop leaking more docker details into kubelet, and we also want to
consolidate some of the existing docker interfaces/structs. This change creates
DockerManager as the new home of some functions in dockertools/docker.go. It
also absorbs containerRunner. In addition, GetDockerPodStatus is renamed to
GetPodStatus with the entire pod passed to it so that it is simialr to the what
is defined in the container Runtime interface.
Eventually, DockerManager should implement the container Runtime interface, and
integrate DockerCache with a flag to turn on/off caching. Code in kubelet.go
should not be using docker client directly.
2015-04-02 13:26:39 -07:00
Piotr Szczesniak
5c6439d449
Removed PodStatus.Host
...
Fixes #6165
2015-04-02 16:38:45 +02:00
Victor Marmol
2de37624e8
Merge pull request #6252 from krousey/string_format_cleanup
...
Fixing a lot of string formatting issues
2015-03-31 16:57:36 -07:00
Kris Rousey
6904c4d585
Fixing a lot of string formatting issues with regards to:
...
* Improper format specifier (e.g. %s for bools or %s for ints)
* More or less parameters than format specifiers
* Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
2015-03-31 16:47:10 -07:00
Brian Grant
3354cffbf0
Merge pull request #6182 from thockin/plural_services_20
...
Implement multi-port Services
2015-03-31 12:55:21 -07:00
Victor Marmol
9bbf0b1546
Merge pull request #6100 from pmorie/entrypoint
...
Add control over container entrypoint
2015-03-31 09:58:40 -07:00
Victor Marmol
d6d370d8ae
Merge pull request #6211 from dchen1107/docker
...
publish node components version information
2015-03-31 09:47:08 -07:00
Dawn Chen
5b9a6d47e8
publish node components version information
2015-03-31 09:32:29 -07:00
Paul Morie
7628b37d78
Add control over container entrypoint
2015-03-31 12:32:03 -04:00
Tim Hockin
186818d787
WIP: Implement multi-port Services
2015-03-30 19:28:11 -07:00
Yifan Gu
7b1ea6b41d
kubelet_test: Fix copy bug.
...
Initialize the slice before copying in verifyUnorderedCalls()
and verifyStringArrayEqualsAnyOrder().
2015-03-30 17:17:42 -07:00
Yifan Gu
6fecda710c
kubelet: Add container readiness manager.
...
Move the readiness managing logic into pkg/kubelet/container package
to facilitate the pluggable container runtime.
2015-03-26 18:45:23 -07:00
Victor Marmol
0fb131c4f9
Merge pull request #5975 from yifan-gu/refactor_runContainer
...
kubelet: Refactor kubelet.runContainer.
2015-03-26 15:50:37 -07:00
Yifan Gu
e6820bd0ca
kubelet_test: Fix verifyStringArrayEqualsAnyOrder().
...
Old implementation can not tell cases where strings are
repetitive. e.g. {"a", "b", "b"} and {"a", "a", "b"} will
be treated as correct.
2015-03-26 15:26:32 -07:00
Yifan Gu
aa2e7fe688
kubelet_test: Add verifyUnorderedCalls().
...
This fixes TestSyncPodsDeletesWithNoPodInfraContainer.
Since we need to sync two pods in parallel, we should not verify
the docker calls in strict order.
2015-03-26 15:25:51 -07:00
Yifan Gu
5f08555f45
kubelet: Refactor kubelet.runContainer.
...
Push the run container logic into container runtime.
2015-03-26 13:43:45 -07:00
Victor Marmol
1cad0df268
Merge pull request #6004 from yifan-gu/ref_manager
...
kubelet: Move container reference manager to pkg/kubelet/container.
2015-03-26 13:04:34 -07:00
Brian Grant
3b0db99692
Merge pull request #5915 from piosz/api
...
Changed PodInfo to be a list
2015-03-26 12:46:50 -07:00
Yifan Gu
9f62b929b8
kubelet: Move container reference manager to pkg/kubelet/container.
...
This enables other package to use it, such as docktools.
2015-03-26 11:53:44 -07:00
Victor Marmol
d2ea1a793b
Merge pull request #5982 from yifan-gu/ref_manager
...
kubelet: Add container reference manager.
2015-03-26 10:20:13 -07:00
Yifan Gu
a06bc96414
kubelet: Add container reference manager.
...
Move the reference managing logic into container reference manager.
This enables pluggable container runtime to manage the container references.
2015-03-26 09:50:54 -07:00
gmarek
5a11748018
Move Capacity from NodeSpec to NodeStatus
2015-03-26 15:28:48 +01:00
Piotr Szczesniak
31901ed9d0
Changed PodInfo to be a list
...
This change is to make API consistent with our convention.
Fixes #3622
2015-03-26 10:15:25 +01:00
Abhishek Shah
cd5ed38250
Stop port forwarding from pause in net=host mode
2015-03-25 17:55:37 -07:00
Federico Simoncelli
afbf401464
nodeinfo: add boot id system information
...
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-25 15:06:53 -04:00
Victor Marmol
cf7e2756b5
Add HostNetworkSources capability to limit use of HostNetwork.
2015-03-25 11:23:06 -07:00
Yu-Ju Hong
b4b0bc75c4
Kubelet: pass the acutal pod for status update
...
Pod status update should include the ObjectMeta of the pod. This change is
required for #5738 to merge.
2015-03-25 09:58:46 -07:00
Yifan Gu
31bb11ac2a
kubelet: Move pod name helpers to pkg/kubelet/container/runtime.go
2015-03-24 16:08:04 -07:00
Yifan Gu
13250c904f
kubelet: Replace GetKubeletDockerContainers with GetPods in syncPod/SyncPods.
2015-03-24 16:01:38 -07:00
David Oppenheimer
30c3583900
Merge pull request #5806 from ddysher/condition-rename
...
Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse
2015-03-24 15:50:11 -07:00
Victor Marmol
270c850b3b
Merge pull request #5826 from yujuhong/pod_manager
...
Kubelet: refactor pod manager
2015-03-24 15:33:54 -07:00
Yu-Ju Hong
08e4a883b6
Kubelet: refactor pod manager
...
This change cleans up the pod manager extensively so that
* Mirror pods are actually stored in the pod manager.
* Both (non-mirror) pods and mirror pods are indexed by UID and full name for
easy lookup and mapping. This is required for the next change to send
full pod along with the pod status update.
This change also renames mirrorManager as mirrorClient since it is merely a
client to contact the API server and create/delete mirror pods.
2015-03-24 15:10:26 -07:00
Deyuan Deng
ca68f4a9d1
Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse
2015-03-24 17:28:59 -04:00
Deyuan Deng
b51d491f05
Delete all pods based on condition transition time.
2015-03-24 14:23:48 -04:00
Filip Grzadkowski
632ca506ce
* Update pod status only when it changes.
...
* Refactor syncing logic into a separate struct
2015-03-24 16:41:00 +01:00
Yu-Ju Hong
f440989017
Kubelet: add podManager for managing internal pod storage
...
This change moves pod array and mirrorPods into podManager, along with all
methods accessing these internal pod storages. This is the first step of the
refactoring, and no function change is involved.
2015-03-23 15:11:10 -07:00
Jerzy Szczepkowski
34a8a3a844
Running node selector predicate on kubelet.
...
Added checking on kubelet if scheduled pods have matching node selector. This is the last step to fix #5207 .
2015-03-23 08:21:58 +01:00
Yu-Ju Hong
15e9760bd4
Kubelet: support retrieving stats using UID of mirror pod
...
Kubelet supports retrieving stats for pods/containers with and without UID.
This does not always work for the static pods because users may get the UIDs of
the mirror pods from the API server, and use them to query Kubelet. In this
case, Kubelet would fail to locate the containers due to mismatched UIDs.
This change adds a intenral mirror to static pod UID mapping and teaches all
public-facing functions to perform UID lookup before proceeding. This allows
users to use either mirror or static pod's UID to retrieve stats.
2015-03-20 15:40:49 -07:00
Vish Kannan
f118ca8fb4
Merge pull request #5642 from thockin/volume_multi_plugins
...
Prep for multiple kinds of volume plugins
2015-03-20 15:12:30 -07:00
Tim Hockin
bfadae77e0
Promote volume plugins, prep for persistent vols
...
Move pkg/kubelet/volume/... to pkg/volume/...
Some renames to make the soon-to-come persistent volumes work clearer.
2015-03-20 13:49:40 -07:00
Abhishek Gupta
b0c23c1046
Headless Services: Adding option to specify None for PortalIP
2015-03-20 12:10:03 -07:00
CJ Cullen
7ddcecfd1c
Revert "Revert "[WIP] southbound networking hooks in kubelet""
2015-03-19 16:14:13 -07:00
Zach Loafman
b5d1e538df
Revert "[WIP] southbound networking hooks in kubelet"
2015-03-19 16:08:08 -07:00
Rajat Chopra
7857aa7751
kubelet networking plugin
2015-03-19 14:15:52 -07:00
Jerzy Szczepkowski
c0ff504ad3
Merge pull request #5501 from jszczepkowski/kubelet-spechost
...
Running resource predicate on kubelet.
2015-03-19 21:34:27 +01:00
Dawn Chen
4910be6dcb
Remove PodIP from ContainerStatus
2015-03-19 10:42:01 -07:00
Jerzy Szczepkowski
5845f6ad48
Running resource predicate on kubelet.
...
Added checking on kubelet if scheduled pods do not exceed resources. Related to #5207 .
2015-03-19 10:40:10 +01:00
Filip Grzadkowski
1a352b74ba
Periodically update pod status from kubelet.
2015-03-18 12:11:39 +01:00
Victor Marmol
d1ed571e28
Use containerGC in the Kubelet.
...
New policy default is 100 containers max.
Fixes #5457 .
2015-03-17 10:50:32 -07: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
Jeff Lowdermilk
e37fd2a84d
Merge pull request #5477 from dchen1107/clean
...
Convert RestartPolicy to string for v1beta3.
2015-03-16 10:23:52 -07:00
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
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
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
gmarek
3489d1ae01
Refactor kubelet syncPod method
2015-03-13 18:22:42 +01: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
Eric Tune
ae9bc28f8b
Remove mentions of etcd in kubelet.
2015-03-11 16:40:20 -07:00
Deyuan Deng
9982aaa960
kubelet post node status to master
2015-03-10 23:17:36 -04: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
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
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
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
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
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
Vishnu Kannan
f6910803a9
Relax constraints on container status while fetching container logs
2015-03-06 00:19:52 +00:00
Paul Morie
02b18edac6
Allow multiple sources to be used with record package
2015-03-05 13:54:29 -05:00
Brendan Burns
fb90b56bf6
Embed VolumeSource in v1beta3 and internal.
2015-03-04 02:25:40 -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
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
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
Jeff Grafton
c2e7e2d029
Revert "Adding sync pod latency metric." and "Thread-per-pod model in Kubelet."
...
This reverts commits 744f33d886
and
7191c5c7fd
.
2015-02-26 12:15:28 -08:00
Victor Marmol
744f33d886
Adding sync pod latency metric.
...
Latency is broken down by create, update, and sync pods.
Part of #4604 .
2015-02-26 11:13:04 -08:00
Wojciech Tyczynski
7191c5c7fd
Thread-per-pod model in Kubelet.
2015-02-26 17:58:57 +01: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
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
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
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
Daniel Smith
650f6cb826
Revert "Multi-port Endpoints"
2015-02-23 13:53:21 -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
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
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
Xiang Li
0e20f7d736
pkg/kubelet: recreate infra pod if the pod is changed
2015-02-18 15:05:16 -08:00
Prashanth Balasubramanian
9427f75788
Cadvisor returns richer errors to the kubelet server.
2015-02-18 09:31:28 -08: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
4dbf98e98f
Don't delete the pod infrastructure container on health check failures.
2015-02-12 21:28:32 -08:00
Dawn Chen
f5f2b6f773
Check if kubelet does know such Pod before querying status.
2015-02-11 10:16:04 -08:00
Mike Danese
c72c2a0d1e
added tests
2015-02-10 08:30:13 -08:00
Mike Danese
043794492e
implement readiness.
2015-02-10 08:30:09 -08:00
Dawn Chen
f762e062f2
Kubelet decides podStatus
2015-02-05 15:49:41 -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
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
ead67108ce
Use existing method to get Docker version.
2015-02-04 20:50:21 +01:00
Mrunal Patel
19e0605f5b
Replace "net" by "pod infra" in docs and format strings.
2015-01-28 15:03:06 -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
Mike Danese
a298402bd4
remove pkg/health and move everything over to pkg/probe
2015-01-27 11:20:30 -08:00
Mrunal Patel
b6a0ff1003
IP: Shared IPC.
2015-01-27 09:26:36 -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
Dawn Chen
2299c04cea
Remove image GC.
...
Fix #3617,#3611, and #3393 .
2015-01-20 13:43:08 -08:00
Dawn Chen
3101a33d32
Kubelet stop using api/helper.go for PullPolicy
2015-01-20 11:54:22 -08:00
Tim Hockin
6cb275829f
Implement volumes as plugins.
...
Break up the monolithic volumes code in kubelet into very small individual
modules with a well-defined interface. Move them all into their own packages
and beef up testing along the way.
2015-01-20 11:45:45 -08:00
Andrew Seidl
6dee1d7fa4
Fix typos in user-facing strings
2015-01-18 01:32:34 -06:00
Eric Tune
5aeda8a5bb
Remove dead code in test.
2015-01-15 14:49:08 -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
b759f67ee3
Kublet watches Pods.
...
Added a kubelet config source for watching pods on apiserver.
The pods are converted to boundpods for merging with other
config sources.
The preferred way to create a kubelet is now to pass an apiserver
client but not an etcd client. Changed cmd/integration to use
apiserver to talk to kubelets. And cmd/kubernetes.
Unit, integration, and e2e tests pass, except for a failure of the pd
e2e test which was unrelated.
2015-01-14 15:31:26 -08:00
Tim Hockin
1be3de895c
Move util.UID to pkg/types
2015-01-14 15:22:21 -08:00
Eric Tune
88c68e0349
Merge pull request #3331 from pmorie/services
...
Service visibility w/in namespaces, master services, set env vars in kubelet
2015-01-14 15:01:05 -08:00
Paul Morie
fd834ae84d
Pods should see services only from their own ns
2015-01-14 17:06:36 -05:00
Tim Hockin
e86d4cd3c6
Use a strong type for UID fields
2015-01-14 13:53:43 -08:00
saadali
110ab6f1bd
Split up kubelet "source seen" logic
2015-01-12 21:48:55 -08:00
Tim Hockin
0d92da6b15
Remove logic to handle if UID is blank
...
This should only have been triggered by tests, and those should now be fixed.
I tested by calling panic() if UID was blank in BuildDockerName() or if number
of fields was < 5 in ParseDockerName(). All errors were fixed.
2015-01-12 14:27:34 -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
Tim Hockin
523a80bec7
Apply more structure to pod data dirs
...
This is makes it possible to read back "known" pods from disk without
getting other (non-pod) kubelet dirs in the mix. Ditto for containers
within a pod. This is just saner overall. Pods now nest in a pods/
dir. Likewise containers.
2015-01-12 06:16:32 -08:00
saadali
e8d30f019d
Modify "kubectl get events" to print FieldPath so BoundPod events for the same Pod but different containers can be differentiated
2014-12-29 21:32:49 -08:00
Tim Hockin
652479a3b1
Add kubelet DNS flags & api disable for DNS
...
This adds --cluster_dns and --cluster_domain flags to kubelet. If
non-empty, kubelet will set docker --dns and --dns-search flags based on
these. It uses the cluster DNS and appends the hosts's DNS servers.
Likewise for DNS search domains.
This also adds API support to bypass cluster DNS entirely, needed to
bootstrap DNS.
2014-12-29 09:18:12 -08:00
Brendan Burns
b8781c04bb
Add support for garbage collecting images.
2014-12-22 16:56:58 -08:00
Dawn Chen
608c3d5046
Update kubelet package on latest go-dockerclient package.
2014-12-18 13:49:13 -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
Clayton Coleman
dadb8431c4
Remove internal PodState in favor of internal PodStatus object
2014-12-15 16:50:05 -05:00
Daniel Smith
e46bfcf699
Allow, when testing, SelfLinks to be unset. Kubelet now makes events in tests.
2014-12-09 17:53:42 -08:00
Daniel Smith
ba62943b8e
Compare containers by name, not by pointer equality.
2014-12-09 17:06:39 -08:00
Tim Hockin
acc6b95c21
Add functions to get kubelet directories.
...
Gets rid of some magic constants and makes volume plugins (coming later)
cleaner.
2014-12-06 11:00:19 -08:00
Jimmi Dyson
5109ce3356
Fixes #2681 : update to cadvisor 0.6.2
2014-12-01 11:38:03 +00:00
Dawn Chen
ce145545b9
Add unittests to test PullPolicy.
2014-11-14 16:09:53 -08:00
Dawn Chen
57454cce81
Add support to capture application termination message and propagate
...
the message to the upper layer through ContainerStatus.
2014-11-10 10:56:23 -08:00
Dawn Chen
03958f5049
Restart network container when container's configure is changed.
...
Fix #2099
2014-11-04 14:38:33 -08:00
Brendan Burns
69ca97a41c
Fix a flaky test by draining the worker pool after syncing.
2014-10-31 09:52:01 -07:00
Brendan Burns
51bf451932
Add container garbage collection.
2014-10-28 12:52:06 -07:00
Tim Hockin
2bbd11eda6
Merge pull request #1975 from smarterclayton/split_type_meta
...
Split TypeMeta into ObjectMeta/ListMeta
2014-10-24 08:43:00 -07:00
Clayton Coleman
644eb70085
Refactor tests to split ObjectMeta from TypeMeta
2014-10-24 11:22:21 -04:00
Tim Hockin
76c33a88b6
Remove redundancy in SyncPods
2014-10-23 15:53:26 -07:00
Tim Hockin
487867bd01
Extract cadvisor code to cadvisor.go
2014-10-23 15:53:26 -07:00
Clayton Coleman
bb77a5d15f
Rename ID -> Name
2014-10-22 15:00:26 -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
Clayton Coleman
95cb2e3eb3
Refactor HealthCheck to take podUUID arguments
...
PodState is going away (won't have podUUID anymore)
2014-10-09 16:42:55 -04:00
Dawn Chen
39f648bda2
Fix rebase issues.
2014-10-06 13:37:23 -07:00
Dawn Chen
8d0ed93aa1
Clean unittests
2014-10-06 13:37:22 -07:00
Clayton Coleman
6881db64a9
Allow configurable Kubelet net image for isolated networks
...
Public access to the DockerHub is not guaranteed in all environments,
add a flag to the kubelet that allows it to use a different image (like
one on a private registry) as well as only pull the first time the
image is needed.
Fixes #1545
2014-10-02 15:56:03 -04:00
Eric Tune
9c0769422d
Directory renamed to Dir to match json property
2014-10-01 13:35:21 -07:00
Tim Hockin
1c02af3d16
Kill LivenessProbe.Type
2014-09-27 21:16:30 -07:00
Dawn Chen
01c9015ed3
use _ as the separator for docker container name.
2014-09-26 09:21:21 -07:00
Daniel Smith
283eaf3931
Add new Event type
...
* replaces previous Event type, which is too limited.
* Remove writing of old event type.
* Fix serialiazation test to automatically test all types.
2014-09-25 11:31:35 -07:00
Eric Paris
a32400f47f
Remove all code dealing with cadvisor Percentiles
...
This was removed upstream beween cadvisor 0.3.0 and 0.4.0
2014-09-22 14:22:40 -04:00
Brian Waldon
0bf4fabc19
kubelet: move docker-related code into sub-package
2014-09-11 13:12:28 -07:00
Dawn Chen
15cab4d053
Introduce the simplest RestartPolicy and handling.
2014-09-08 22:41:38 -07:00
Dawn Chen
7ace5a3e83
Passing pod UUID to Kubelet.
2014-09-08 14:24:09 -07:00
Brendan Burns
d0884accd7
Add support for the PostStart event handler.
2014-09-05 12:37:57 -07:00
Daniel Smith
97b05619f1
Remove deprecated bits from kubelet
2014-08-26 22:39:00 -07:00
Brendan Burns
556eb0f400
Add a run command to the kublet server
2014-08-26 13:57:44 -07:00
Tim Hockin
0f97a73c1b
Rename a bunch of "Make" functions to "New"
...
Also rename some to other names that make better reading. There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things. It seemed that "make" there seemed fine. "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
Brendan Burns
0caae9c1d4
Add a in container exec based health check.
2014-08-18 12:00:11 -07:00
Brendan Burns
2986db9885
Add container hashing to the container name, and restart containers on changes.
2014-08-08 13:32:07 -07:00
Daniel Smith
2297bf8cea
Merge pull request #830 from brendandburns/net
...
Delete containers for a pod if we have to create the network container.
2014-08-08 13:12:42 -07:00
Brendan Burns
38900a9c58
Delete containers for a pod if we have to create the network container.
2014-08-08 12:34:59 -07:00
Brendan Burns
d31d0781b2
Add support for "run in"
2014-08-07 20:27:58 -07:00
Clayton Coleman
f7149926c0
Remove expectNoError from client, kubelet, and util
2014-08-04 09:39:06 -04:00
Brendan Burns
490bb28bf9
Add TCP socket based health checking.
2014-08-01 14:13:56 -07:00
Jonathan Boulle
c43035088b
assorted formatting and typo fixes
2014-07-24 15:10:36 -07:00
Victor Marmol
b131da1cf5
Sync pods asynchronously in the Kubelet.
...
This makes two main changes:
- Runs syncPod in a separate Go routine (and enforces only one of those
runs at a time).
- Uses the pod list to determine if a container should be running or
should be killed (used to use the output of syncPod).
Since Docker pulls are synchronized by the Docker daemon we still block
on that, but pods can now be removed and prepared for starting without
blocking on long pulls.
2014-07-24 13:47:51 -07:00
Danny Jones
bfa4642055
Adds a flag to specify root working directory.
...
--root_dir specifies the directory kubelet will use for it's
procedures. Currently used for volume mounts.
2014-07-24 13:04:05 -07:00
Eric Tune
ded67ead1e
Make Kubelet type members private and provide New functions.
2014-07-22 14:40:59 -07:00
Clayton Coleman
7767c2a2ac
Switch the Kubelet to use kubelet/config
...
Also transfer the Kubelet from using ContainerManifest.ID to source specific
identifiers with namespacing. Move goroutine behavior out of kubelet/ and
into integration.go and cmd/kubelet/kubelet.go for better isolation.
2014-07-21 21:27:26 -04:00
Kelsey Hightower
67efa0a53a
Add test cases for Docker image name parsing and cleanup
...
The tests for Docker image name parsing are repetitive and do not
cover enough test cases.
Refactor the tests to use table testing and add additional test cases.
2014-07-20 19:22:54 -07:00
Daniel Smith
05f01a3654
Revert "assorted formatting and typo fixes"
2014-07-18 17:16:30 -07:00
Daniel Smith
211f6b312f
Merge pull request #520 from jonboulle/master
...
assorted formatting and typo fixes
2014-07-18 17:15:30 -07:00
Jonathan Boulle
9e63c3a633
assorted formatting and typo fixes
2014-07-18 13:02:59 -07:00
Tim Hockin
fda69bcca2
Merge pull request #452 from Sarsate/extvol-hostdir
...
Initial framework for external volumes.
2014-07-18 12:44:38 -07:00
Danny Jones
bb2843498d
API modified to use source; now supports EmptyDirectory
...
API is now modified to use a Source struct to handle multiple volumes.
Two volume types are supported now, HostDirectory and EmptyDirectory.
2014-07-17 15:25:50 -07:00
Nan Deng
564a58722c
Retrieve machine spec from cAdvisor
2014-07-17 15:21:47 -07:00
Danny Jones
f84ff740f0
Adds initial volumes package; Supports host-dirs
...
Adds the framework for external volume mounts.
Currently supports bare host directory mounts.
Modifies the API to support host directory mounts from Volumes
instead of VolumeMounts.
2014-07-17 10:08:45 -07:00
Clayton Coleman
185a97b037
Make container lookup in the Kubelet cleaner
...
Reduce duplicate calls to list lookups for parallel go routines.
2014-07-16 14:12:13 -04:00
Yuki Sonoda (Yugui)
c1eee00a57
Correct an error message
2014-07-16 21:33:26 +09:00
Daniel Smith
c7d31fabbc
Merge pull request #480 from monnand/cadvisor-update-1
...
Update kubelet package to use most recent cAdvisor's code
2014-07-15 18:25:54 -07:00
Daniel Smith
3d63d733e3
Merge pull request #456 from brendandburns/health
...
Move health checking logic out to a utility. Add a minion registry that health checks.
2014-07-15 15:39:21 -07:00
Brendan Burns
c5db874090
Addressed comments.
2014-07-15 15:16:36 -07:00
Nan Deng
30bc2af9f1
gofmt -r "GetContainerStats->GetContainerInfo"
2014-07-15 11:53:00 -07:00
Nan Deng
8c573ee727
Update to latest cAdvisor and use data structures directly from cAdvisor
2014-07-15 11:53:00 -07:00
Kouhei Ueno
bba23e28c2
Define EtcdErrorCode as constant and reuse EtcdError instances
2014-07-15 20:48:06 +09:00
Brendan Burns
62dfc74606
Move health checking logic out to a utility.
...
Add a minion registry that health checks.
2014-07-14 22:38:28 -07:00
Brendan Burns
1b4dfe7d14
Move from bool to HealthCheckStatus
2014-07-11 10:15:31 -07:00
Brendan Burns
6312ffebcf
Address some comments from thockin@
2014-07-11 10:14:45 -07:00
Yuki Sonoda (Yugui)
45b48e1668
Fixes golint errors in pkg/kubelet
2014-07-10 21:57:26 +09:00
Tim Hockin
b0b9606aea
Merge pull request #365 from brendandburns/health
...
add http health checks.
2014-07-09 16:14:30 -07:00
brendandburns
4c309862e3
Merge pull request #371 from thockin/valid3
...
Accumulate errors during validation
2014-07-09 13:36:37 -07:00
Tim Hockin
95fb7bc1ae
Merge pull request #379 from brendandburns/host
...
Add support for host up binding to the API (and kubelet)
2014-07-09 12:54:32 -07:00
Brendan Burns
41c6680943
add http health checks.
2014-07-09 12:01:43 -07:00
Dan Mace
00df67b0bf
Namespace "local" volume mounts by ContainerManifest ID on disk
...
Local volume mounts in a pod should result in host mounted directories
which are namespaced by the ContainerManifest ID.
2014-07-09 14:45:22 -04:00
Brendan Burns
4b22f7a462
Add support for host ip binding to the API (and kubelet)
2014-07-09 11:13:38 -07:00
Tim Hockin
54790080b3
Accumulate validation errors
...
Rather than report the first error, accumulate all errors and report them all
at once.
2014-07-09 07:55:15 -07:00
Tim Hockin
2eb2784725
Validation of HostPorts and Manifest IDs
...
Check that HostPorts are unique across the whole host and that Manifest IDs
are unique.
2014-07-08 15:22:47 -07:00
Tim Hockin
92cf6662ed
Merge pull request #351 from discordianfish/use-api-for-pull
...
Use api for pulling images instead of shelling out
2014-07-08 09:08:12 -07:00
Johannes 'fish' Ziemke
3fa6c9671d
Use docker client lib instead of binary for pulls
2014-07-08 12:21:39 +02:00
brendandburns
d386c02dfd
Merge pull request #328 from monnand/root-container
...
Get root container stats from cAdvisor
2014-07-02 22:57:28 -07:00
Nan Deng
42fd4383a1
Get machine stats from cAdvisor
2014-07-02 16:59:50 -07:00
Daniel Smith
a6144f656c
Move etcd helpers to tools package so they can depend on api package. Add ResourceVersion, hook it up to etcd index to get atomic PUTs.
2014-07-02 15:42:05 -07:00
Tim Hockin
d3da6b168e
nit: s/Id/ID/ for go style
2014-07-02 11:21:29 -07:00
Victor Marmol
e29ff512fc
Add a New() for Kubelet.
...
This will make it easier to add new fields that need to be initialized. Also refactors tests to ease making fake Kubelets.
2014-07-01 19:23:26 -07:00
brendandburns
67eae1f645
Merge pull request #331 from dchen1107/cleanup
...
Fixed the data race found in kubelet_test.go
2014-07-01 15:30:36 -07:00
Dawn Chen
17bad028ce
Fixed the data race found in kubelet_test.go
2014-07-01 15:15:40 -07:00
Clayton Coleman
15c96508a9
Use ID instead of Id (go style) everywhere
...
Fixes #278
2014-07-01 13:16:47 -04:00
Justin Huff
28afe91855
Allow empty lists when polling manifests via http
2014-06-27 23:46:02 -07:00
Daniel Smith
54ad4582e2
Fix unstable map ordering issue in test
2014-06-27 15:40:23 -07:00
Justin Huff
81663fdb80
Introduce a type for docker container ids
2014-06-27 14:03:50 -07:00
Justin Huff
fe0066d2e4
Cleaning up container ID handling inside kubelet
2014-06-27 14:03:50 -07:00
Justin Huff
6fdebd6560
Watch and Get on the same Etcd key.
...
Kubelet was killing existing pods when creating a new one because new
files were being set as /registry/hosts/<machine>/pods/<id> and
/registry/hosts/<machine>/kubelet.
2014-06-26 18:59:49 -07:00
Daniel Smith
be39c3d646
Fix crash in test
2014-06-26 16:56:02 -07:00
Daniel Smith
f7968ce00b
Make integration test the manifest url feature. Make kubelet's docker pull command testable.
2014-06-24 16:57:35 -07:00
Daniel Smith
6900431b13
Add kubelet testing to integration test. Test that kubelet makes the requested containers. Check that the url manifest feature works.
2014-06-24 15:14:40 -07:00
Daniel Smith
9d8a16f180
Make manifest url reader accept both single and multiple manifests.
2014-06-24 15:13:18 -07:00
Tim Hockin
7622bb871b
Rename Kubelet.Client -> EtcdClient
...
All the other *Client members are so named. Makes easier reading.
2014-06-24 13:17:38 -07:00
Daniel Smith
77af24e7dc
manifest_url needs to take a single ContainerManifest.
2014-06-23 15:06:28 -07:00
Daniel Smith
b850d36166
Fix boilerplate everywhere
2014-06-23 11:32:11 -07:00
Justin Huff
1441a84673
Cleanup handling of config channels in RunSyncLoop by passing a map
...
instead of a bunch of vars.
2014-06-22 09:32:49 -07:00
Justin Huff
460821e370
Add a k8s prefix to docker containers that we manage
2014-06-21 13:30:10 -07:00
Justin Huff
ecf7d11477
Make config dir handling deterministic
2014-06-20 09:31:52 -07:00