Commit Graph

1482 Commits (430422b1816308d19a9c55b88c34ca24a3a30d6c)

Author SHA1 Message Date
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
Victor Marmol b0129089da Merge pull request #7712 from rjnagal/kubelet
Expose pod name as a label on containers.
2015-05-04 14:52:16 -07:00
Rohit Jnagal 1511dbf0b5 Expose pod name as a label on containers.
Full pod name is exposed under key 'kubernetes.io/pod'.
It helps in introspection by looking at all containers in a pod through
docker ps -a -f label=kubernetes.io/pod=podXXX

We also plan to visualize this in cAdvisor.
2015-05-04 21:20:42 +00:00
Paul Morie d90689bb71 Fix typo in runtime_cache.go 2015-05-04 16:33:48 -04:00
Victor Marmol ba7e940a57 Make rkt implement the container Runtime 2015-05-04 11:16:33 -07:00
Victor Marmol e44d9df0f4 Changes to rkt's PortForward to match Runtime API. 2015-05-04 11:16:33 -07:00
Victor Marmol 79fc8bee34 Change GetContainerLogs() signature.
This works for both runtimes. We need to eventually unify the ID scheme
for this method.
2015-05-04 11:16:32 -07:00
Victor Marmol 60a77221f5 Add dummy ListImages and RemoveImage to rkt runtime. 2015-05-04 11:14:54 -07:00
Victor Marmol 2ad933e124 Merge pull request #7674 from yujuhong/enable_runtime
Kubelet: replace DockerManager with the Runtime interface
2015-05-04 11:10:20 -07:00
Yu-Ju Hong 1ad4dd7803 Kubelet: replace DockerManager with the Runtime interface
This change instructs kubelet to switch to using the Runtime interface. In order
to do it, the change moves the Prober instantiation to DockerManager.

Note that most of the tests in kubelet_test.go needs to be migrated to
dockertools. For now, we use type assertion to convert the Runtime interface to
DockerManager in most tests.
2015-05-04 10:19:46 -07:00
Paul Morie b538642464 Inject mounter into volume plugins 2015-05-04 11:28:57 -04:00
Daniel Smith 4a6ab7fd36 Merge pull request #7597 from eparis/copyright
Use generic copyright holder name in license boilerplate
2015-05-01 17:01:39 -07:00
Victor Marmol c5a86387a4 Merge pull request #7657 from yujuhong/docker_runtime
Removes RunPod in the Runtime interface
2015-05-01 16:09:44 -07:00
Yu-Ju Hong ae1b24f07f Merge pull request #7652 from vmarmol/runtime-switch
Kubelet: Add container runtime option.
2015-05-01 14:50:30 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Yu-Ju Hong 4fe3366b04 Removes RunPod in the Runtime interface
SyncPod subsumes RunPod, so the latter is no longer needed.
After this change, DockerManager implements the Runtime interface.
2015-05-01 14:47:04 -07:00
Victor Marmol d9d61c3511 Kubelet: Add container runtime option. 2015-05-01 14:26:54 -07:00
Yifan Gu 1b77615deb kubelet/rkt: Add SyncPod() to rkt. 2015-05-01 13:02:05 -07:00
Victor Marmol 3b9eba2c1b Add SyncPod() to DockerManager and use in Kubelet.
This allows us to abstract away the logic of syncing a pod by the
runtime. It will allow other runtimes to perform their own sync as well.
2015-05-01 11:03:08 -07:00
Victor Marmol bb8ee5b0db Add lifecycle tests from kubelet_test to lifecycle. 2015-05-01 11:02:10 -07:00
Victor Marmol 7a737892f5 Extract out interface for GetPods().
This will remove the circular import with dockertools for
DockerManager. Eventually, this will be Runtime.
2015-05-01 11:02:10 -07:00
Vish Kannan cadfde0bd1 Merge pull request #7277 from guenter/cgroup-parent
Add --cgroup_parent flag to Kubelet to set the parent cgroup for pods
2015-05-01 10:24:58 -07:00
Yu-Ju Hong f74fab4e56 Merge pull request #7603 from vmarmol/runtime-syncpod-api
Add SyncPod() and remove Kill/Run InContainer().
2015-05-01 09:41:50 -07:00
Victor Marmol 6316b485ad Add SyncPod() and remove Kill/Run InContainer().
SyncPod allows us to abstract away how a pod is started and updated. It
also simplifies what the runtime has to implement.
2015-05-01 00:32:29 -07:00
Yifan Gu 3751ecc766 kubelet/container: Move ShouldContainerBeRestarted() to runtime. 2015-04-30 22:55:25 -07:00
Yifan Gu 428652bdc7 kubelet/rkt: Add KillPod() and GetPodStatus() for rkt. 2015-04-30 18:32:32 -07:00
Victor Marmol 03b5c32576 Merge pull request #7553 from yifan-gu/rkt_runner
kubelet/rkt: Add RunInContainer()/ExecInContainer()/PortForward().
2015-04-30 18:31:08 -07:00
Yifan Gu 9ce568a142 kubelet/rkt: Add GetPods() for rkt. 2015-04-30 18:00:18 -07:00
Yifan Gu 1636fd2e1c kubelet/rkt: Add RunPod() for rkt. 2015-04-30 17:31:35 -07:00
Yifan Gu 2e4be0bcf1 kubelet/rkt: Add RunInContainer()/ExecInContainer()/PortForward(). 2015-04-30 17:25:16 -07:00
Victor Marmol 262c34e7db Merge pull request #7543 from yifan-gu/pod_manifest
kubelet/rkt: Add routines for converting kubelet pod to rkt pod.
2015-04-30 17:18:19 -07:00
Victor Marmol 3235799595 Merge pull request #7601 from yujuhong/kill_container
Add KillContainerInPod in DockerManager
2015-04-30 17:05:00 -07:00
Victor Marmol df8490f52f Merge pull request #7555 from yifan-gu/rkt_pod_info
kubelet/rkt: Add podInfo.
2015-04-30 17:04:51 -07:00
Yu-Ju Hong b37f23f1eb Add KillContainerInPod in DockerManager
This changes adds one of the functions that DockerManager needs to implement
the Runtime interface.
2015-04-30 16:23:39 -07:00
Victor Marmol 441a4e6f30 Merge pull request #7578 from yujuhong/docker_manager
Add image-related methods to DockerManager
2015-04-30 16:16:39 -07:00
Victor Marmol a94aeb27fa Merge pull request #7586 from yujuhong/container_info
Remove more docker references in kubelet
2015-04-30 16:16:23 -07:00
Yifan Gu 7e8afc7c96 kubelet/rkt: Add routines for converting kubelet pod to rkt pod. 2015-04-30 15:24:47 -07:00
Victor Marmol 0e89d65563 Merge pull request #7545 from yifan-gu/getlog
Getlog
2015-04-30 15:15:44 -07:00
Victor Marmol 57cc1218ca Merge pull request #7549 from yifan-gu/rkt_gc
Rkt gc
2015-04-30 15:15:07 -07:00
Alex Robinson f3352d96e6 Merge pull request #7595 from a-robinson/typo
Fix typo in kubelet prober code
2015-04-30 14:42:18 -07:00
Yifan Gu 01841a8c19 kubelet/rkt: Add podInfo.
podInfo reprensents the state of rkt pods.
It is used to for reporting the pod and container status to kubelet.
2015-04-30 14:39:10 -07:00
Yu-Ju Hong 644ec0dbfb Remove ErrNoKubeletContainers
We no longer use it.
2015-04-30 13:35:21 -07:00
Yu-Ju Hong 83c599e4d4 Add image-related methods to DockerManager
This change is part of the efforts to make DockerManager implement the Runtime
interface.

The change also modifies the interface slightly to work with existing
code, and aggregates the type converting functions to convert.go.
2015-04-30 13:27:52 -07:00
Alex Robinson faa3292bb3 Fix typo in kubelet prober code. 2015-04-30 13:17:10 -07:00
Yu-Ju Hong 2f7b951140 Remove more docker references in kubelet
This change also renames TrimRuntimePrefixFromImage to TrimRuntimePrefix to
better reflect that the usage is not limited to images (e.g. ID).
2015-04-30 13:16:11 -07:00
Victor Marmol 2c381a6f6f Merge pull request #7550 from yifan-gu/rkt_pull
Rkt pull
2015-04-30 13:09:14 -07:00
CJ Cullen 015c0656a6 Merge pull request #7568 from yujuhong/rm_getcontainers
Remove GetContainers from Runtime interface
2015-04-30 12:01:58 -07:00
Yu-Ju Hong 11be6811b3 Merge pull request #7563 from vmarmol/runtime-pre
Move lifecycle handlers to their own subpackage
2015-04-30 11:22:58 -07:00
Clayton Coleman d03b5299f9 Merge pull request #7432 from piosz/termination_notice
Added TerminationGracePeriod field to PodSpec and grace-period flag to kubectl stop
2015-04-30 13:55:51 -04:00
Tobi Knaup b96c4046a8 Add --cgroup_root flag to Kubelet to set the parent cgroup for all pods.
Implements #6991.
2015-04-30 10:32:27 -07:00
Yifan Gu ca4643ef31 kubelet/rkt: Add GetContainerLogs() for rkt. 2015-04-30 10:31:31 -07:00
Yifan Gu 488f49a216 kubelet/rkt: Add GarbageCollection to rkt runtime. 2015-04-30 10:29:38 -07:00
Yifan Gu 01693c8233 kubelet/rkt: Add PullImage()/IsImagePresent() to rkt runtime. 2015-04-30 10:01:24 -07:00
Yu-Ju Hong 176fc9b9c6 Remove GetContainers from Runtime interface
This function is no longer considered needed.
2015-04-30 09:33:23 -07:00
Yu-Ju Hong de32785e2e Merge pull request #7532 from vmarmol/runtime-images
Add image-related methods to Runtime interface.
2015-04-30 09:30:59 -07:00
Piotr Szczesniak 11a2dc496f Added TerminationGracePeriod field to PodSpec and grace-period flag to kubectl stop
Those are changes which touch users required by Termination Notice

Addresses #6804
2015-04-30 18:00:33 +02:00
Victor Marmol 238b3c6f4e Move lifecycle handlers to its own sub package.
This will allow injecting it into the runtimes.
2015-04-30 08:47:23 -07:00
Victor Marmol 4db5127073 Make HttpGetter a shared Kubelet type. 2015-04-30 08:47:23 -07:00
Victor Marmol 037295ac4c Merge pull request #7533 from yujuhong/get_containers
Clean up dockertools/manager.go and add more unit tests
2015-04-30 08:38:27 -07:00
Victor Marmol 946dac4f7c Merge pull request #7465 from yifan-gu/split_rkt
kubelet/rkt: Add basic rkt runtime routines.
2015-04-30 08:37:24 -07:00
Victor Marmol 0a6584cafe Merge pull request #7487 from njuicsgz/master
readinessProbe calls livenessProbe.Exec.Command which cause "invalid memory address or nil pointer dereference".
2015-04-30 08:36:54 -07:00
Yu-Ju Hong baaea11cd5 Merge pull request #7520 from vmarmol/runtime-pull
Add RuntimeHooks to abstract Kubelet logic
2015-04-30 08:33:19 -07:00
Gao Zheng 95f2d1378f change probe.runner to probe.Runner as based 2015-04-30 10:36:38 +08:00
Gao Zheng 74975eff03 Fixes issue #7352
readinessProbe calls livenessProbe.Exec.Command which cause
"invalid memory address or nil pointer dereference".
2015-04-30 10:19:49 +08:00
Yu-Ju Hong 919d78281f Clean up dockertools/manager.go and add more unit tests.
This change refactors the GetPods function and add some basic unit tests.
We should start migrating docker specific tests from kubelet_test to
manager_test.go.
2015-04-29 18:32:52 -07:00
Victor Marmol 090d0c95fa Remove ImagePull metric in Kubelet.
There is an equivalent metric from our Docker metrics and this one is
harder to maintain with the RuntimeHooks.
2015-04-29 17:12:03 -07:00
Yifan Gu 305345efe1 kubelet/rkt: Add basic rkt runtime routines. 2015-04-29 17:09:32 -07:00
Victor Marmol 2a01a2c7e9 Use RuntimeHooks in Kubelet.
Used in functionality that will be moved to the runtimes.
2015-04-29 17:06:49 -07:00
Victor Marmol 61d51243c5 Add RuntimeHooks interface and Kubelet implementation.
This interface will be used to inject functionality and logic into the
runtimes that should be shared accross runtimes.
2015-04-29 17:06:49 -07:00
Yu-Ju Hong d81ecc58f8 Adapt pod killing and cleanup for generic container runtime
This change removes docker-specifc code in killUnwantedPods. It
also instructs the cleanup code to move away from interacting with
containers directly. They should always deal with the pod-level
abstraction if at all possible.
2015-04-29 16:08:09 -07:00
Yu-Ju Hong ba1140a54f Merge pull request #7480 from vmarmol/runtime-syncpod
Move ComputePodChanges to the Docker runtime
2015-04-29 16:05:20 -07:00
Victor Marmol 4d09b79529 Add image-related methods to Runtime interface.
This includes RemoveImage() and ListImages().
2015-04-29 16:00:36 -07:00
Victor Marmol 293828c93c Merge pull request #7515 from brendandburns/kubelet
Fix YAML parsing for v1beta3 objects in the kubelet for file/http
2015-04-29 14:31:49 -07:00
Victor Marmol 209b4fcbef Merge pull request #6718 from vishh/sys_oom1
Adding system oom events from kubelet
2015-04-29 14:29:38 -07:00
Victor Marmol fe4600ba17 Move ComputePodChanges to DockerManager.
This logic is specific to the Docker runtime. This move is the first
step towards making syncPod() runtime-agnostic.
2015-04-29 14:00:37 -07:00
Brendan Burns 48d269e6ab Fix YAML parsing for v1beta3 objects in the kubelet for file/http 2015-04-29 11:38:36 -07:00
Vishnu Kannan 020950fd0f Adding events for system ooms.
Kubelet will continuously watch for system OOMs and generate events whenever it
encounters a system OOM.
2015-04-29 11:19:11 -07:00
Victor Marmol f38c607285 Move Prober to its own subpackage.
This will allow it to be reused by the runtimes.
2015-04-29 10:11:28 -07:00
Yu-Ju Hong 33b8f487f6 Merge pull request #7449 from vmarmol/runtime-network-plugins
Move network plugin TearDown to DockerManager
2015-04-29 10:09:58 -07:00
Victor Marmol 02231ea75d Merge pull request #7503 from jsafrane/devel/fix-volume-rm
Fixed kubelet deleting data from volumes on stop (#7317).
2015-04-29 10:01:16 -07:00
Victor Marmol dfadc10fcb Merge pull request #7488 from yifan-gu/get_container_logs
kubelet/container: Add GetContainerLogs to runtime interface.
2015-04-29 08:24:20 -07:00
Victor Marmol 38831237b2 Merge pull request #7477 from yifan-gu/refactor_runonce
kubelet: Refactor isPodRunning() in runonce.go
2015-04-29 08:24:09 -07:00
Jan Safranek 9b9e98a22f Fixed kubelet deleting data from volumes on stop (#7317).
We must not clear the pod directory in killUnwantedPods(), volumes are still
mounted there at this time. There already is cleanupOrphanedPodDirs(),
called later in the SyncPods() sequence, which should remove these pod
directories.
2015-04-29 10:41:19 +02:00
Yifan Gu fb1c55aa11 kubelet/container: Add GetContainerLogs to runtime interface. 2015-04-28 20:26:16 -07:00
Yifan Gu ba1389de3c kubelet/container: Update the runtime interface.
Make some of them (RunInContainer, ExecInContainer, etc) to have
same function signatures as current docker and rkt implementation.
2015-04-28 17:55:41 -07:00
Yifan Gu c848fa447d kubelet: Refactor isPodRunning() in runonce.go
Replace InspectContainer() with generic GetPodStatus().
2015-04-28 17:44:13 -07:00
Victor Marmol 787d42d50b Move network plugin teardown to DockerManager.
This teardown is Docker-specific and will let us also do the setup in
the manager in future cleanups.
2015-04-28 16:58:54 -07:00
Victor Marmol de0957ccb1 Create Kubelet types package for common shared types. 2015-04-28 16:57:45 -07:00
Vishnu Kannan 820d0f3e83 Adding a 'PastEventf' method to EventRecorder interface. This will be
useful for recording the timestamp of events that happened in the past.
2015-04-28 16:13:29 -07:00
Vishnu Kannan 2f68cddbd2 Adding events API to cadvisor interface. 2015-04-28 16:13:29 -07:00
Dawn Chen af5d017911 Merge pull request #7386 from vmarmol/rkt-pull-image
Kubelet: Factor out and remove pullImageAndRunContainer
2015-04-28 09:28:16 -07:00
Dawn Chen 1de4c45115 Merge pull request #7401 from vmarmol/rkt-kill-pod
Kubelet: Move killPod() logic to DockerManager's KillPod()
2015-04-28 09:25:12 -07:00
Sam Ghods 5ceebb4a5f Add error message to log of docker error 2015-04-27 21:49:46 -07:00
Dawn Chen 4b79e5a3db Merge pull request #7403 from vmarmol/rkt-deps
Remove DockerPrefix references in Kubelet.
2015-04-27 19:05:43 -07:00
Victor Marmol 6b0db76e85 Move killPod() logic to DockerManager KillPod().
This moved Docker specific logic there and allows it to align with the
runtime API. There is still a pod infra container reference in the
function due to network plugins. We can handle this in the Kubelet since
we'll need to be explicit in stating that the network plugin will not
work in a non-Docker runtime.
2015-04-27 17:15:37 -07:00
Dawn Chen 5ea5fff586 Merge pull request #7391 from vmarmol/rkt-portforward
Add PortForward to runtime API.
2015-04-27 17:10:37 -07:00
Victor Marmol 42a2059a5d Remove DockerPrefix references in Kubelet.
Makes this usage generic and usable by other runtimes.
2015-04-27 15:55:13 -07:00
Victor Marmol 1d6913779b Use kubecontainer.Pod instead of api.Pod in KillPod.
We don't need the full api.Pod and the uses today use kubecontainer.Pod.
2015-04-27 15:36:06 -07:00
Victor Marmol 3082bb291c Remove pullImageAndRunContainer().
Relevant logic is now in shared helpers.
2015-04-27 15:13:11 -07:00
Victor Marmol b232eef5f7 Move image PullPolicy logic to pullImage().
This will allow us to remove the Docker-specific logic in
pullImageAndRunContainer() and re-use pullImage() in other runtimes.
2015-04-27 15:13:11 -07:00
Dawn Chen aa487b7cab Merge pull request #7382 from vmarmol/rkt-deps
Move Docker-specific log handling to DockerManager.
2015-04-27 15:10:14 -07:00
Victor Marmol 3a61421711 Add PortForward to runtime API. 2015-04-27 14:56:32 -07:00
Victor Marmol 7404b7019c Move Docker-specific log handling to DockerManager.
Eases the separation of Docker-specific code into the Docker-specific
runtime.
2015-04-27 13:10:10 -07:00
Brian Grant 2648ae86d6 Merge pull request #6739 from pmorie/downward-api
Env var sources / downward API
2015-04-27 12:46:00 -07:00
Paul Morie 7d30f09ebf Add downward API for environment vars 2015-04-27 14:13:11 -04:00
Victor Marmol 0c52f7b6a5 Move CreatePodInfraContainer to DockerManager.
This will allow us to start making it an implementation detail of the
Docker runtime.
2015-04-27 11:07:38 -07:00
Yifan Gu 6c98b9daee kubelet/metrics: Move instrumented_docker.go to dockertools.
This can solve the circular import problem when we move the
kubelet.pullImage to kubelet/metrics or kubelet/container package.
2015-04-24 22:03:11 -07:00
Victor Marmol d0288f7143 Merge pull request #7301 from yujuhong/no_resurrection
Kubelet: filter out terminated pods in SyncPods
2015-04-24 16:17:06 -07:00
Yu-Ju Hong b0e6926f67 kubelet: filter out terminated pods in SyncPods
Once a pod reaches a terminated state (whether failed or succeeded), it should
not transit out ever again. Currently, kubelet relies on examining the dead
containers to verify that the container has already been run. This is fine
in most cases, but if the dead containers were garbage collected, kubelet may
falsely concluded that the pod has never been run. It would then try to restart
all the containers.

This change eliminates most of such possibilities by pre-filtering out the pods
in the final states before sending updates to per-pod workers.
2015-04-24 15:28:03 -07:00
Victor Marmol 270d8aec8b Raise cAdvisor stats cache to 2m.
This used to be 60ns which was a bug from when we switched from number
of stats to duration. Seems like the type was silently
converted/ignored.
2015-04-24 14:44:13 -07:00
Brian Grant 60d7bad147 Merge pull request #7128 from nikhiljindal/fixbeta1tests
Removing more references to v1beta1 from pkg/
2015-04-24 11:07:53 -07:00
nikhiljindal dcc368c781 Removing more references to v1beta1 from pkg/ 2015-04-24 00:45:17 -07:00
Yifan Gu b5a1b32aa4 kubelet/dockertools: Move RunContainer into container runtime.
Also removed ContainerRunner interface.
2015-04-23 16:40:37 -07:00
Yifan Gu 6ed27d06f7 kubelet: Move KillContainer to container runtime.
Rename KillContainerID(string) with KillContainer(string).
Delete the old KillContainer(*kubecontainer.Container).
2015-04-23 15:44:00 -07:00
David Oppenheimer 8667ebddff Merge pull request #7249 from yifan-gu/generator
kubelet/container: Introduce RunContainerOptionsGenerator.
2015-04-23 14:59:23 -07:00
Dawn Chen 6207c518b3 Merge pull request #7254 from yifan-gu/readiness
kubelet/dockertools: Add readinessManage/containerRefManager to dockerManager.
2015-04-23 14:34:43 -07:00
Yifan Gu e8d485a3a1 kubelet/dockertools: Add readinessManage/containerRefManager to dockerManager.
This can enable us to move KillContainer() to container runtime.
2015-04-23 14:20:34 -07:00
Yifan Gu bd7132bc07 kubelet/container: Introduce RunContainerOptionsGenerator.
This interface wraps the kubelet to provide the options for
container runtime to run a container.
2015-04-23 13:55:50 -07:00
Dawn Chen f7831dcd93 Merge pull request #7229 from vmarmol/stats
Kubelet: Add /stats/container endpoint for raw containers
2015-04-23 13:43:23 -07:00
Yifan Gu de6e81fb4a kubelet/container: Add Pull() and IsImagePresent() to runtime interface. 2015-04-23 11:58:51 -07:00
Victor Marmol 15e2a7fe38 Merge pull request #7200 from yifan-gu/containerID
Introduce container ID type.
2015-04-23 11:33:32 -07:00
Yifan Gu afb9a896cb Introduce container ID type. 2015-04-23 10:43:27 -07:00
Victor Marmol c29d328c55 Kubelet: Add /stats/container endpoint.
This endpoint exposes container stats for all raw containers on the
machine. The addition is backwards compatible.
2015-04-23 10:38:29 -07:00
Yifan Gu af1e9f737f kubelet: Introduce volume manager.
The volume manager book-keeps the information for the volume mounts
on the kubelet, so we can avoid passing the volumeMap around.
2015-04-23 10:37:02 -07:00
Victor Marmol e2f37f81a9 Add SubcontainerInfo() to cAdvisor API.
Returns information about a container and its subcontainers.
2015-04-23 10:20:05 -07:00
Dawn Chen f9156c281a Merge pull request #7123 from satnam6502/logging
Propagate pod and container name for log files
2015-04-23 10:13:08 -07:00
Victor Marmol de6d5cc165 Add RunInContainer/ExecInContainer to container Runtime API. 2015-04-22 18:09:24 -07:00
Satnam Singh 2444c1f943 Propagate pod and container name for log files 2015-04-22 15:08:51 -07:00
Victor Marmol 45575d95b3 Merge pull request #7177 from yifan-gu/runner
kubelet/dockertools: Remove dockerContainerCommandRunner.
2015-04-22 13:24:50 -07:00
Yifan Gu f59013410a kubelet/container: Move Prober/HandlerRunner interface to container/helpers.go
This enables us to pass them to container runtime as parameters.
2015-04-22 11:56:15 -07:00
Yifan Gu c55c879ffe kubelet/dockertools: Remove dockerContainerCommandRunner.
Replace with docker manager.
2015-04-22 11:00:54 -07:00
Victor Marmol 1a41ec9c86 Merge pull request #7116 from yujuhong/container_status
Print container statuses in `kubectl get pods`
2015-04-22 09:18:14 -07:00
Victor Marmol 914a6febfb Merge pull request #7010 from yifan-gu/compute
kubelet: Refactor computePodContainerChanges().
2015-04-22 08:05:18 -07:00
Brian Grant 8dbbf3da5c Merge pull request #7138 from pravisankar/unschedulable-event
Record an event on node schedulable changes
2015-04-22 07:11:14 -07:00
Dawn Chen a666c1e731 Merge pull request #7134 from yifan-gu/version
kubelet: Refactor GetDockerVersion().
2015-04-21 16:49:45 -07:00
Yu-Ju Hong 06125f37d3 Print container statuses in `kubectl get pods`
`kubectl get pod` already prints one container per line. This change fills in
the status for each container listed. This aims to help users quickly identify
unhealthy pods (e.g. in a crash loop) at a glance.

 - The first row of every pod would display the pod information and status
 - Each row of the subsequent rows corresponds to a container in that pod:
    * STATUS refers to the container status (Running, Waiting, Terminated).
    * CREATED refers to the elapsed time since the last start time of the
      container.
    * MESSAGE is a string which explains the last termination reason, and/or
      the reason behind the waiting status.
2015-04-21 15:42:18 -07:00
Derek Carr cf27fd12c1 Merge pull request #6278 from akram/fix_port_forward_listner_parsing_ipv4_ipv6
Fixes an issue with hosts having an IPv6 address on localhost
2015-04-21 18:04:02 -04:00
Yifan Gu 611fb25926 kubelet: Refactor GetDockerVersion().
Remove GetDockerServerVersion() from DockerContainerCommandRunner interface,
replaced with runtime.Version(). Also added Version type in runtime for version
comparision.
2015-04-21 14:52:08 -07:00
Ravi Sankar Penta f1d88f6d2f Record an event on node schedulable changes 2015-04-21 14:14:59 -07:00
Yifan Gu 5594981340 kubelet: Refactor computePodContainerChanges().
Pull generatePodStatus() and makePodDataDirs() out as they are the
common part for container runtimes.
2015-04-21 13:53:20 -07:00
derekwaynecarr 3445bd5806 Fixup event object reference generation to allow downstream objects to have an event 2015-04-21 15:31:38 -04:00
Akram Ben Aissi b7fc22be8a Fixes an issue with hosts having an IPv6 address on localhost
- When 'getent hosts localhost' returns '::1' the creation of the
  listener fails because of the port parsing which uses ":" as a
separator
- Use of net.SplitHostPort() to do the job
- Adding unit tests to ensure that the creation succeeds
- On docker.go: adds a test on the presence the socat command which was
  failing silenty if not installed

- Code Review 1
  - Fixed typo on Expected
  - The UT now fails if the PortForwarder could not be created

- Code Review 2
  - Simplify socat error message
  - Changing t.Fatal to to.Error on unit tests

- Code Review 3
  - Removing useless uses cases in unit tests

- Code Review 4
  - Removing useless initiliasiation of PortForwarder
  - Changing error message

- Code Review 5
  - Simplifying TestCast struct
  - Adding addition test in one test case
  - Closing the listener

- Code Review 6
  - Improving unit test
2015-04-21 20:16:22 +02:00
Victor Marmol 4b9a64bcd8 Merge pull request #7098 from yifan-gu/handler
kubelet: Refactor runHandler().
2015-04-21 08:14:42 -07:00
Yifan Gu c23b83b0ca kubelet: Refactor runHandler().
Use new HandlerRunner type to replace runHandler()
2015-04-20 21:31:11 -07:00
Daniel Smith 462534ca5d Merge pull request #7068 from krousey/api_pod_pointer
Changing  a few more instances of api.Pod to *api.Pod
2015-04-20 17:09:28 -07:00
Kris Rousey 594f514843 Changing a few remaining instances of passing pods around by value. I
avoided changing api.PodList.Items to []*api.Pod.
2015-04-20 15:26:45 -07:00
Victor Marmol d44e9b4880 Merge pull request #7048 from yujuhong/para_cleanup
Kubelet: parallelize cleaning up containers in unwanted pods
2015-04-20 14:59:07 -07:00
Yu-Ju Hong 275002173e Kubelet: parallelize cleaning up containers in unwanted pods
Kubelet kills unwanted pods in SyncPods, which directly impact the latency of a
sync iteration. This change parallelizes the cleanup to lessen the effect.

Eventually, we should leverage per-pod workers for cleanup, with the exception
of truly orphaned pods.
2015-04-20 14:42:12 -07:00
Brendan Burns 01b891770f Merge pull request #7054 from ncdc/dockerclient-version
Use go-dockerclient's APIVersion
2015-04-20 14:20:57 -07:00
Andy Goldstein a0a80ea76e Use go-dockerclient's APIVersion
Use go-dockerclient's APIVersion to check the minimum required Docker
version, as it contains methods for parsing the ApiVersion response from
the Docker daemon and for comparing 2 APIVersion objects.
2015-04-20 13:48:18 -04:00
Yu-Ju Hong cd61aa9484 Merge pull request #7009 from yifan-gu/kube_dep
kubelet: Refactor prober.
2015-04-20 10:23:04 -07:00
Victor Marmol cf27de61c6 Merge pull request #7035 from smarterclayton/turn_down_kubelet_for_what
Tone down kubelet logs for already run containers
2015-04-20 08:05:25 -07:00
Xiang Li 2f2247dae3 pkg/kubelet: no more self receiver in kubelet pkg 2015-04-19 20:26:07 -07:00
Clayton Coleman 9e87924983 Tone down kubelet logs for already run containers 2015-04-19 22:55:38 -04:00
Yifan Gu 1d58992df7 kubelet: Refactor prober.
Decompose the health check prober from the kubelet.
2015-04-17 15:54:28 -07:00
Yu-Ju Hong 1f3e47f6f7 Merge pull request #7005 from yifan-gu/kube_dep
kubelet: Refactor shouldContainerBeRestarted():
2015-04-17 15:05:41 -07:00
Yifan Gu 29a5da231d kubelet: Refactor shouldContainerBeRestarted():
Remove the function's dependency on kubelet.
2015-04-17 14:35:39 -07:00
Kris Rousey 81497f3ed2 Changing the scheduler package to use *api.Pod instead of api.Pod to
avoid unnecessary shallow copies. The change rippled through a lot of
code.
2015-04-17 13:34:31 -07:00
Yu-Ju Hong 26a70a52e6 Merge pull request #6843 from xiang90/cleanup
pkg/kubelet: clean up pod manager
2015-04-17 11:27:14 -07:00
Yu-Ju Hong 13b29cd64b Merge pull request #6595 from guenter/kubelet-update-channel-closed
kubelet syncloop should stop if/when updates chan closes
2015-04-17 10:42:05 -07:00
Xiang Li 28c1726232 pkg/kubelet: minor cleanup in pod_manager.go 2015-04-17 10:24:38 -07:00
Xiang Li 864f9b4a8a pkg/kubelet: drop unnecessary receiver in pod_manager.go 2015-04-17 10:24:38 -07:00
Xiang Li ede4fb4a37 pkg/kubelet: remove unnecessary wrapper code in pod_manager.go 2015-04-17 10:24:38 -07:00
Dawn Chen fa4363d493 Merge pull request #6924 from yujuhong/data_race
Fix data race in kubelet_test.go
2015-04-16 11:56:40 -07:00
Yu-Ju Hong 2fd87597a4 Fix data race in kubelet_test.go
Ensure that FakeDockerClient make a copy of the internal list and return it.
2015-04-16 11:36:10 -07:00
Victor Marmol abab9ea31f Merge pull request #6844 from yifan-gu/cleankube
kubelet: Clean up computePodContainerChanges.
2015-04-15 13:53:21 -07:00
Yu-Ju Hong 967405f0bb Fix locking issue in pod manager 2015-04-15 11:39:57 -07:00
Victor Marmol 902e1196ac Merge pull request #6867 from pmorie/libcontainer-bug
Remove workaround for libcontainer Getfilecon bug
2015-04-15 11:02:46 -07:00
Dawn Chen d912398d07 Merge pull request #6813 from vmarmol/in-container
Run Kubelet and Kube-proxy in resource-only containers.
2015-04-15 10:37:00 -07:00
Paul Morie 68f22a40f3 Remove workaround for libcontainer Getfilecon bug
https://github.com/docker/libcontainer/issues/499 has been fixed
2015-04-15 13:29:20 -04:00
Yifan Gu 3b28c6262b kubelet: Clean up computePodContainerChanges.
More `continue`, less `else` to make it less indent and more readable.
2015-04-15 10:13:57 -07:00
Victor Marmol 54406a5b7c Merge pull request #6794 from yujuhong/restart_counts
Kubelet: persist restart count of a container
2015-04-14 16:01:49 -07:00
Yu-Ju Hong fd34441d2d Kubelet: persist restart count of a container
Currently, restart count are generated by examine dead docker containers, which
are subject to background garbage collection. Therefore, the restart count is
capped at 5 and can decrement if GC happens.

This change leverages the container statuses recorded in the pod status as a
reference point. If a container finished after the last observation, restart
count is incremented on top of the last observed count. If container is created
after last observation, but GC'd before the current observation time, kubelet
would not be aware of the existence of such a container, and would not increase
the restart count accordingly. However, the chance of this should be low, given
that pod statuses are reported frequently. Also, the restart cound would still
be increasing monotonically (with the exception of container insepct error).
2015-04-14 15:06:42 -07:00
markturansky e1481fb9c2 Refactored Volume plugins to use InternalVolume instead of API types 2015-04-14 14:25:01 -04:00
Victor Marmol fb3c351fe1 Run Kubelet on "/kubelet" container. 2015-04-14 10:29:05 -07:00
Victor Marmol ca9e209ccb Merge pull request #6795 from yifan-gu/cache
kubelet/container: Replace DockerCache with RuntimeCache.
2015-04-14 09:37:34 -07:00
Dawn Chen 8420abeea8 Merge pull request #6786 from yifan-gu/cleankube
kubelet: Remove unused docker functions.
2015-04-14 09:16:53 -07:00
Victor Marmol e265f2c58d Merge pull request #6799 from xiang90/kerr
pkg/kubelet: fix error msg in GetHostIP
2015-04-14 08:40:34 -07:00
Xiang Li 4a152290f4 pkg/kubelet: fix error msg in GetHostIP 2015-04-13 22:44:23 -07:00
Yifan Gu e1feed9a8b kubelet/container: Replace DockerCache with RuntimeCache. 2015-04-13 18:16:05 -07:00
Yifan Gu a5e6bea9b5 kubelet/container: Update the cache interface. 2015-04-13 17:38:18 -07:00
Yifan Gu 7fedb14c27 kubelet: Remove unused docker functions.
Remove kubelet.getPodInfraContainer().
Remove dockertools.RemoveContainerWithID().
Remove dockertools.FindContainersByPod().

Also replace the useless test with a test for GetPods().
2015-04-13 16:32:18 -07:00
Yifan Gu 4cdb1bf9ce kubelet: Introduce PodInfraContainerChanged().
Update tests.
2015-04-13 16:18:52 -07:00
Yifan Gu d14cb8f1dd kubelet: Introduce PodInfraContainerChanged().
This functions computes in ahead whether we need to restart the pod
infra container.
2015-04-13 16:18:52 -07:00
Yifan Gu dda600e45c kubelet/dockertools: Add puller interfaces in the containerManager. 2015-04-13 15:34:22 -07:00
Dawn Chen a0fa592b80 Merge pull request #6778 from yifan-gu/getpods
kubelet/dockertool: Move Getpods() to DockerManager.
2015-04-13 14:50:52 -07:00
Yifan Gu a3675e08f2 kubelet/dockertool: Move Getpods() to DockerManager. 2015-04-13 14:05:22 -07:00
Paul Morie c98e89fca0 Set rootcontext of emptyDir tmpfs mounts correctly 2015-04-13 12:50:36 -04:00
Paul Morie 042ac3d800 Fix build (kubelet/util.go) 2015-04-13 12:29:36 -04:00
Victor Marmol ab68bcb97f Merge pull request #6733 from xiang90/kub_cap
pkg/kubelet: move the capabilities related code to util.go
2015-04-13 09:02:36 -07:00
Victor Marmol 4e3b4bd10e Merge pull request #6731 from xiang90/util-kubulet
pkg/kubelet: kill a TODO in util.go
2015-04-13 09:01:00 -07:00
Xiang Li cef744ecaa pkg/kubelet: move the capabilities related code to util.go 2015-04-11 12:09:11 -07:00
Xiang Li d24f60b5b8 pkg/kubelet: clean up status manager 2015-04-11 11:37:07 -07:00
Xiang Li cea38a2f4e pkg/kubelet: kill a TODO in util.go
Move kubelet.CapabilitiesSetup to capabilities.Setup
2015-04-11 10:55:39 -07:00
Tobi Knaup 3932dfd8bb Log an error when update channel is closed. 2015-04-10 17:30:04 -07:00
Dawn Chen fff6cebb5f Merge pull request #6711 from yujuhong/container_status
Kubelet: surface the container creation/start failure reason
2015-04-10 17:19:32 -07:00
Yu-Ju Hong bb417e82d7 Kubelet: surface the container creation/start failure reason
Container creation/start failure cannot be reproduced by inspecting the
containers. This change caches such errors so that kubelet can retrieve it
later.

This change also extends FakeDockerClient to support setting error response
for a specific function.
2015-04-10 16:02:27 -07:00
Deyuan Deng 868e05ce96 Remove nodeinfo endpoint from kubelet 2015-04-10 15:47:32 -04:00
Daniel Smith e2093798cb Merge pull request #6675 from wojtek-t/nodes_support_field_selector
FieldSelector for node List()
2015-04-10 10:30:55 -07:00
Victor Marmol 1563a7636a Merge pull request #6652 from dchen1107/podstatus
Populate last terminated container information
2015-04-10 09:21:58 -07:00
Clayton Coleman fce3e5a2bb Merge pull request #6574 from ncdc/exec-portforward-no-command-pipes
Don't use command pipes for exec/port forward
2015-04-10 12:07:21 -04:00
Wojciech Tyczynski 88eb0b0295 FieldSelector for node List() 2015-04-10 12:53:16 +02:00
Abhishek Shah 964bc6b85d fix compilation 2015-04-09 17:19:13 -07:00
Victor Marmol 7ce5e7bc73 Merge pull request #6661 from vishh/sys_oom
Updating cadvisor deps and adding events cadvisor interface to kubelet
2015-04-09 16:28:20 -07:00
Dawn Chen 563f2965ba Populate last terminated container information 2015-04-09 16:10:13 -07:00
Vishnu Kannan de79209970 Adding events API to cadvisor interface. 2015-04-09 16:02:34 -07:00
Daniel Smith f16abee122 Merge pull request #6653 from yifan-gu/fix_pid_test
kubelet/fake_docker_client: Use self's PID instead of 42 in testing.
2015-04-09 16:01:10 -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
Yifan Gu 12b382ce76 kubelet/fake_docker_client: Use self's PID instead of 42 in testing.
This is safer to use self's PID than some arbitrary PID (say 42),
since the kubelet will set the oom_score_adj for real.
2015-04-09 14:31:44 -07:00
Andy Goldstein 00e24603cb Fix TestServeExecInContainerIdleTimeout flake
Remove creation of stream from TestServeExecInContainerIdleTimeout as
it's not necessary to very idle timeout.

Increase stream creation and ack timeouts to 30 seconds.

Fixes #5628
2015-04-09 16:44:56 -04: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 d4513c2890 kubelet/DockerManager: Fix returning empty error from GetPodStatus(). 2015-04-08 17:55:30 -07:00
Vish Kannan 43949b41d4 Merge pull request #6586 from dchen1107/podstatus
small cleanup by removing useless generatePodStatus
2015-04-08 14:59:23 -07:00
Tobi Knaup 3efff6d4e8 kubelet syncloop should stop if/when updates chan closes 2015-04-08 14:45:16 -07:00
Dawn Chen 914616a195 Merge pull request #6592 from vishh/kubelet_logging
Improve kubelet logging around startup.
2015-04-08 14:35:53 -07:00
David Oppenheimer 4ffc2aad21 Merge pull request #6146 from kazegusuri/node_client_label
List in NodesInterface takes label selector
2015-04-08 14:22:53 -07:00
Vishnu Kannan 2b5cad6acf Improve kubelet logging around startup. This might help detect any lockup issues during startup. 2015-04-08 21:02:15 +00:00
Dawn Chen b6d846aea5 small cleanup by removing useless generatePodStatus 2015-04-08 13:38:06 -07:00
Andy Goldstein 4c1cba5312 Don't use command pipes for exec/port forward
Switch to passing the streams for Stdin/Stdout/Stderr instead of using
StdinPipe() etc because the pipes are incompatible with Run()/Wait().
2015-04-08 13:42:42 -04: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
Masahiro Sano d04cc5ced4 List in NodesInterface takes label selector 2015-04-08 23:41:27 +09:00
Wojciech Tyczynski 8a5c76356c Revert "Stop the bleeding for #6059"
This reverts commit 6be09c5e97.
2015-04-08 13:29:29 +02:00
gmarek 72182735b9 Remove Node Controllers ability to pull status from Kubelet 2015-04-08 09:44:42 +02:00
Daniel Smith c1390a0836 version field selector field names in the client 2015-04-07 16:59:57 -07: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
David Oppenheimer 402bf60366 Merge pull request #6214 from gmarek/move_consts_to_flags
Move NodeController constants to flags
2015-04-07 11:31:11 -07:00
Victor Marmol ef3cdb2f18 Merge pull request #6491 from yifan-gu/depreciate_getkubeletdockercontainers
kubelet: Refactor RunInContainer/ExecInContainer/PortForward.
2015-04-07 11:00:16 -07:00
Cesar Wong e64d7337b3 Move flushwriter from Kubelet server to a common util package
Exposes a Wrap function to wrap a given writer into a writer that
flushes with every write if the writer also implements the io.Flusher
interface.
2015-04-07 07:46:30 -04:00
gmarek 321a81047c Move NodeController constants to flags 2015-04-07 12:33:03 +02:00
Yifan Gu ba1ad9fad2 kubelet: Refactor RunInContainer/ExecInContainer/PortForward.
Replace GetKubeletDockerContainers() with findContainer().
2015-04-06 17:14:46 -07:00
Victor Marmol 7716804a0d Merge pull request #6470 from yifan-gu/get_recent
kubelet: Remove GetRecentDockerContainersWithNameAndUUID.
2015-04-06 14:25:59 -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
James DeFelice d194af6b4f allow for more easily customized kubelet creation and initialization 2015-04-06 18:51:42 +00:00
Yu-Ju Hong 0e1bd18b3e Fix the kubelet node watch 2015-04-04 09:59:39 -07:00