Commit Graph

1824 Commits (282b5abfef05a3d6623f50878d27f5386f614ba9)

Author SHA1 Message Date
Tamer Tas f5d5befe17 Add documentation for pkg/kubelet/rkt 2015-08-10 19:34:36 +03:00
Marek Grabowski 5f9cefc1d8 Merge pull request #12441 from vlajos/typofixes-vlajos-20150807
typofix - https://github.com/vlajos/misspell_fixer
2015-08-10 16:33:52 +02:00
Marek Grabowski 8580e17ff1 Merge pull request #12374 from wulonghui/wulonghui-patch-1
Add NodeInternalIP for Node's Addresses when cloud provider is nil
2015-08-10 15:01:00 +02:00
peter-edge 0458d707ac use docker.NewClientFromEnv for creation of docker.Client 2015-08-10 13:29:56 +02:00
Marek Grabowski e034712456 Merge pull request #11788 from HaiyangDING/ImproveClarityResource
Improve clarity around PodFitsResource(issue#11453)
2015-08-10 09:56:32 +02:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Satnam Singh 4ece39ac20 Merge pull request #9452 from yifan-gu/img_pulling
kubelet: Add 'image pulling' event. Refactor dockerManager.createPodInfraContainer()
2015-08-07 15:23:24 -07:00
Satnam Singh bee48f4ce5 Merge pull request #12035 from AnanyaKumar/requests
Add support for request
2015-08-07 14:27:34 -07:00
Satnam Singh 950ec96db0 Merge pull request #12182 from AnanyaKumar/qos-node
Add QoS support on node
2015-08-07 14:27:02 -07:00
Yifan Gu 053db8dba7 kubelet/dockertools: Refactor image pulling for pod infra container.
Replace the trunk of pull image code with dockerManagner.pullImage().
Also add tests to verify the image pulling/pulled events.
2015-08-07 11:42:04 -07:00
Ananya Kumar 6ef3de1d5f Add QoS support on node 2015-08-07 11:18:16 -07:00
Yifan Gu eb0fb43453 kubelet: Add image pulling event.
Since it takes a while (1-2mins) for kubelet to pulling a big image
(>500MB). Just showing "Pending" for pod status is not very helpful.

This commit introduces a "pulling" event, and inserts it before the
kubelet starts to pull an image.
2015-08-07 10:50:39 -07:00
dinghaiyang dab7280ae4 Improve clarity around PodFitsResource by showing pods limits in `kubectl describe node` 2015-08-07 16:58:11 +08:00
wulonghui b50e736184 Add NodeInternalIP for Node's Addresses when cloud provider is nil 2015-08-07 09:08:56 +08:00
Rajat Chopra 1ce6d80a89 ipv6 test 2015-08-06 15:46:05 -07:00
Rajat Chopra 58a742e667 status hook for the container network 2015-08-06 15:46:04 -07:00
Wojciech Tyczynski 29aaf1a4d2 Merge pull request #12168 from brendandburns/stdin2
Support Stdin and TTY in the kubelet
2015-08-06 13:45:59 +02:00
Brendan Burns 901a04a3d6 Add support for interactive contaienrs to the kubelet 2015-08-05 22:14:56 -07:00
Mike Danese fe6b15ba2f rewrite all links to issues to k8s links 2015-08-05 21:11:11 -07:00
Ananya Kumar ef1e576810 Add support for request 2015-08-05 19:00:19 -07:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
deads2k 182885e897 make testclient more precise 2015-08-04 13:35:59 -04:00
Mike Danese a23ee556ad Merge pull request #11999 from brendandburns/attach2
Add support for attach to kubectl
2015-07-31 12:51:08 -07:00
Piotr Szczesniak 41de62b465 Merge pull request #12022 from piosz/cadvisor
Update cadvisor dependency
2015-07-31 05:56:36 +02:00
Mike Danese 9582c7e54e Merge pull request #12024 from a-robinson/metadata
Support passing a header to the manifest URL in the kubelet.
2015-07-30 13:46:22 -07:00
Brendan Burns e8e756a719 Add pod/attach to the APIServer. 2015-07-30 10:55:53 -07:00
Alex Robinson a9f0c4683f Limit the logging from kubelet attempting to read its manifest URL.
Without this, it logs an error every 20 seconds if nothing is at the
provided URL.
2015-07-30 17:47:33 +00:00
Alex Robinson cf011cad55 Support passing a header to the manifest URL in the kubelet.
Needed to support using GCE's v1 metadata API, which requires passing
the header "Metadata-Flavor: Google".
2015-07-30 17:11:27 +00:00
Piotr Szczesniak 7e305c43f0 Set maxHousekeepingInterval to 15 seconds. 2015-07-30 16:44:45 +02:00
Mike Danese 1b84fb7d74 make testclient threadsafe by guarding internal state with accessors 2015-07-29 16:17:17 -07:00
Mike Danese f18b09963e Merge pull request #11766 from deads2k/kubelet-prefers-ipv4
make kubelet prefer ipv4 address if available
2015-07-29 10:33:23 -07:00
deads2k 2c06f11052 make kubelet prefer ipv4 address if available 2015-07-28 15:45:57 -04:00
Brendan Burns 64be76c14d Add support for Attach to the kubelet.
This is a pre-cursor to supporting 'kubectl attach ...' and 'kubectl run -it ...'
2015-07-27 21:48:55 -07:00
Marek Grabowski 00cd52dd68 Merge pull request #10656 from krousey/timeouts
Adding proper timeouts.
2015-07-27 10:56:58 +02:00
Mike Danese b51b4e740f Merge pull request #10639 from caseydavenport/master
Allow specification of a network plugins directory when starting kubelet
2015-07-24 11:09:11 -07:00
Vish Kannan 136d53466a Merge pull request #10892 from nikhiljindal/beta1
Removing references to pre v1beta3 apis in code
2015-07-23 17:05:43 -07:00
Casey D aeb7dc6b30 Allow specification of network plugins directory when starting kubelet 2015-07-23 11:21:39 -07:00
Wojciech Tyczynski 6524cd5e2a Merge pull request #11562 from MikaelCluseau/master
realContainerGC reports warning when err is nil
2015-07-23 13:39:24 +02:00
Vish Kannan 4421b3dfdd Merge pull request #10821 from jimmidyson/gc-container-volumes
Fixes #10803: Delete Docker container volumes on GC
2015-07-22 16:02:03 -07:00
Mikaël Cluseau aff10f57bb realContainerGC reports warning when err is nil 2015-07-20 14:11:52 +11:00
Kris Rousey 1d033b9912 Adding proper timeouts. 2015-07-10 14:42:59 -07:00
Rohit Jnagal affba42a05 Merge pull request #10958 from cjcullen/racefix
Remove race in setting/reading kubelet.podCIDR
2015-07-10 10:09:44 -07:00
CJ Cullen da0bc5f690 Remove race in setting/reading kubelet.podCIDR 2015-07-08 14:58:14 -07:00
nikhiljindal fc4da6844e removing references to pre v1beta3 apis 2015-07-08 13:51:43 -07:00
Jimmi Dyson 8e482462fb Fixes #8945: Cleanup log symlinks on remove & dead log symlinks 2015-07-08 08:43:59 +01:00
Jimmi Dyson 159c3c87de Fixes #10803: Delete Docker container volumes on GC 2015-07-07 13:11:28 +01:00
Yu-Ju Hong b9cc548799 Merge pull request #10763 from bprashanth/timer_leak
Don't leak tickers during an exec probe
2015-07-06 11:59:24 -07:00
Yu-Ju Hong b58e7c8c2d Merge pull request #10655 from dchen1107/cadvisor
Set minimal shares for containers with no cpu specified
2015-07-06 11:38:54 -07:00
Prashanth Balasubramanian 33e2f7cb8b Don't leak tickers in the exec probe 2015-07-05 17:52:52 -07:00
Justin Santa Barbara fca7822800 Misc (non-code) spelling fixes 2015-07-04 10:39:37 -04:00
Dawn Chen 9ce11545c0 Explicitly configure master component containers and nginx with 200m each. 2015-07-02 10:46:39 -07:00
Nikhil Jindal 204b90e697 Merge pull request #10593 from lavalamp/kubeletRegister
Fix node not rejoining cluster on reboot
2015-07-02 10:39:17 -07:00
Wojciech Tyczynski ef41ceb3e4 Merge pull request #10646 from yujuhong/reduce_noise
Kubelet: stop logging "Error on reading termination-log..." messages
2015-07-02 09:32:27 +02:00
Dawn Chen 4b85e02504 Set minimal shares for containers with no cpu specified 2015-07-01 21:17:07 -07:00
Zach Loafman 700a6441de Merge pull request #10313 from yujuhong/kubelet_delete
Add an e2e test to verify that pods are deleted on nodes
2015-07-01 16:47:30 -07:00
nikhiljindal 274792d7bb Stop exposing v1beta3 by default 2015-07-01 14:38:02 -07:00
Yu-Ju Hong d6ff297a1f Kubelet: stop logging "Error on reading termination-log..." messages
If a pod was deleted and the associated volumes/directory were removed, there
could be a window where the pod worker is still active. If the pod worker tries
to inspect the logs, such an error would be logged. Since the pod has been
deleted, such error messages are meaningless.

This change stops logging this error, but stores the error string in the pod
status. The pod status will be updated for pods that are still alive, and will
be discarded eventually for deleted pods.
2015-07-01 14:20:42 -07:00
Zach Loafman 9363285b4a Merge pull request #10320 from yujuhong/kubelet_logging
Kubelet: add and modify some logging messsages
2015-07-01 14:16:23 -07:00
Daniel Smith 5911a12b14 Fix node not rejoining cluster on reboot
Also improve logging. Fixes #10368.

GCE's external ID apparently can change after a reboot.
2015-07-01 10:21:24 -07:00
Yu-Ju Hong de75a42cb2 Add a kubelet /runningpods endpoint
/runningpods returns a list of pods currently running on the kubelet. The list
is composed by examining the container runtime, and may be different from the
desired pods to run known by kubelet.

This is useful for tests to verify that pods are indeed deleted on nodes.
2015-06-29 11:29:23 -07:00
Prashanth Balasubramanian 029e0ad350 Kubelet doesn't fight apiserver for cputime on the master. 2015-06-28 19:53:35 -07:00
Robert Bailey 0048eae8eb Merge pull request #9965 from stevekuznetsov/skuznets/allow-https
Allowing for HTTPS Probes
2015-06-26 10:43:37 -07:00
Steve Kuznetsov 3008ff6150 Changed HTTPGetAction to allow user-defined schemes 2015-06-25 16:59:12 -04:00
Maxwell Forbes 1904d4e1ce Merge pull request #10330 from brendandburns/addon
Use the namespace of the pod when creating the mirror.
2015-06-25 10:04:25 -07:00
Maxwell Forbes 2bb4cf3f8f Merge pull request #10266 from ArtfulCoder/kubelet_resolv
update docker's resolv.conf file with options ndots:5
2015-06-25 09:54:36 -07:00
Abhishek Shah 23caf446ae update docker's resolv.conf file with options ndots:5 2015-06-24 23:33:58 -07:00
Brendan Burns c669fe300c Use the namespace of the pod when creating the mirror. 2015-06-24 21:49:40 -07:00
Maxwell Forbes 3afda5d566 Merge pull request #10312 from dchen1107/cleanup
Take 2: Fix the race between configuring cbr0 and restarting static pods
2015-06-24 17:59:50 -07:00
Maxwell Forbes 28946766a3 Merge pull request #9807 from krousey/container_manifest
Removing ContainerManifest
2015-06-24 17:55:29 -07:00
Dawn Chen 710fb4e413 add iptables rule for MASQUERADE for egress 2015-06-24 17:19:57 -07:00
Yu-Ju Hong f7fd7e9687 Kubelet: add and modify some logging messsages
This helps debug #6651
2015-06-24 16:29:19 -07:00
Maxwell Forbes befe545033 Merge pull request #10253 from yifan-gu/log
kubelet/status_manager: Small logging fix.
2015-06-24 15:01:40 -07:00
Kris Rousey d13421e084 Removing ContainerManifest 2015-06-24 11:31:34 -07:00
Dawn Chen 6ddfa512de Revert "Revert "Fix the race between configuring cbr0 and restarting static pods""
This reverts commit fd0a95dd12.
2015-06-24 11:10:10 -07:00
Piotr Szczesniak fd0a95dd12 Revert "Fix the race between configuring cbr0 and restarting static pods" 2015-06-24 09:56:49 +02:00
Jeff Lowdermilk f4e7b5480d Merge pull request #10249 from mikedanese/unlink-test-libs
unlink testlibs from kube-apiserver and kubelet, remove test flags
2015-06-23 17:16:31 -07:00
Jeff Lowdermilk 50d50a3cb8 Merge pull request #10211 from dchen1107/cleanup
Fix the race between configuring cbr0 and restarting static pods
2015-06-23 17:09:01 -07:00
Dawn Chen 9dbe6fe4e4 Added more comments. 2015-06-23 16:28:41 -07:00
Jeff Lowdermilk d212ea17cd Merge pull request #10182 from bprashanth/kubelet_status
Fix kubelet deadlock
2015-06-23 15:40:49 -07:00
Yifan Gu 384f022681 kubelet/status_manager: small logging fix. 2015-06-23 13:49:34 -07:00
Dawn Chen 23200d303f Fix several issues on running syncPods until network is configured.
Also fixed unittests and compiling.
2015-06-23 12:11:19 -07:00
Mike Danese 06c35a177c unlink testlibs from kube-apiserver and kubelet 2015-06-23 12:04:05 -07:00
Brendan Burns 192ffdfb25 Fix the container bridge so that it can create cbr0
Fix the kubelet so that it tries to sync status, even if Docker is down
2015-06-22 23:18:01 -07:00
Prashanth Balasubramanian af175cc00b Add a pod status equality method to the status manager. 2015-06-22 13:49:49 -07:00
Jeff Lowdermilk b7583b799f Merge pull request #10151 from brendandburns/explore
Remove some dead code.
2015-06-22 12:02:05 -07:00
Jeff Lowdermilk 85770295c2 Merge pull request #10004 from ArtfulCoder/kubelet_health
Augmented kubelet healthz with syncLoop check.
2015-06-22 10:53:05 -07:00
Prashanth Balasubramanian 5f61392e6f Add logging to debug container runtime failures 2015-06-22 10:22:35 -07:00
Prashanth Balasubramanian 64ad3e17ad Fix deadlock 2015-06-22 10:22:35 -07:00
Prashanth Balasubramanian 4b990d128a Don't flood the status manager with updates from multi-container pods 2015-06-22 10:22:28 -07:00
Anastasis Andronidis 101739a6be Added Reason in PodStatus 2015-06-21 17:05:34 +02:00
Brendan Burns 26b682d6a0 Remove some dead code. 2015-06-19 21:32:13 -07:00
Abhishek Shah 3556993179 Augmented kubelet healthz with syncLoop check.
Monit uses read-only port for health monitoring.
2015-06-19 18:14:01 -07:00
Satnam Singh 2012238204 Merge pull request #9457 from yujuhong/seen
Kubelet: record the initial pod processing latency
2015-06-19 15:24:16 -07:00
Yu-Ju Hong f96a8d0935 Kubelet: record the initial pod processing latency
Add a new latency metric for the time from seeing the pod for the first time
to starting a pod worker for it.

Also, change PodStartLatency to include this initial processing latency.
2015-06-19 12:07:55 -07:00
Yifan Gu 40e46bbb37 kubelet: Remove newTestKubeletWithFakeRuntime() and other depreciated functions.
This cleans up the kubelet tests. Almost no docker specified tests now.
2015-06-19 10:28:27 -07:00
Yifan Gu 91e198cb70 kubelet: Move TestSyncPodWithTerminationLog() to dockertools package.
Update the fakeOptionGenerator to create the pod container directory,
so that fake docker client can see and record the termination log path.
2015-06-19 10:28:27 -07:00
Yifan Gu 6ddffdd736 kubelet: Move TestPortForwardNoSuchContainer() to dockertools package.
Also refactor TestPortForward() to be neutral to container runtime.
2015-06-19 10:28:27 -07:00
Satnam Singh e584629272 Merge pull request #10048 from rajatchopra/master
Assign host's IPAddress to podIP when pod shares the host's network
2015-06-19 08:16:24 -07:00
Satnam Singh d06a460007 Merge pull request #10066 from dchen1107/clean
Make kubelet first acknowledge time of a pod as Pod.Status.StartTime.
2015-06-19 08:05:15 -07:00
Dawn Chen 1145e4b80a Make kubelet first acknowledge time of a pod as Pod.Status.StartTime. 2015-06-18 15:54:48 -07:00
Satnam Singh 4c13f8957d Merge pull request #10057 from justinsb/aws_id_as_name_2
Fix of reverted #9728
2015-06-18 14:07:21 -07:00
Justin Santa Barbara 27b02d0913 Fix kubelet unit test; populate NodeName
When we build a Kubelet directly we need to populate NodeName
as well as hostname, because we bypass the functions that normally
do this for us.
2015-06-18 12:40:55 -07:00
Justin Santa Barbara df87470ecf Allow cloud providers to return a node identifier different from the hostname 2015-06-18 12:40:05 -07:00
Justin Santa Barbara dee8d4b90b For kubelet, differentiate between the nodeName and the hostname
This will allow us to use a nodeName that is not the hostname,
for example on clouds where the hostname is not the natural identifier
for a node.
2015-06-18 12:40:01 -07:00
Rajat Chopra a6a57de646 Assign host's IPAddress to podIP when pod shares the host's network 2015-06-18 11:30:59 -07:00
Satnam Singh e4f5529a2d Revert "Allow nodename to be != hostname, use AWS instance ID on AWS" 2015-06-18 11:27:55 -07:00
Brendan Burns 51fb753e11 Update the kubelet to ignore syncing Pods until the container runtime is up. 2015-06-18 10:27:04 -07:00
Satnam Singh 790ca2344f Merge pull request #9728 from justinsb/aws_id_as_name
Allow nodename to be != hostname, use AWS instance ID on AWS
2015-06-18 10:17:39 -07:00
Saad Ali 544b16d873 Merge pull request #9750 from rjnagal/ux
Update cadvisor dependency.
2015-06-17 14:22:38 -07:00
Dawn Chen 32d5f463d2 Add a sanity check to memory limit for /docker-daemon, and allocate
at least 150Mi at least.
2015-06-17 12:51:11 -07:00
Dawn Chen ca95eb75e9 Configured resource-only container /docker-daemon with 70% of node memory
capacity. This is a workaround to docker memory leakage issue.
2015-06-17 11:40:30 -07:00
Saad Ali d5e00d3990 Merge pull request #9523 from bprashanth/kl_stats
Scrape /metrics of kubelets from e2e tests
2015-06-17 11:30:28 -07:00
gmarek c2c1045e09 Add startup latency e2e "test" 2015-06-17 17:40:07 +02:00
Justin Santa Barbara efaead81dc Allow cloud providers to return a node identifier different from the hostname 2015-06-17 00:40:43 -04:00
Justin Santa Barbara c28cdfbd43 For kubelet, differentiate between the nodeName and the hostname
This will allow us to use a nodeName that is not the hostname,
for example on clouds where the hostname is not the natural identifier
for a node.
2015-06-17 00:40:43 -04:00
Saad Ali 43889c612c Merge pull request #9918 from caesarxuchao/common_test
remove references to v1beta1 in common_test.go
2015-06-16 18:59:19 -07:00
Saad Ali cc5756b2fc Merge pull request #9809 from bprashanth/stats_cache
Use runtime cache to serve container /stats requests
2015-06-16 18:51:53 -07:00
Chao Xu b093af57ba cleanse common_test.go of v1beta1 2015-06-16 17:22:35 -07:00
Saad Ali 6ada940e7f Merge pull request #9706 from hurf/shorten_id
Shorten container ID in events
2015-06-16 15:58:30 -07:00
Saad Ali f82accda25 Merge pull request #9582 from mnagy/fix_quoting
Quote integers correctly
2015-06-16 15:55:58 -07:00
Andy Goldstein 7748a02e37 Eliminate possible infinite loop in exec
If a user starts an exec session with a shell and leaves it idle long
enough, they will eventually hit the Kubelet's HTTP server's read/write
timeout of 5 minutes. At this time, the StartExec call to Docker exits,
but if the user requested a TTY, the exec'd process does not exit.
After StartExec finishes, we try to determine the exit code of the
exec'd process, but in this case, we'll never get it. This change exits
the loop after 5 tries if the process is still running.
2015-06-16 15:44:09 -04:00
Prashanth Balasubramanian 831d7a36d0 Scrape /metrics of kubelets from e2e tests 2015-06-16 09:50:40 -07:00
Dawn Chen 80c48aedb2 Merge pull request #9824 from dchen1107/clean
explicitly applying oom_score_adj(0) to processes of user containers
2015-06-15 17:06:48 -07:00
Dawn Chen 14f78b74cc Fix the unittests cause by applying oom_score_adj (0) to the user containers. 2015-06-15 16:16:34 -07:00
Dawn Chen f6f9372d1a Apply oom_score_adj (0) to PID of user containers by default. 2015-06-15 16:16:34 -07:00
Fabio Yeon bb5d2101a1 Merge pull request #9765 from brendandburns/fix-kubelet
Fix a bug where the network container could be torn down before other pods
2015-06-15 15:09:01 -07:00
Fabio Yeon 5f361c17af Merge pull request #9759 from mikedanese/actually-fix-logging
Fix excessively verbose logging in master's kubelet
2015-06-15 13:35:33 -07:00
Prashanth Balasubramanian d761b1d4d7 Use runtime cache to serve container /stats requests 2015-06-15 12:39:25 -07:00
Rohit Jnagal 6849b381dc Update cadvisor dependency.
Godep also decided to remove unused appengine dependency.
2015-06-15 19:11:55 +00:00
hurf d58768b351 Shorten container ID in events
Log only first 12 characters of container ID in events.
2015-06-15 17:01:27 +08:00
Brendan Burns aac696d44c Fix a bug where the network container could be torn down before other pods.
This can break PreStop that hits localhost in the pod.
2015-06-12 21:18:40 -07:00
Mike Danese 64482907ab cover more codepaths that hit GetNode in standalone, as well as create better error message when we actually do hit GetNode() which is likely a programmer/config error 2015-06-12 17:45:17 -07:00
Abhi Shah cdef8ae844 Merge pull request #9749 from dchen1107/podstatus
Add logging at RunInContainer for future debugging docker exec issues.
2015-06-12 17:10:12 -07:00
Dawn Chen c1d1a01087 Add logging at RunInContainer for future debugging docker exec issues. 2015-06-12 16:38:24 -07:00
Dawn Chen b1bbf653ab Merge pull request #9680 from mikedanese/fix-readiness-probe
Fix ReadinessProbe: seperate readiness and liveness in the code
2015-06-12 16:10:21 -07:00
Abhi Shah 3ce7fe8310 Merge pull request #9722 from mikedanese/host-ip-spam
Fix spammy GetHostIP error log in kubelet
2015-06-12 15:26:54 -07:00
Abhi Shah 928971cea4 Merge pull request #9710 from mesosphere/public-get-phase
export kubelet.GetPhase
2015-06-12 13:46:35 -07:00
Mike Danese 5896ac9e07 skip GetHostIP call on standalone mode kubelet to fix spammy log statement 2015-06-12 11:37:53 -07:00
Abhi Shah 52db576617 Merge pull request #8882 from mesosphere/upstream_k8sm
Upstream Kubernetes-Mesos framework
2015-06-12 06:36:20 -07:00
James DeFelice 3cf7739b42 export kubelet.GetPhase 2015-06-12 11:11:53 +00:00
Prashanth Balasubramanian b5ed0e9b13 Dont generatePodStatus twice for new pods 2015-06-11 17:18:16 -07:00
Mike Danese 35771acdfa seperate readiness and liveness in the code 2015-06-11 15:09:27 -07:00
James DeFelice 7d66559725 added comments at the top of native k8s files which, if changed, might affect some of the k8sm code 2015-06-10 20:31:22 +00:00
Martin Nagy ff2b5b78fa Quote integers correctly 2015-06-10 17:50:58 +02:00
krousey f62a2a1bb6 Merge pull request #9451 from cjcullen/mig
Use Node IP Address instead of Node.Name in minion.ResourceLocation.
2015-06-09 15:52:12 -07:00
krousey f413f30bea Merge pull request #9424 from mesosphere/export-generate-pod-status
add GetRuntime() to Kubelet for easier integration with 3rd party kubele…
2015-06-09 14:17:30 -07:00
krousey dd1f4f392f Merge pull request #9425 from mesosphere/update-testify-dep
Update github.com/stretchr/testify rev to 7e4a149
2015-06-09 11:59:00 -07:00
James DeFelice 257bc9b1a3 add GetRuntime() to simplify integration with 3rd party kubelet extensions like kubernetes-mesos 2015-06-09 13:27:34 +00:00
CJ Cullen 2d85e4a094 Use Node IP Address instead of Node.Name in minion.ResourceLocation.
Refactor GetNodeHostIP into pkg/util/node (instead of pkg/util to break import cycle).

Include internalIP in gce NodeAddresses.
2015-06-08 16:58:00 -07:00
Tomás Senart 2a3ffe4038 kubelet: Use assert.EqualValues instead of assert.Equal
The last update to github.com/stretchr/testify makes `assert.Equal`
consider the type of its arguments. This commit makes this test pass
again by only testing for value equality using `assert.EqualValues`.
2015-06-08 22:01:48 +02:00
krousey 66d2e1cb92 Merge pull request #9358 from dchen1107/podstatus
Passing memory swap limit -1 by default. Docker remote API never chec…
2015-06-08 10:19:28 -07:00
Dawn Chen f714020a7a Passing memory swap limit -1 by default. Docker remote API never check if memory
swap is enabled by kernel or not, instead by default to set the limit to
memory * 2, and return API error 500 if swap is not enabled.
2015-06-05 18:12:05 -07:00
Prashanth Balasubramanian 99f8ddf304 Enable profiling endpoints for kubelet 2015-06-05 12:50:57 -07:00
Dawn Chen 636b40ffa1 Filtered out unfriendly error from docker when registry is not reachable(code: 502, 503, 504) 2015-06-05 11:29:35 -07:00
Yifan Gu f197a9db4e kubelet: Minor refactors.
Remove some TODOs.
Unexport DockerManager.Puller and DockerManager.PodInfraContainerImage.
Add "docker" for all "go-dockerclient" imports.
2015-06-04 16:08:45 -07:00
Yu-Ju Hong 46e29cfb70 Kubelet: fix the warning message 2015-06-04 11:07:08 -07:00
Brian Grant 656fa7bea1 Merge pull request #9225 from caesarxuchao/add-v1-tests-general
Add v1 tests
2015-06-03 22:18:21 -07:00
Chao Xu ca72165b20 remove most references to api.PreV1Beta3 2015-06-03 20:09:03 -07:00
Brian Grant f72fa67924 Revert "Use Node IP Address instead of Node.Name in minion.ResourceLocation." 2015-06-03 18:19:22 -07:00
Chao Xu 97b29c7fe6 in pkg/kubelet/config/commont_test.go, remove check for v1beta1, add test cases for all registered version 2015-06-03 16:07:00 -07:00
Daniel Smith 3f454b7599 remove ro refs from more places 2015-06-03 15:41:09 -07:00
Chao Xu d52cef11a4 add v1 tests to hack/test-go; let default value of Container.SecurityContext to be nil 2015-06-03 09:50:41 -07:00
Brian Grant 36a4ece87a Merge pull request #9080 from thockin/dns-new-search-kubelet
Insert 'svc' into the DNS search paths
2015-06-02 22:54:07 -07:00
Brian Grant d4acb1d676 Merge pull request #9155 from cjcullen/mig
Use Node IP Address instead of Node.Name in minion.ResourceLocation.
2015-06-02 22:51:20 -07:00
Brian Grant be2547bc39 Merge pull request #9149 from vmarmol/docker-errors
Kubelet: Add metric for tracking Docker error count
2015-06-02 22:50:50 -07:00
CJ Cullen 4e5d0da839 Use Node IP Address instead of Node.Name in minion.ResourceLocation.
Refactor GetNodeHostIP into pkg/util/node (instead of pkg/util to break import cycle).

Include internalIP in gce NodeAddresses. Remove NodeLegacyHostIP
2015-06-02 20:01:49 -07:00
Victor Marmol 6b0d3d8df0 Add DockerErrors metric in the Kubelet.
Allows the tracking of errors by Docker operation.
2015-06-02 17:38:09 -07:00
Victor Marmol 1a805c711a Refactoring handling of latency recording. 2015-06-02 17:29:13 -07:00
Yu-Ju Hong 64aa958efb Make PodList span multiple lines for readability 2015-06-02 15:03:38 -07:00
Yu-Ju Hong 55f7b9b9b1 Adapt most CommandRunner tests to use FakeRuntime 2015-06-02 15:03:38 -07:00
Yu-Ju Hong b3197bb49b Switch more tests from newTestKubelet to newTestKubeletWithFakeRuntime 2015-06-02 15:03:38 -07:00
Yu-Ju Hong d4034f9c43 Move more docker-specific tests to dockertools/manager_test.go 2015-06-02 15:03:33 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Brian Grant 8a9700b2ba Merge pull request #8864 from ncdc/pluggable-docker-exec
Add support for pluggable Docker exec handlers
2015-06-02 14:13:06 -07:00
Brian Grant 0a28edf6e7 Merge pull request #8698 from vmarmol/with-limits
Reserve node resources for node services
2015-06-02 13:05:29 -07:00
Tim Hockin a826529573 Insert 'svc' into the DNS search paths
Fixes #8569.

This requires the DNS server to be running kube2sky v1.6 or higher (part of
release 0.18).  Users with older kube2sky MUST NOT update to this kubelet until
they upgrade DNS.  Versions of kube2sky >= 1.6 support both old and new style
names.  Old style names are deprectaed and will be removed around the time of
kubernetes v1.0 release.
2015-06-01 17:02:17 -07:00
Clayton Coleman 72ee028cab Gracefully delete pods from the Kubelet
This commit wires together the graceful delete option for pods
on the Kubelet.  When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default.  The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.

When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker.  When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04:00
Andy Goldstein 2a0d7ebb11 Add support for pluggable Docker exec handlers
Add support for pluggable Docker exec handlers. The default handler is
now Docker's native exec API call. The previous default, nsenter, can be
selected by passing --docker-exec-handler=nsenter when starting the
kubelet.
2015-06-01 16:59:59 -04:00
Victor Marmol 7283e662b5 Introduce SystemContainer to Kubelet ContainerManager.
This generalizes the handling of containers in the
ContainerManager.

Also introduces the ability to determine how much
resources are reserved for those system containers.
2015-05-29 17:32:34 -07:00
Kris f4e2c738f6 Delete deprecated API versions
pkg/service:

There were a couple of references here just as a reminder to change the
behavior of findPort. As of v1beta3, TargetPort was always defaulted, so
we could remove findDefaultPort and related tests.

pkg/apiserver:

The tests were using versioned API codecs for some of their encoding
tests. Necessary API types had to be written and registered with the
fake versioned codecs.

pkg/kubectl:

Some tests were converted to current versions where it made sense.
2015-05-29 17:17:35 -07:00
Rohit Jnagal 233ce46b83 Merge pull request #8923 from caesarxuchao/TerminationToTerminated
Update ContainerState.Termination to ContainerState.Terminated
2015-05-29 14:51:09 -07:00
Rohit Jnagal 50b9d6284a Merge pull request #8681 from vmarmol/system-container
Create a system container
2015-05-29 09:41:06 -07:00
Chao Xu 2f6e5e2e08 Update ContainerState.Termination to ContainerState.Terminated in pkg/api/types.go and pkg/api/v1/types.go 2015-05-28 17:18:24 -07:00
Tim Hockin bade36c7dd Merge pull request #8826 from markturansky/b2d_fix
Fixed setNodeStatus to allow running on pods on OS X
2015-05-28 16:54:42 -07:00
Tim Hockin 4318ca5a8b Rename 'portal IP' to 'cluster IP' most everywhere
This covers obvious transforms, but not --portal_net, $PORTAL_NET and
similar.
2015-05-28 16:10:44 -07:00
Tim Hockin 32bb3ae8f1 Merge pull request #7775 from simon3z/cloud-provider-id
api: add the ProviderID attribute to NodeSpec
2015-05-28 15:54:00 -07:00
Tim Hockin 081ab3abac Merge pull request #8853 from caesarxuchao/HostToNodeName
update PodSpec.Host to PodSpec.NodeName
2015-05-28 15:50:12 -07:00
Tim Hockin 3830c068b9 Merge pull request #8883 from yujuhong/kubelet_unittest2
Kubelet: clean up more unit tests
2015-05-28 15:00:02 -07:00
Chao Xu 9c1153322e update PodSpec.Host to PodSpec.NodeName in /pkg/api/types.go and /pkg/api/v1beta3/types.go 2015-05-28 14:10:06 -07:00
Federico Simoncelli 2a89428d44 api: add the ProviderID attribute to NodeSpec
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-28 13:01:58 -04:00
markturansky 8aa3cb22b5 added pod capacity to node.Status when cadvisor unavailable. defaults to kubelet's pod list length 2015-05-28 10:53:08 -04:00
Tim Hockin c40dd59130 Merge pull request #8885 from lavalamp/no-ro-kubelettest
remove RO port from kubelet test
2015-05-27 16:25:33 -07:00
Brendan Burns 2ec4b409e1 Make exec more consistent with the rest of the kubectl commands. 2015-05-27 15:47:32 -07:00
Daniel Smith ddcd2c89de remove RO port from kubelet test 2015-05-27 13:46:32 -07:00
Yu-Ju Hong d9339fedbe Modify more tests to use FakeRuntime in kubelet_test.go 2015-05-27 13:01:45 -07:00
Yu-Ju Hong 697312bcd7 Migrate more docker-specific tests to dockertools/manager_test.go 2015-05-27 12:42:59 -07:00
Yu-Ju Hong 044894665d Delete TestSyncPodsDeletes in kubelet_test.go
This test verifies that kubelet doesn't kill non-kubelet-managed containers.
This is obsolete now since container runtime provides only the KillPod
function, and has no support for killing a container.
2015-05-27 10:02:52 -07:00
Yu-Ju Hong ef5bef914f Kubelet: switch cadvisor-related unit tests to use FakeRuntime 2015-05-27 09:58:50 -07:00
Paul Morie 8b338860aa Make kubelet expand var refs in cmd, args, env 2015-05-27 00:13:57 -04:00
Victor Marmol 9a2630ac6e Make system container name configurable. 2015-05-26 20:49:55 -07:00
Victor Marmol ddec34a000 Have the ContainerManager create a system container.
The system container is a resource-only container which contains all
non-kernel processes that are not already part of a container. This will
allow monitoring of their resource usage and limiting it (eventually).
2015-05-26 20:49:55 -07:00
Saad Ali 9ca4fb40dc Merge pull request #8844 from yujuhong/kubelet_unittest
Kubelet: clean up unit tests
2015-05-26 18:29:48 -07:00
Yu-Ju Hong 9a71fb9373 Kubelet: clean up kubelet_test.go
* Start using FakeRuntime to replace FakeDockerClient in unit tests.
 * Move and adapt docker-specific tests (e.g. creating/deleting infra
   containers) to manager_test.go in dockertools.
2015-05-26 17:11:24 -07:00
Yu-Ju Hong 8ea88d58d4 Kubelet: make FakeRuntime implement Runtime
We should start using FakeRuntime in kubelet_test.go. First, make it implement
Runtime correctly.
2015-05-26 16:49:46 -07:00
CJ Cullen 197115853e Report node.Ready == false until cbr0 is configured correctly 2015-05-26 10:48:29 -07:00
Robert Bailey 3302628db3 Fix kubelet tests for systems without functional dns to look up localhost. 2015-05-22 14:32:51 -07:00
Dawn Chen 677a4aa1a7 Merge pull request #8164 from cjcullen/cloudprovider
Route creation reconciler loop.
2015-05-22 12:27:50 -07:00
Tim Hockin a29240f2c5 reduce verbosity of log line 2015-05-21 13:09:18 -07:00
David Oppenheimer 6b428ef1a8 Merge pull request #7170 from simon3z/node-events
Node events recording fixes
2015-05-21 12:54:38 -07:00
Dawn Chen 017fb6a818 Merge pull request #8575 from yifan-gu/kube_refactor
Minor kubelet/rkt refactors
2015-05-21 09:37:31 -07:00
Dawn Chen 0710976d43 Merge pull request #8490 from thockin/diff-proto
Allow same-hostport-different-protocol
2015-05-21 09:16:16 -07:00
Dawn Chen 9a5b05312f Merge pull request #8238 from thockin/probe-logs
Better kubelet logging for probes
2015-05-21 09:11:11 -07:00
Federico Simoncelli fefc65164a kubelet: fix node ready condition logic
Fixes #8585

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-20 20:03:57 -04:00
Federico Simoncelli 2f503c57a5 nodecontroller: improve node status event recording
This patch substitutes the misleading reason "unknown" for the event
recording. For symmetry with kubelet's message "online" the conditions
Unknown and False are reported as "offline".

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-20 18:46:01 -04:00
CJ Cullen bf646abf8d Revert "Revert "Modify nodes to register directly with the master.""
This reverts commit c53786ab31.
2015-05-20 14:21:03 -07:00
Quinton Hoole c53786ab31 Revert "Modify nodes to register directly with the master." 2015-05-20 13:47:51 -07:00
Yifan Gu 6a5681e0fe kubelet: Move HashContainer to kubelet/container package. 2015-05-20 12:08:32 -07:00
Tim Hockin 9117a757e2 Revert "Introduce an 'svc' segment for DNS search" 2015-05-20 09:04:15 -07:00
Tim Hockin 75617e8760 Better kubelet logging for probes
Log when we actually run probes and event when they fail.  Print the output of
a probe, too.
2015-05-20 08:56:45 -07:00
Eric Tune 1f4172d23c Merge pull request #6949 from roberthbailey/node-register
Modify nodes to register directly with the master.
2015-05-19 11:29:43 -07:00
Dawn Chen 349d8b1a67 Merge pull request #8491 from vmarmol/fix-isolation
Fix setting resource isolation in Docker 1.6+
2015-05-19 11:26:27 -07:00
Daniel Smith 181124bc9b Merge pull request #7974 from deads2k/attach-pull-secrets-to-pods
Attach pull secrets to pods
2015-05-19 10:26:39 -07:00
Tim Hockin 711fa2f2c6 fix 2015-05-19 10:17:53 -07:00
Tim Hockin c7bf373d98 Allow same-hostport-different-protocol 2015-05-19 10:00:35 -07:00
Robert Bailey 01467e0bb8 Modify nodes to register directly with the master.
- Delete nodes when they are no longer ready and don't exist in the
cloud provider.
 - Label each node with it's hostname.
 - Add flag to skip node registration.
 - Add a test for registering an existing node.
2015-05-19 09:55:07 -07:00
deads2k 72c0709f18 reduce scope of DockerConfigEntryWithAuth 2015-05-19 12:41:03 -04:00
Victor Marmol deaa0e569d Set CPU and memory in Create() and Start().
This allows for backwards and forwards compatability since old Docker
versions expect it in Create() and newer ones do so in Start().

Fixes #8358
2015-05-19 09:26:15 -07:00
Brian Grant 2c81050e6f Merge pull request #8457 from davidopp/master
Fix stylistic isues with #5547. Closes #4910.
2015-05-19 07:43:21 -07:00
deads2k 5458f05679 create LocalObjectReference 2015-05-19 08:39:46 -04:00
David Oppenheimer 44b1e1ca0c Fix stylistic isues with #5547. Closes #4910. 2015-05-18 23:32:06 -07:00
Brian Grant 03535478a2 Merge pull request #8440 from thockin/api-type-names
Rename a few API types (non-breaking change)
2015-05-18 18:48:16 -07:00
Victor Marmol c5da035d51 Merge pull request #8421 from yujuhong/active_deadline
Kubelet: move active deadline check to per pod worker
2015-05-18 17:42:21 -07:00
Tim Hockin 65833e42c4 rename CapabilityType Capability 2015-05-18 17:21:30 -07:00
Paul Morie a58c7a0de7 rename rkt makeruntimePod 2015-05-18 19:24:10 -04:00
Vish Kannan c5f7ee6f96 Merge pull request #8430 from vmarmol/logging
Don't run OOM watcher is cAdvisor is not available.
2015-05-18 14:41:24 -07:00
Yu-Ju Hong 2bf0646c76 Kubelet: do not remove directories of terminated pods
We recently changed `SyncPods` to filter out terminated pods at the beginning
for two reasons:

 * performance: kubelet no longer keeps goroutines to checks containers for
   terminated pods.
 * correctness: kubelet relies on inspecting dead containers to generate
   pod status. Because dead containers may get garbage collected and
   kubelet does not have checkpoints yet, syncing terminated pod could
   lead to modifying the status of a terminated pod.

However, even though kubelet should not *sync* the terminated pods, it
should not attempt to remove the directories and volumes for such
pods as long as they have not been deleted. This change fixes aggresive
directory removal by passing all pods (including terminated pods) to the
cleanup functions.
2015-05-18 13:23:49 -07:00
deads2k 0c14e0cbdb add pull secret references to pods 2015-05-18 16:18:16 -04:00
Victor Marmol 4a1100bb66 Don't run OOM watcher is cAdvisor is not available.
Fixes #8424.
2015-05-18 12:18:12 -07:00
Victor Marmol a7341cfb77 Merge pull request #8386 from smarterclayton/make_kubelet_consumable
Make it easier to reuse kubelet server code
2015-05-18 11:26:55 -07:00
Victor Marmol 45874d5f76 Merge pull request #5547 from gmarek/client3
Add a resource specifying number of Pods that are allowed to run on Kubelet.
2015-05-18 11:11:43 -07:00
Yu-Ju Hong 050b8ba60b Kubelet: move active deadline check to per pod worker
Per-pod workers have sufficient knowledge to determine whether a pod has
exceeded the active deadline, and they set the status at the end of each sync.
Move the active deadline check to generatePodStatus so that per pod workers
can update the pod status directly. This eliminates the possibility of a race
condition where both SyncPods and the pod worker are updating the status, which
could lead to temporary erratic pod status behavior (pod phase: failed ->
running -> failed).
2015-05-18 10:52:41 -07:00
Yu-Ju Hong 25668ccc11 Kubelet: remove the getPodstatus method
Pod statuses are periodically writtien to the status manager, and status
manager sets the start time of the pod. All non-status-modifying code should
perform cache lookup and should not attempt to generate pod status on its own.
2015-05-18 10:52:36 -07:00
Satnam Singh 26b27b5e0f Merge pull request #8374 from jimmidyson/docker-log-symlink-separator
Docker log symlinks should use underscore separator
2015-05-18 08:59:07 -07:00
Michal Fojtik 7d11e226b7 Disable 'Timestamps' in Docker logs to prevent double-timestamps 2015-05-18 12:27:19 +02:00
Clayton Coleman 1f628f2340 Bump fake docker version to emulate Docker 1.6 2015-05-16 16:10:49 -04:00
Jimmi Dyson 2d4067f1fd Fixes #8374: Underscore separator in docker log symlink 2015-05-16 19:19:27 +01:00
Yu-Ju Hong e1a153e841 Merge pull request #8340 from dchen1107/clean
Wait for docker to start cadvisor.
2015-05-15 14:36:10 -07:00
Yu-Ju Hong b8dd790ca1 Merge pull request #8284 from yifan-gu/rkt_fix
kubelet/rkt: Fix rkt status parsing, and resource requirement convert…
2015-05-15 14:30:48 -07:00
Yifan Gu aa7393b55e kubelet/rkt: Fix rkt status parsing, and resource requirement convertion. 2015-05-15 13:42:36 -07:00
derekwaynecarr 8216332611 Kubelet kills a pod that exceeds ActiveDeadlineSeconds 2015-05-15 16:33:37 -04:00
Dawn Chen 85ca8506bb Wait for docker to start cadvisor. 2015-05-15 13:24:24 -07:00
Victor Marmol 43e4654333 Merge pull request #8292 from yujuhong/rm_podinfo
Remove /podInfo endpoint on kubelet
2015-05-15 08:42:02 -07:00
Victor Marmol e7750fa0c7 Merge pull request #8274 from yujuhong/filter_terminated
kubelet: filter out terminated pods before rejecting pods
2015-05-15 08:02:44 -07:00
gmarek 27d660d0ac Add a resource specifying number of Pods that are allowed to run on Kubelet. 2015-05-15 10:57:46 +02:00
Victor Marmol 296152ec6d Merge pull request #8281 from dchen1107/cleanup
OOM protected docker processes (-900)
2015-05-14 18:26:30 -07:00
Yu-Ju Hong 4b40db3367 Remove /podInfo endpoint on kubelet
Kubelet sends pod status updates to the API server now. This endpoint is no
longer needed.
2015-05-14 17:51:26 -07:00
Dawn Chen ebbb130af8 OOM protected docker processes (-900) 2015-05-14 15:49:12 -07:00
Victor Marmol 353f304433 Merge pull request #8228 from yifan-gu/rkt_image_cat
kubelet/rkt: Add getImageManifest()
2015-05-14 13:32:52 -07:00
Yu-Ju Hong a2d04a84de kubelet: filter out terminated pods before rejecting pods
Currently, kubelet doesn't filter out terminated pods before determining whether
a pod fits. This could lead to duplicated events for rejecting the pods. This
change fixes that.

This change also groups all related pod fitness checking functions into one
function to improve readability.
2015-05-14 13:02:36 -07:00
Yifan Gu daf7c8d686 kubelet/rkt: Use RunContainerOptions to get the arguments. 2015-05-14 12:03:11 -07:00
Yifan Gu 2a87d56171 kubelet/rkt: Add getImageManifest() to retrive the image manifest for container. 2015-05-14 12:03:11 -07:00
Rohit Jnagal 532f6fdcef Merge pull request #7955 from hurf/refactor_scheduler
Move pkg/scheduler to plugin/pkg/scheduler
2015-05-14 10:28:52 -07:00
Dawn Chen 309a157665 Merge pull request #7984 from cjcullen/kubelet
Kubelet configure cbr0 instead of configure-vm.sh
2015-05-13 17:32:52 -07:00
Victor Marmol 67eab52b9e Merge pull request #8146 from yifan-gu/runtime_opt
kubelet/container: Refactor RunContainerOptions.
2015-05-13 11:09:56 -07:00
Yifan Gu 2617cb26b8 kubelet/container: Add tests for kubelet.makePortMappings(). 2015-05-13 10:01:01 -07:00
Yifan Gu d164ac0ba0 kubelet/container: Refactor RunContainerOptions.
Make Envs, Mounts, PortMappings more generic.
Also add default name for PortMapping if it's not specified.
2015-05-13 10:01:00 -07:00
Victor Marmol 67d576cf48 Merge pull request #8161 from rjnagal/rc
Use non-root available space to trigger out-of-disk events.
2015-05-13 08:07:37 -07:00
hurf 6203ce9f85 Move pkg/scheduler to plugin/pkg/scheduler
As the TODO in plugin/pkg/scheduler/scheduler.go described:

move everything from pkg/scheduler into this package. Remove
references from registry.
2015-05-13 14:03:25 +08:00
CJ Cullen 31ea7d1295 Put cbr0-modifying stuff behind a flag. Address some other comments. 2015-05-12 23:00:28 -07:00
CJ Cullen 5e3d2b9138 Kubelet configure cbr0 instead of configure-vm.sh 2015-05-12 23:00:12 -07:00
Rohit Jnagal 7a2add5e0a Use non-root available space to trigger out-of-disk events. 2015-05-13 05:46:03 +00:00
Brendan Burns 3f49c556e6 Second try at implementing prestop. 2015-05-12 17:17:03 -07:00
Victor Marmol 40ec627cd4 Merge pull request #8108 from rjnagal/kubelet
Handle out of disk situation on kubelet.
2015-05-12 15:49:31 -07:00
Victor Marmol 3481db8aee Merge pull request #8136 from yifan-gu/runtime_opt
kubelet/container: Remove ipcMode and netMode from  RunContainerOptions.
2015-05-12 14:41:49 -07:00
Yifan Gu a2dac158c2 kubelet/container: Remove ipcMode and netMode from RunContainerOptions.
Since createPodInfraContainer() is moved into dockertools. There is no
need to pass the ipcMode or netMode via RunContainerOptions.
2015-05-12 14:18:00 -07:00
Paul Morie 6ac55002d8 Improve kubelet test for env vars 2015-05-12 17:14:32 -04:00
Rohit Jnagal fab980598a Merge pull request #8122 from vmarmol/docker-container
Run Docker Daemon in a Resource-only Container
2015-05-12 13:16:05 -07:00
Vish Kannan a74522a738 Merge pull request #8011 from brendandburns/exec
Switch exec to look at exit code not output status.
2015-05-12 12:43:11 -07:00
Rohit Jnagal 2cf0dfb79d Handle out of disk situation on kubelets.
Kubelet will stop accepting new pods if it detects low disk space on root fs or fs holding docker images.
Running pods are not affected. low-diskspace-threshold-mb is used to configure the low diskspace threshold.
2015-05-12 18:23:09 +00:00
Victor Marmol e1447618f4 Integrating ContainerManager into Kubelet 2015-05-12 10:13:23 -07:00
Victor Marmol a9db69ecfa Implementation of ContainerManager
Implementation maintains a thread which ensures that the Docker daemon
is in a container.
2015-05-12 09:59:47 -07:00
Victor Marmol 0570480242 Kubelet: Add ContainerManager interface.
This component will manage containers on the machine not managed by the
runtime.
2015-05-12 09:58:21 -07:00
Rohit Jnagal 9eb01a6da1 Make SyncPodSync as the default SyncPodType.
We would like the default to be sync instead of create to easily differentiate
create operations in empty metrics map.
2015-05-12 06:25:48 +00:00
Tim Hockin 41033af256 Introduce an 'svc' segment for DNS search 2015-05-11 17:20:44 -07:00
Victor Marmol 43029345f9 Merge pull request #7973 from dchen1107/podstatus
Add kubectl log --previous support to view last terminated container log
2015-05-11 17:08:45 -07:00
Brendan Burns fbd0143fa8 Merge pull request #7971 from deads2k/make-docker-keyring-handle-multiple-hits
make the dockerkeyring handle mutiple matching credentials
2015-05-11 17:01:37 -07:00
Victor Marmol 1465475401 Merge pull request #8079 from yifan-gu/rm_command_runner
kubelet/container: Move prober.ContainerCommandRunner to container.
2015-05-11 16:05:25 -07:00
Yifan Gu 7831b7da72 kubelet/container: Move prober.ContainerCommandRunner to container.
Also include the ContainerCommandRunner in Runtime interface, but
still keep the ContainerCommandRunner interface for testability.
2015-05-11 15:32:51 -07:00
Yu-Ju Hong 3f791db886 Kubelet: remove unused getHostFieldLabel function 2015-05-11 14:39:22 -07:00
Yu-Ju Hong 8b3130b112 Merge pull request #7980 from yifan-gu/fix_kubelet_tests
kubelet: Fix racy kubelet tests.
2015-05-11 14:09:44 -07:00
Dawn Chen 86479cc56c Add support to pull log for last terminated container 2015-05-11 12:54:04 -07:00
Yifan Gu 85b453091b kubelet: Add tests for fakePodWorkders. 2015-05-11 12:50:33 -07:00
Yifan Gu 52af792852 kubelet: Fix racy kubelet tests.
Add fakePodWorkders to run syncPod() in serial for testing.
2015-05-11 12:50:33 -07:00
Yu-Ju Hong a9c9505206 Use VirtualSize of the docker image as the image size 2015-05-11 11:03:47 -07:00
Yu-Ju Hong 3599d81ef1 Remove some docker references 2015-05-11 11:03:47 -07:00
Yu-Ju Hong 3487a165b8 Unexport DockerManager.RunContainer 2015-05-11 11:03:41 -07:00
Nikhil Jindal 6bf5acd109 Merge pull request #8044 from pmorie/pod-volume-injection
Refactor volume interfaces to receive pod instead of ObjectReference
2015-05-11 10:11:00 -07:00
Victor Marmol 307d677e06 Merge pull request #8022 from ddysher/kubelet-privilege
Check Pod privileged container
2015-05-11 09:01:58 -07:00
deads2k 2ecb0ebd73 make the dockerkeyring handle mutiple matching credentials 2015-05-11 09:54:03 -04:00
Paul Morie cd359ffa73 Refactor volume interfaces to receive pod instead of ObjectReference 2015-05-10 20:12:57 -04:00
Deyuan Deng 2f7183cba5 Check Pod privileged container 2015-05-09 17:30:35 -04:00
Deyuan Deng 72a563f618 Use error type from docker go-client instead of string 2015-05-09 15:20:45 -04:00
Yu-Ju Hong d185bfd56a Record failure reason for image pulling 2015-05-08 17:37:11 -07:00
Brendan Burns c9324e6e38 Switch exec to look at exit code not output status. 2015-05-08 16:51:37 -07:00
Yifan Gu 7e9ba26103 kubelet: Add container runtime option for rkt. 2015-05-07 23:39:37 -07:00
Yifan Gu 8b1174a3a7 kubelet/container: Move pty*.go to container runtime package.
This makes the labeld pty wrapper available for both container runtime.
2015-05-07 23:36:47 -07:00
Victor Marmol 65bd04fc51 Merge pull request #7916 from yifan-gu/rkt_rm_label
kubelet/rkt: Remove build label.
2015-05-07 16:24:32 -07:00
Victor Marmol 5074e98ee9 Merge pull request #7910 from yujuhong/hostname
Use the full hostname for mirror pod name.
2015-05-07 14:43:16 -07:00
Yifan Gu 41f8c79490 kubelet/rkt: Remove build label.
As we removed the linux specific dependency, now rkt can be built
on other platforms as well.
2015-05-07 13:42:05 -07:00
Victor Marmol ecf8348609 Revert "kubelet: Add container runtime option for rkt." 2015-05-07 13:01:37 -07:00
Yu-Ju Hong ab5e0e0b5c Use the full hostname for mirror pod name.
This change appends the full hostname to the mirror pod name (instead of taking
the first token) so that if the hostname is overriden, we'd not be creating
unncessary name conflicts. An example would be that a user overrides the
hostnames to be "127.0.0.1" and "127.0.0.2", and both of them were resolved to
"127" for the mirror pod name suffix.

Also, because `uname -n` could return a FQDN or not, this change takes only
the first token of it as the hostname for consistency.
2015-05-07 12:59:49 -07:00
Yifan Gu 4f6535ed8a kubelet: Add container runtime option for rkt. 2015-05-07 10:31:58 -07:00
Victor Marmol 35c644a45f Merge pull request #7870 from yifan-gu/rkt_volume
Add volumeGetter to rkt.
2015-05-07 08:58:00 -07:00
Wojciech Tyczynski e26da316dc Set NodeReady=False when docker is dead 2015-05-07 09:30:25 +02:00
Yifan Gu a8f86da35b kubelet/rkt: Add volumeGetter to rkt.
This enable rkt to fetch the volume mounts by the kubelet.
2015-05-06 19:30:33 -07:00
Victor Marmol f6b7029475 Merge pull request #7859 from yifan-gu/rkt_remove_store
kubelet/rkt: Remove dependencies on rkt.store
2015-05-06 17:45:29 -07:00
Yifan Gu 8715c54bd3 kubelet/container: Move kubelet.volumeMap to container.VolumeMap.
This is a quick fix to solve circular dependency problem when
rkt references volume maps.
2015-05-06 16:50:57 -07:00
Victor Marmol d6ea33fbb5 Merge pull request #7849 from yifan-gu/rkt_components
kubelet/rkt: Inject dependencies to rkt.
2015-05-06 16:00:02 -07:00
Yifan Gu 8cbe8938c9 kubelet/rkt: Remove getImageID().
Replace getImageID() with getImageByName(), this can remove the
dependency on rkt.store.
2015-05-06 15:59:31 -07:00
Paul Morie df08b15121 Change signature of container runtime PullImage to allow pull w/ secret 2015-05-06 17:42:03 -04:00
Yifan Gu dee060c8fd kubelet/rkt: Inject dependencies to rkt.
Add necessary components rkt.
2015-05-06 11:28:01 -07:00
Prashanth B da42f13941 Merge pull request #7749 from yujuhong/stale_cache
Kubelet: record the timestamp correctly in the runtime cache
2015-05-06 09:20:30 -07:00
Victor Marmol b4ae750e5d Merge pull request #7830 from rhcarvalho/fix-metric-label
Fix metric label
2015-05-06 09:08:29 -07:00
Rodolfo Carvalho 075ae79826 Fix metric label
Signed-off-by: Rodolfo Carvalho <rcarvalh@redhat.com>
2015-05-06 10:29:50 +02:00
Jerzy Szczepkowski 4d655e3fcf Merge pull request #7803 from yifan-gu/rkt_docker_image
kubelet/rkt: Add docker prefix to image string.
2015-05-06 09:22:50 +02:00
Yu-Ju Hong c075719f05 Kubelet: fix the runtime cache to not cache the stale pods
If a pod worker sees stale pods from the runtime cache which were retrieved
before their last sync finished, it may think that the pod were not started
correctly, and attemp to fix that by killing/restarting containers.
There are two issues that may cause runtime cache to store stale pods:
  1. The timstamp is recorded *after* getting the pods from the container
     runtime. This may lead the consumer to think the pods are newer than they
     actually are.
  2. The cache updates are triggered by many goroutines (pod workers, and the
     updating thread). There is no mechanism to enforece that the cache would
     only be updated to newer pods.

This change fixes the above two issues by making sure one always record the
timestamp before getting pods from the container runtime, and updates the
cached pods only if the timestamp is newer.
2015-05-05 18:28:38 -07:00
Zach Loafman 875e83a741 Revert "Revert "Security context - types, kubelet, admission"" 2015-05-05 16:02:13 -07:00
Zach Loafman 3fcea23185 Revert "Revert "Revert "Kubelet: Add rkt as a runtime option""" 2015-05-05 15:55:12 -07:00
Yifan Gu ec68f1a85a kubelet/rkt: Add docker prefix to image string.
This change makes rkt to run only docker image for now,
which enables us to test with all existing pods.
2015-05-05 15:41:13 -07:00
Zach Loafman 92ca92f43a Revert "Revert "Kubelet: Add rkt as a runtime option"" 2015-05-05 15:28:09 -07:00
Zach Loafman f48904fd5e Revert "Security context - types, kubelet, admission" 2015-05-05 15:20:39 -07:00
Zach Loafman 6016408096 Revert "Kubelet: Add rkt as a runtime option" 2015-05-05 15:15:15 -07:00
Yu-Ju Hong b2c0ea37b4 Merge pull request #7743 from vmarmol/runtime-switch
Kubelet: Add rkt as a runtime option
2015-05-05 13:36:46 -07:00
Paul Morie 1625e231dd Merge pull request #7343 from pweil-/security-context-types
Security context - types, kubelet, admission
2015-05-05 16:26:09 -04:00
Victor Marmol 9f283f356f Start ImageManager housekeeping in Run().
Fixes #7762
Fixes #5634
2015-05-05 11:15:12 -07:00
Victor Marmol 22297d316a Add rkt runtime to Kubelet init 2015-05-05 10:55:21 -07:00
Victor Marmol 5d0e5d7d61 Inject dependencies to rkt 2015-05-05 10:55:11 -07:00
Paul Weil 982bf19c20 security context initial implementation - squash 2015-05-05 13:46:13 -04:00
Yu-Ju Hong a7dadfcc97 Merge pull request #7752 from vmarmol/rkt-compile
Add build labels to rkt
2015-05-05 09:26:59 -07:00
Victor Marmol d84aac6498 rkt: Unexport runtime, use Runtime interface 2015-05-04 17:28:02 -07:00
Victor Marmol f012d7f506 Add unsupported version of rkt. 2015-05-04 17:22:45 -07:00
Robert Bailey 5fe07e69b7 Merge pull request #7725 from pmorie/typo
Fix typo in runtime_cache.go
2015-05-04 17:03:42 -07:00
Brian Grant df8521c468 Merge pull request #7592 from pmorie/dapi-example
Rename EnvVarSource.FieldPath -> FieldRef and add example
2015-05-04 17:02:17 -07:00
Victor Marmol de2212983f Refactor rkt into one file.
This will make it easy to add build labels and stub out in non-Linux
builds.
2015-05-04 16:51:31 -07:00
Victor Marmol fe7cb95be6 Merge pull request #7746 from vishh/exec_fix
Fix kubelet's docker RunInContainer implementation
2015-05-04 16:49:57 -07:00
Victor Marmol a32d31d045 Merge pull request #7729 from yujuhong/runtime_up
Kubelet: wait until container runtime is up
2015-05-04 16:02:30 -07:00
Vishnu Kannan ec01265643 Fix docker exec logic. Without this patch, kubelet was not receiving any output from docker exec
and was incorrectly handling the output.
2015-05-04 16:01:32 -07:00
Paul Morie e949a623ff Change EnvVarSource.FieldPath -> FieldRef and add example 2015-05-04 18:41:09 -04:00
Yu-Ju Hong d231eb6bef Kubelet: wait until container runtime is up
Instead of waiting for the docker client to be up, we wait for the container
runtime to be up.
2015-05-04 15:16:38 -07:00