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
Dawn Chen
52e1ee9d5b
Merge pull request #5619 from vmarmol/rate
...
Spread out pod status updates to apiserver.
2015-03-18 17:26:02 -07:00
Victor Marmol
cda4b6c598
Spread out pod status updates to apiserver.
...
Lowers pod status interval to every 2m and spreads updates within that
time window.
2015-03-18 15:43:07 -07:00
Yifan Gu
027f6854d0
kubelet: Remove docker container in prober's interface
...
Also change
kubelet.docketIDToRef[dockertools.DockerID]*api.ObjectReference{} to
kubelet.containerIDToRef[string]*api.ObjectReference{}.
2015-03-18 14:28:27 -07:00
Yu-Ju Hong
6e8a8b741a
Kubelet: simplify the lock acquring pattern
...
Avoid holding both podStatusesLock and podLock at the same time.
2015-03-18 11:45:29 -07:00
Victor Marmol
9586b39bb7
Merge pull request #5555 from fgrzadkowski/sync_pod_status
...
Periodically update pod status from kubelet.
2015-03-18 10:14:07 -07:00
Dawn Chen
9e781bc57d
Merge pull request #5569 from vmarmol/image-gc
...
Garbage collecting images in the Kubelet.
2015-03-18 08:55:08 -07:00
Filip Grzadkowski
1a352b74ba
Periodically update pod status from kubelet.
2015-03-18 12:11:39 +01:00
Victor Marmol
d78ecf820e
Garbage collecting images in the Kubelet.
...
Integrated the imageManager into the Kubelet and applies the garbage
collection policy every 5 minutes. The default policy allows up to 90%
disk usage, after which images are garbage collected to bring limit back
down to 80%.
Fixes #157 .
2015-03-17 17:56:02 -07:00
Yu-Ju Hong
b84de4e986
Merge pull request #5571 from vmarmol/fix
...
Adding errors to Kubelet events.
2015-03-17 16:14:58 -07:00
Dawn Chen
cbe4a1a679
Merge pull request #5510 from vmarmol/gc
...
Introduce and implement container GC policy
2015-03-17 16:02:17 -07:00
Victor Marmol
0c664a343c
Adding errors to Kubelet events.
...
This will help while debugging issues that generate events.
Also removed unecessary log line.
2015-03-17 15:55:25 -07:00
Salvatore Dario Minonne
31ddefc347
Finalize fields.Selector
2015-03-17 22:55:43 +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
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
0cc2b62b4a
Merge pull request #5265 from ddysher/kubelet-post-status
...
kubelet post node status to master
2015-03-13 15:29:22 -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
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
Timothy St. Clair
308bb84cf3
Minor cleanup for etcd cleaning from kubelet
2015-03-12 09:39:22 -05: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
Deyuan Deng
9982aaa960
kubelet post node status to master
2015-03-10 23:17:36 -04: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
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
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
09af0cd3b5
Refactor pkg/kubelet/kubelet.go: probeContainer().
...
Split the function into probeContainerLiveness() and probeContainerReadiness().
2015-03-06 16:37:58 -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
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
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
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
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
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
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
Victor Marmol
c7e7ecdf2c
Handle crash in per-pod thread and container killer.
2015-02-27 16:33:46 -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
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
Yifan Gu
a631252abf
Remove outdated const.
2015-02-23 11:00:38 -08: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
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
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
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
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
Xiang Li
0e20f7d736
pkg/kubelet: recreate infra pod if the pod is changed
2015-02-18 15:05:16 -08:00
Wojciech Tyczynski
25c8f07c67
Batch updates of multiple Pods.
2015-02-18 16:46:16 +01: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
Xiang Li
042dc1faa3
pkg/kubelet: uncaptialize error message
2015-02-16 09:33:20 -08:00