Commit Graph

498 Commits (6485584fca5082a45f0eb24b1645111ea75b46c2)

Author SHA1 Message Date
Random-Liu 6e92ddf9e1 Cleanup pod print in dockertools/manager.go, prober/prober.go and
runonce.go
2015-12-28 14:07:37 -08:00
Vishnu Kannan 3c0745211f Fix docker root dir detection. 2015-12-17 10:24:30 -08:00
deads2k d0aaf13920 use constants for group names 2015-12-14 10:04:10 -05:00
k8s-merge-robot 3d24d25fd8 Merge pull request #17764 from jiangyaoguo/make-containerspecchange-private
Auto commit by PR queue bot
2015-12-11 17:40:34 -08:00
Yu-Ju Hong c646255579 Replace podFullName with format.Pod() in logging messages 2015-12-07 13:41:52 -08:00
jiangyaoguo 5f77f2b5a9 make PodContainerSpecChange private 2015-12-07 09:28:15 +08:00
k8s-merge-robot 810181fb7b Merge pull request #17278 from ZJU-SEL/fix-nil-tag
Auto commit by PR queue bot
2015-12-06 12:52:39 -08:00
Random-Liu 3cbdf79f8c Change original PodStatus to APIPodStatus, and start using kubelet internal PodStatus in dockertools 2015-12-04 17:37:39 -08:00
Harry Zhang 5552d7007c Add default when latest not claimed 2015-11-30 17:10:50 +08:00
harry zhang 121c7046aa Move parsers into util 2015-11-29 22:15:11 -08:00
k8s-merge-robot 4eb010b1f7 Merge pull request #17694 from hongchaodeng/ratelimit
Auto commit by PR queue bot
2015-11-26 13:12:26 -08:00
Random-Liu c6d02b83e5 Cleanup container_gc_test.go 2015-11-25 10:37:39 -08:00
k8s-merge-robot ff3f240de2 Merge pull request #17533 from Random-Liu/fix-fake-docker-client
Auto commit by PR queue bot
2015-11-25 08:44:26 -08:00
Avesh Agarwal 3d5207fd73 This commit adds type information to events.
This addresses issue #15624.
2015-11-24 09:59:54 -05:00
Hongchao Deng 13d152a873 RateLimiter: change CanAccept() to TryAccept() 2015-11-23 16:42:53 -08:00
k8s-merge-robot 8a306a7527 Merge pull request #17234 from Random-Liu/move-more-info-to-docker-label
Auto commit by PR queue bot
2015-11-21 10:45:09 -08:00
Daniel Smith 874b4f85d9 Merge pull request #17259 from yujuhong/raw_pod_status
kubelet: add RawPodStatus and related functions
2015-11-20 14:23:19 -08:00
Lantao Liu 90ac508524 Cleanup fake_docker_client.go and manager_test.go 2015-11-19 19:03:35 -08:00
Lantao Liu f08097515f Move more things into docke label, and add label test 2015-11-18 23:17:16 -08:00
Yu-Ju Hong 760309f349 kubelet: add RawPodStatus and related functions
RawPodStatus will be the internal status of the pod that kubelet relies on for
syncing.
2015-11-17 17:04:05 -08:00
k8s-merge-robot 1334401888 Merge pull request #17202 from brendandburns/fix2
Auto commit by PR queue bot
2015-11-17 00:49:13 -08:00
k8s-merge-robot 0c9bc3215d Merge pull request #14469 from thockin/intstr
Auto commit by PR queue bot
2015-11-16 23:20:37 -08:00
k8s-merge-robot 138a78db1f Merge pull request #16580 from jiangyaoguo/check-image-exist-after-pulled
Auto commit by PR queue bot
2015-11-16 22:53:34 -08:00
Jeff Lowdermilk 70d89a3541 Merge pull request #13571 from yujuhong/lifecycle_v0
kubelet: add a generic pod lifecycle event generator
2015-11-16 14:59:40 -08:00
Tim Hockin ba383bcfeb Refactor IntOrString into a new pkg
pkg/util/intstr is a cleaner encapsulation for this type and supporting
functions.  No behavioral change.
2015-11-16 10:57:52 -08:00
k8s-merge-robot ebe5649939 Merge pull request #16824 from mattmoor/master
Auto commit by PR queue bot
2015-11-16 09:12:35 -08:00
zhengguoyong d5f2bb00a7 Del unused var 2015-11-16 15:53:20 +08:00
Matt Moore b750d1dddc Drop the beta for GCR v2 images.
beta.gcr.io is no longer needed to pull through v2.
2015-11-14 12:19:02 -08:00
Brendan Burns fb576f30c8 Refactor an interface for style 2015-11-13 15:56:27 -08:00
Yu-Ju Hong 3beae6b70b Add Status in the runtime Container type
This is necessary for the generic PLEG to distinguish container events.
2015-11-13 09:55:36 -08:00
k8s-merge-robot 0bb894173c Merge pull request #17187 from Random-Liu/deprecate-container-without-termination-message-path
Auto commit by PR queue bot
2015-11-13 04:49:17 -08:00
k8s-merge-robot 0d9f2dc5fd Merge pull request #17081 from yujuhong/docker_tests
Auto commit by PR queue bot
2015-11-12 22:56:29 -08:00
Lantao Liu 1018d32d4f Deprecate old containers without TerminationMessagePath label 2015-11-12 15:30:14 -08:00
k8s-merge-robot 8761ad3ec1 Merge pull request #15464 from jiangyaoguo/bubble-up-reason-when-killing-pod
Auto commit by PR queue bot
2015-11-11 14:17:27 -08:00
Yu-Ju Hong 543391f1dc Clean up unit tests using FakeDockerClient
Add a helper method to set the container map and list at the same time, without
having to specify them separately. This reduces the effort required for
adding/modifying tests as well as making the code more concise.
2015-11-10 16:51:35 -08:00
k8s-merge-robot 7b3f37a892 Merge pull request #17003 from jiangyaoguo/fix-error-sync-pod-message
Auto commit by PR queue bot
2015-11-10 04:01:28 -08:00
jiangyaoguo b0f0c294d9 make reasons constants with clarity 2015-11-09 23:42:14 +08:00
jiangyaoguo 55bf786216 adjust container event message 2015-11-09 23:42:13 +08:00
jiangyaoguo 02f8e4277f bubble up reason when killing pod 2015-11-09 23:42:13 +08:00
k8s-merge-robot 5fe3733f95 Merge pull request #16272 from jiangyaoguo/remove-infra-container-event
Auto commit by PR queue bot
2015-11-09 06:05:35 -08:00
jiangyaoguo 85d554bfc4 fix FailSync event message 2015-11-09 15:49:52 +08:00
jiangyaoguo 3b512add9c check image present after pulled image with no error 2015-11-06 10:58:55 +08:00
jiangyaoguo 39858db29e add new event when infra-container change 2015-11-04 17:04:32 +08:00
jiangyaoguo 3ce5a51007 remove implicitly required container event 2015-11-04 16:47:17 +08:00
Yu-Ju Hong 2eb17df46b kubelet: independent pod syncs and backoff on error
Currently kubelet syncs all pods every 10s. This is not preferred because
 * Some pods may have been sync'd recently.
 * This may cause all the pods to be sync'd at once, causing undesirable
   CPU spikes.

This PR replaces the global syncs with independent, periodic pod syncs. At the
end of syncing, each pod worker will enqueue itslef with a future timestamp (
current time + sync interval), when it will be due for another sync.
 * If the pod worker encoutners an sync error, it may requeue with a different
   timestamp to retry sooner.
 * If a sync is triggered by the update channel (events or spec changes), the
   pod worker would enqueue a new sync time.

This change is necessary for moving to long or no periodic sync period once pod
lifecycle event generator is completed. We will still rely on the mechanism to
requeue the pod on sync error.

This change also makes sure that if a sync does not succeed (either due to
real error or the per-container backoff mechanism), an error would be propagated
back to the pod worker, which is responsible for requeuing.
2015-11-03 13:29:08 -08:00
k8s-merge-robot fe2d44e842 Merge pull request #16653 from Random-Liu/remove-unused-type
Auto commit by PR queue bot
2015-11-03 02:45:22 -08:00
Lantao Liu 894dc5a5a2 Move TerminationMessagePath into docker label. 2015-11-02 14:32:58 -08:00
Lantao Liu eff4533efc Move findPodContainer to docker_test.go 2015-11-02 09:49:07 -08:00
Lantao Liu b127901871 Remove unused type DockerContainers.
Type DockerContainers and function FindPodContainer() are never used.
Remove them to simplify the docker runtime api.
2015-11-01 18:49:05 -08:00
Alex Robinson 0eb7243b95 Merge pull request #15994 from dchen1107/docker
Failed docker health check and mark the node NotReady when docker version is below 1.6.2 (API ve…
2015-10-30 15:39:04 -07:00
Dawn Chen a39e1e96dc Mark NodeNotReady for docker version below 1.6.2 2015-10-30 13:48:51 -07:00
k8s-merge-robot eb140495ab Merge pull request #16414 from Random-Liu/put-podname-into-label
Auto commit by PR queue bot
2015-10-30 12:45:25 -07:00
Lantao Liu b3585a5209 Move docker label related functions into labels.go and add pod name, pod namespace and pod uid into docker label 2015-10-29 22:42:25 -07:00
Clayton Coleman 2335bfa351 Allow Docker container logs to be tail'd and follow'd
Relaxes the very very ancient restriction we put in place to keep the
original API surface area PR small. Better to be consistent with actual
expected use of tail.
2015-10-29 17:12:38 -04:00
Sami Wagiaalla 1d352a16b8 Support volume relabling for pods which specify an SELinux label 2015-10-28 09:26:58 -04:00
k8s-merge-robot df265b2d6e Merge pull request #15510 from aveshagarwal/master-selflink-objref
Auto commit by PR queue bot
2015-10-27 00:37:21 -07:00
Daniel Smith 3cc2ae4da6 Merge pull request #15831 from zhengguoyong/modify_pod_networkplugin_setup_errmsg
Modify duplicate err msg
2015-10-26 17:07:18 -07:00
k8s-merge-robot 5280540384 Merge pull request #15965 from Random-Liu/use-docker-label
Auto commit by PR queue bot
2015-10-24 13:19:40 -07:00
Lantao Liu 67a7633202 Put restart count into docker label 2015-10-23 13:02:32 -07:00
Filip Grzadkowski 165169ab1c Merge pull request #16052 from ArtfulCoder/mount_etc_hosts
kubelet manages /etc/hosts file
2015-10-23 14:07:34 +02:00
Filip Grzadkowski edd10d8a83 Merge pull request #15914 from vishh/serialize-pull
make kubelet image pulls serialized by default.
2015-10-23 14:04:23 +02:00
Vishnu kannan 0df4b46d4c Adding a kubelet flag to optionally enable parallel image pulls. 2015-10-22 17:19:51 -07:00
Abhishek Shah ba6469d478 kubelet manages /etc/hosts file 2015-10-22 13:27:05 -07:00
Paul Morie 393e2bc019 Inline some SecurityContext fields into PodSecurityContext 2015-10-21 19:01:17 -04:00
Vishnu kannan 94b45830c3 make kubelet image pulls serialized by default. 2015-10-20 14:50:44 -07:00
eulerzgy af355df9a4 modify err log msg 2015-10-20 09:08:27 +08:00
Tim St. Clair a263c77b65 Refactor liveness probing
This commit builds on previous work and creates an independent
worker for every liveness probe. Liveness probes behave largely the same
as readiness probes, so much of the code is shared by introducing a
probeType paramater to distinguish the type when it matters. The
circular dependency between the runtime and the prober is broken by
exposing a shared liveness ResultsManager, owned by the
kubelet. Finally, an Updates channel is introduced to the ResultsManager
so the kubelet can react to unhealthy containers immediately.
2015-10-19 15:15:59 -07:00
k8s-merge-robot 09a3871506 Merge pull request #15755 from zhengguoyong/del_capatical_packagename_for_cadvisorApi2
Auto commit by PR queue bot
2015-10-18 04:04:11 -07:00
Clayton Coleman e929baf91a Support stdinOnce, which allows run-once STDIN injection
This allows containers to wait for input before startup by listening
on STDIN, and after STDIN is closed, continue running. Matches the
Docker syntax.
2015-10-16 20:33:50 -04:00
k8s-merge-robot 916ddbca65 Merge pull request #14182 from jiangyaoguo/distinguish-registry-unavailable-and-pull-failure
Auto commit by PR queue bot
2015-10-16 16:22:22 -07:00
Mikaël Cluseau 0375743241 hairpin: unless the pod is on the host's network 2015-10-16 16:15:35 +11:00
eulerzgy 31c09bdcb8 Del capatical local packagename for cadvisorApi 2015-10-16 11:03:50 +08:00
Andy Goldstein 7d02ea9bb7 Fix race condition for consuming podIP via downward API. 2015-10-13 16:39:11 -04:00
Avesh Agarwal 8e4a8b7260 Addresses issue #6596.
Removes ForTesting_ReferencesAllowBlankSelfLinks.
Fixes controller's persistentvolumes unit tests.
2015-10-12 19:21:48 -04:00
feisky 296e44cc08 Delete infra container if network plugin fails 2015-10-12 23:23:17 +08:00
k8s-merge-robot 8580804f77 Merge pull request #15138 from mattmoor/limited-beta-rewrite
Auto commit by PR queue bot
2015-10-10 11:41:34 -07:00
k8s-merge-robot 3bd7aafcd2 Merge pull request #15082 from samsabed/restartNever
Auto commit by PR queue bot
2015-10-10 11:19:44 -07:00
Yu-Ju Hong a3e60cc32e Rename imported package local name kubeletTypes to kubetypes
According to the naming guidelines, package name should not include mixedCaps.
2015-10-09 10:24:31 -07:00
k8s-merge-robot 273c9ce503 Merge pull request #15177 from timstclair/restart-policy
Auto commit by PR queue bot
2015-10-09 09:41:22 -07:00
k8s-merge-robot 44699f5852 Merge pull request #15238 from mpuncel/mpuncel/cleanup
Auto commit by PR queue bot
2015-10-09 08:12:17 -07:00
feisky d624c7de51 Pass the ContainerGCPolicy in Runtime.GarbageCollect 2015-10-09 06:57:10 +08:00
feisky 69867fb502 Refactor container gc tests 2015-10-09 06:57:09 +08:00
feisky 4c8a836260 Move original container gc to docker runtime 2015-10-09 06:57:09 +08:00
jiangyaoguo af46c69553 Distinguish image registry unavailable and pull failure 2015-10-09 01:16:31 +08:00
Piotr Szczesniak 95b293c615 Merge pull request #13516 from samsabed/backoff-image-reason
backoff image pulling on failure
2015-10-08 13:05:32 +02:00
Tim St. Clair 551eff63b8 Use strong type for container ID
Change all references to the container ID in pkg/kubelet/... to the
strong type defined in pkg/kubelet/container: ContainerID

The motivation for this change is to make the format of the ID
unambiguous, specifically whether or not it includes the runtime
prefix (e.g. "docker://").
2015-10-07 10:58:05 -07:00
Michael Puncel 4921a62f3a Fix comment typo and remove unnecessary line 2015-10-07 09:53:27 -07:00
Sam Abed fdf712cd84 back-off image pull on failure
Signed-off-by: Sam Abed <samabed@gmail.com>
2015-10-07 21:12:42 +11:00
Sam Abed e20d599ace Apply pod restart policy to Containers that fail to start. Fix Reason and Message for succeeding or failing containers
Signed-off-by: Sam Abed <samsabed@gmail.com>
2015-10-07 12:20:28 +11:00
Matt Moore eeb4eeb17c Move pause and fluentd-elasticsearch to GCR v2.
This scopes down the initially ambitious PR:
https://github.com/kubernetes/kubernetes/pull/14960 to replace just
`pause` and `fluentd-elasticsearch` to come through `beta.gcr.io`.

The v2 versions have been pushed under new tags, `pause:2.0` and
`fluentd-elastisearch:1.12`.

NOTE: `beta.gcr.io` will still serve images using v1 until they are repushed with v2.  Pulls through `gcr.io` will still work after pushing through `beta.gcr.io`, but will be served over v1 (via compat logic).
2015-10-06 16:39:07 -07:00
Tim St. Clair f67879eac7 Check pod RestartPolicy before restarting unhealthy containers 2015-10-06 13:17:45 -07:00
Paul Morie 227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Alex Robinson 99936383b0 Merge pull request #15079 from gmarek/fix-kubemark
Turn on smarter FakeDockerClient in HollowNode.
2015-10-05 17:00:49 -07:00
Alex Robinson d8120f5425 Merge pull request #14221 from timstclair/readiness-workers
Refactor readiness probing
2015-10-05 13:26:54 -07:00
gmarek 22b318fc5c Turn on smarter FakeDockerClient in HollowNode. 2015-10-05 21:36:54 +02:00
Tim St. Clair 52ece0c34e Refactor readiness probing
Each container with a readiness has an individual go-routine which
handles periodic probing for that container. The results are cached, and
written to the status.Manager in the pod sync path.
2015-10-02 15:37:10 -07:00
Andy Goldstein ed021fed4c Port forwarding fixes
Correct port-forward data copying logic so that the server closes its
half of the data stream when socat exits, and the client closes its half
of the data stream when it finishes writing.

Modify the client to wait for both copies (client->server,
server->client) to finish before it unblocks.

Fix race condition in the Kubelet's handling of incoming port forward
streams. Have the client generate a connectionID header to be used to
associate the error and data streams for a single connection, instead of
assuming that streams n and n+1 go together. Attempt to generate a
pseudo connectionID in the server in the event the connectionID header
isn't present (older clients); this is a best-effort approach that only
really works with 1 connection at a time, whereas multiple concurrent
connections will only work reliably with a newer client that is
generating connectionID.
2015-09-30 20:03:49 -04:00
Tim Hockin 5fbcb72241 Merge pull request #14525 from dcbw/cni
CNI network plugin
2015-09-29 21:13:26 -07:00
liguangbo 12299087da Change Oom to OOM 2015-09-28 18:18:04 +08:00
Rajat Chopra 01dd813ce3 CNI network plugin
Add an experimental network plugin implementation named "cni" that
uses the Container Networking Interface (CNI) specification for
configuring networking for pods.

https://github.com/appc/cni/blob/master/SPEC.md
2015-09-25 22:30:37 -05:00