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
Yu-Ju Hong
0206115703
Merge pull request #5697 from vmarmol/doc
...
Correct documentation about stats arguments.
2015-03-20 14:22:33 -07:00
Victor Marmol
fc8f4411ef
Correct documentation about stats arguments.
2015-03-19 22:11:04 -07:00
Clayton Coleman
015bc3b7bd
Remove global map from healthz
...
It currently is impossible to use two healthz handlers on different
ports in the same process. This removes the global variables in favor
of requiring the consumer to specify all health checks up front.
2015-03-19 19:49:44 -04: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
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
Wojciech Tyczynski
5d95e9e671
Remove BoundPods from Kubelet
2015-03-16 19:17:21 +01: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
Victor Marmol
43b469bd9f
Rename cAdvisor info API to cadvisorApi
2015-03-06 16:06:38 -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
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
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
Jordan Liggitt
02622b1401
Plumb tls and cert options into kubelet start
2015-03-05 16:30:52 -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
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
Victor Marmol
f5beb04c53
Adding Prometheus /metrics handler.
2015-02-23 15:42:04 -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
8022c74b55
Merge pull request #4473 from xiang90/server
...
pkg/kubelet/server.go: minor fixes
2015-02-18 14:50:51 -08: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
Vishnu Kannan
922881fcd2
Improve error handling for '/containerLogs' API in kubelet.
2015-02-12 02:22:26 +00:00
Wojciech Tyczynski
1a3419f970
Fix the min allowed Docker version.
2015-02-05 02:34:04 +01:00
Wojciech Tyczynski
524cdba101
Fix hack/test-cmd.sh test.
2015-02-05 01:58:26 +01: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
Dawn Chen
15e9fa8a9d
Introduce PodStatusResult, and deprecate PodContainerInfo.
2015-01-16 09:10:40 -08:00
Tim Hockin
1be3de895c
Move util.UID to pkg/types
2015-01-14 15:22:21 -08:00
Tim Hockin
e86d4cd3c6
Use a strong type for UID fields
2015-01-14 13:53:43 -08:00
Clayton Coleman
ba53d723d3
Clean up how client is passed to Kubelet in preparation for reading pods
...
Also fixes how Kubelet server looks up pods by name when there are multiple
sources.
2015-01-07 14:40:37 -05:00
Vishnu Kannan
3ef9e404c1
Update "/stats" endpoint on kubelet to take namespace as an argument as part of the API.
2015-01-03 02:17:25 +00:00
Dawn Chen
71fc5940f1
suppress unnecessary stacktrace when http status code is redirect related.
2014-12-17 18:42:11 -08:00
Brendan Burns
928f52056e
Remove HTTP Server support for pushing pods onto the kubelet.
2014-12-17 17:15:36 -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
Brendan Burns
a6f967b6e7
Revert "Revert "Add an api object for the kubelet, and a versioned endpoint.""
...
This reverts commit dcfcf315e5
.
2014-12-15 09:29:04 -08:00
Brendan Burns
dcfcf315e5
Revert "Add an api object for the kubelet, and a versioned endpoint."
...
This reverts commit d4b9979382
.
2014-12-12 21:13:44 -08:00
Brendan Burns
d4b9979382
Add an api object for the kubelet, and a versioned endpoint.
2014-12-12 15:26:28 -08:00
Sam Ghods
9a9a1e0939
Move from go-yaml/yaml to ghodss/yaml
2014-12-02 16:24:05 -08:00
Tim Hockin
ea960711ff
Clean up error logs.
...
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines). Just accumulated nits.
2014-11-21 09:45:26 +08:00
jhadvig
dfa076b79a
Dumping kubelet write/read timeout
2014-11-10 17:09:50 +01:00
Dawn Chen
a1e79048a6
Add /podSpecs to Kubelet
2014-10-30 16:38:08 -07:00
Clayton Coleman
7550c146dc
Replace struct initializers for TypeMeta with ObjectMeta
2014-10-24 11:22:21 -04:00
Clayton Coleman
bb77a5d15f
Rename ID -> Name
2014-10-22 15:00:26 -04:00
Daniel Smith
91efe51770
Merge pull request #1829 from jhadvig/proxy_flush
...
Flush data periodically instead of their buffering
2014-10-21 17:01:15 -07:00
jhadvig
f759bfdf71
Implementing Flush method to httplog
2014-10-21 09:33:00 +02:00
Clayton Coleman
d0ef3f0596
ListenAndServe on Kubelet server should be a fatal error
2014-10-21 00:10:35 -04:00
Dawn Chen
8858c5f897
Merge pull request #1871 from derekwaynecarr/handle_container_logs_on_alternate_namespace
...
handleContainerLogs needs a namespace to address a pod
2014-10-17 15:42:11 -07:00