Commit Graph

116 Commits (bfde7e0735d1b09974346ada8bdbe91b6d81b1c7)

Author SHA1 Message Date
Yu-Ju Hong d01bc660b5 Kubelet: a step towards to better encapsulation of docker functions
We want to stop leaking more docker details into kubelet, and we also want to
consolidate some of the existing docker interfaces/structs. This change creates
DockerManager as the new home of some functions in dockertools/docker.go. It
also absorbs containerRunner. In addition, GetDockerPodStatus is renamed to
GetPodStatus with the entire pod passed to it so that it is simialr to the what
is defined in the container Runtime interface.

Eventually, DockerManager should implement the container Runtime interface, and
integrate DockerCache with a flag to turn on/off caching. Code in kubelet.go
should not be using docker client directly.
2015-04-02 13:26:39 -07:00
Paul Morie 0335e350c7 Fix issue 6294: networking e2e should set args, not command 2015-04-01 11:40:23 -04:00
Paul Morie 7628b37d78 Add control over container entrypoint 2015-03-31 12:32:03 -04:00
Yifan Gu 7b1ea6b41d kubelet_test: Fix copy bug.
Initialize the slice before copying in verifyUnorderedCalls()
and verifyStringArrayEqualsAnyOrder().
2015-03-30 17:17:42 -07:00
Yu-Ju Hong 3ad0e22cdd Kubelet: allow docker to examine terminated container
Removing the if statement so that docker can continue returning the status of
terminated containers.
2015-03-27 18:04:50 -07:00
Vishnu Kannan 14a48ad026 Update pod ip using active container only. 2015-03-27 00:38:43 +00:00
Victor Marmol 0fb131c4f9 Merge pull request #5975 from yifan-gu/refactor_runContainer
kubelet: Refactor kubelet.runContainer.
2015-03-26 15:50:37 -07:00
Yifan Gu aa2e7fe688 kubelet_test: Add verifyUnorderedCalls().
This fixes TestSyncPodsDeletesWithNoPodInfraContainer.
Since we need to sync two pods in parallel, we should not verify
the docker calls in strict order.
2015-03-26 15:25:51 -07:00
Yifan Gu 5f08555f45 kubelet: Refactor kubelet.runContainer.
Push the run container logic into container runtime.
2015-03-26 13:43:45 -07:00
Piotr Szczesniak 31901ed9d0 Changed PodInfo to be a list
This change is to make API consistent with our convention.

Fixes #3622
2015-03-26 10:15:25 +01:00
Yifan Gu 31bb11ac2a kubelet: Move pod name helpers to pkg/kubelet/container/runtime.go 2015-03-24 16:08:04 -07:00
Yifan Gu 13250c904f kubelet: Replace GetKubeletDockerContainers with GetPods in syncPod/SyncPods. 2015-03-24 16:01:38 -07:00
Yifan Gu f4c3ccf639 dockertools: Introduce GetPods() for docker runtime. 2015-03-24 16:01:37 -07:00
Nataliia Uvarova 73c2338320 Refactor build/parse dockername. #3511
Functions Build/ParseDockerName now work with struct instead of the long
list of arguments. This new struct also was reused in the kubelet.go
instead of auxilary podContainer struct.
2015-03-21 09:09:03 +01:00
Dawn Chen 4910be6dcb Remove PodIP from ContainerStatus 2015-03-19 10:42:01 -07:00
Victor Marmol 9586b39bb7 Merge pull request #5555 from fgrzadkowski/sync_pod_status
Periodically update pod status from kubelet.
2015-03-18 10:14:07 -07:00
Filip Grzadkowski 1a352b74ba Periodically update pod status from kubelet. 2015-03-18 12:11:39 +01:00
Andy Goldstein 7b07960758 Use docker's ParseRepositoryTag when pulling 2015-03-17 20:15:13 -04:00
Victor Marmol 0c664a343c Adding errors to Kubelet events.
This will help while debugging issues that generate events.

Also removed unecessary log line.
2015-03-17 15:55:25 -07:00
Zach Loafman 5496686f33 Revert "Use docker's ParseRepositoryTag when pulling" 2015-03-17 15:16:33 -07:00
Andy Goldstein c08f41c18b Use docker's ParseRepositoryTag when pulling 2015-03-17 13:23:17 -04:00
Filip Grzadkowski 18b728ff44 Revert "Periodically update pod status from kubelet." 2015-03-17 13:51:45 +01:00
Filip Grzadkowski 336525a27d Periodically update pod status from kubelet. 2015-03-16 23:03:03 +01:00
Dawn Chen 732d4cb2b9 Fix a regression introduced lately: When any given PodInfraContainer on a node
is killed, kubelet kills all remaining containers no matter which pod that
container belongs to.

Fixed #5373
2015-03-13 15:46:30 -07:00
Victor Marmol 4675fcc57d Make ParseDockerName() return an error.
This forces callers to handle cases where the container name could not
be parsed.
2015-03-12 16:33:16 -07:00
Dawn Chen 88e0b04916 Merge pull request #5287 from ncdc/master
Remove debugging log message from ExecInContainer
2015-03-11 09:45:37 -07:00
Wojciech Tyczynski 80576dfed3 Change PodWorkers to have desired cache. 2015-03-11 16:38:31 +01:00
Andy Goldstein 0c798bbe52 Remove debugging log message from ExecInContainer 2015-03-11 10:07:14 -04:00
Yu-Ju Hong fe70be9261 kubelet: revamp the pod/container naming scheme
There are two main goals for this change.

 1. Fix the naming scheme in kubelet so that it accepts DNS subdomain
    name/namespaces correctly (#4920). The design is discussed in #3453.

 2. Prepare for syncing the static pods back to the apiserver(#4090). This
    includes

  - Eliminate the source component in the internal full pod name (#4922). Pods
    no longer need sources as they will all be sync'd via apiserver.

  - Changing the naming scheme for the static (file-, http-, and etcd-based)
    pods such that they are distinguishable when syncing back to the apiserver.

The changes includes:
  *	name = <pod.Name>-<hostname>
  * namespace = <cluster_namespace> (i.e. "default" for now).
  * container_name = k8s_<contianer_name>.<hash_of_container>_<pod_name>_<namespace>_<uid>_<random>

Note that this is not backward-compatible, meaning the kubelet won't recognize
existing running containers using the old naming scheme.
2015-03-06 13:14:45 -08:00
Victor Marmol b314dc6025 Merge pull request #5032 from yifan-gu/clean_syncPod
Refactor pkg/kubelet/kubelet.go: syncPod().
2015-03-05 17:24:20 -08:00
Yifan Gu ed1823e276 Refactor pkg/kubelet/kubelet.go: syncPod().
Makes the syncPod() takes only the containers that belongs to the pod.
2015-03-05 16:40:50 -08:00
Victor Marmol 33e6c3ebb3 DockerCache doesn't get containers at startup.
Fixes #5092.
2015-03-05 16:25:13 -08:00
Dawn Chen dad365fb2b Hide POD container from end users 2015-03-02 17:03:28 -08:00
Wojciech Tyczynski dcef5e2955 Introduce DockerCache in Kubelet. 2015-02-24 09:10:07 +01:00
Victor Marmol da2f4b6d61 Check Docker init PID is valid before we use it.
This gives us an error if the PID is not returned as we expect.
2015-02-20 13:10:40 -08:00
Andy Goldstein 5bd0e9ab05 Add streaming command execution & port forwarding
Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
2015-02-20 09:57:02 -05:00
Dawn Chen c843adbd8f Create docker.Container obj with Name. Integration test is using fake_docker_client
to create and start a fake container. When StartContainer, it pass a name as docker
ID for testing purpose, but leave Name uninitialized. This PR fixes such issue.

Fixed #4472.
2015-02-17 15:23:21 -08:00
Victor Marmol 5d6ad845cc Use Docker name (not ID) to parse Kubernetes components.
Since the parsing function doesn't return an error all the components
returned empty strings. This caused us to enforce the MaxContainerLimit
as a global limit instead of a per-container limit.

Fixes #4413.
2015-02-13 13:08:15 -08:00
Clayton Coleman 09f18031fe Merge pull request #4285 from brendandburns/auth
Add a more detailed error message for potential auth fails in docker pull.
2015-02-13 12:08:48 -05:00
Brendan Burns 0532c46217 Add a more detailed error message for potential auth fails in docker pull. 2015-02-12 17:00:59 -08:00
Vishnu Kannan 922881fcd2 Improve error handling for '/containerLogs' API in kubelet. 2015-02-12 02:22:26 +00:00
Mike Danese 043794492e implement readiness. 2015-02-10 08:30:09 -08:00
Federico Simoncelli e01df69565 api: add image's id to ContainerStatus
Sometimes for external applications it is important to identify
exactly what images are running. Since tags can be moved to point
to newer builds this information can be used to identify old images
running.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-06 09:01:14 -05:00
Brendan Burns 8b25b43039 Merge pull request #4117 from wojtek-t/validate_docker_version
Check Docker version in Kubelet /healthz handler
2015-02-05 10:06:33 -08:00
Brendan Burns cfe5b14114 Wait until containers actually finish running before trying to clean up
volumes or pods.
2015-02-04 17:28:41 -08:00
Wojciech Tyczynski 524cdba101 Fix hack/test-cmd.sh test. 2015-02-05 01:58:26 +01:00
Wojciech Tyczynski ead67108ce Use existing method to get Docker version. 2015-02-04 20:50:21 +01:00
Tim Hockin 70ab406751 Use a constant for the pod infra container name
This is an implementation detail that has leaked out of kubelet.  Use a
constant to prevent divergence, for now.  Plan to get rid of it.

@dchen1107
2015-01-28 10:13:02 -08:00
Tim Hockin 7e6f3af937 Merge pull request #3817 from mrunalp/feature/shared_ipc
Shared IPC namespace for containers in a pod
2015-01-27 15:41:34 -08:00
Mrunal Patel b6a0ff1003 IP: Shared IPC. 2015-01-27 09:26:36 -08:00