Commit Graph

336 Commits

Author SHA1 Message Date
Daniel Smith
75e1451363 Merge pull request #20742 from kubernetes/revert-20615-deprecate-hostconfig-at-container-start
Revert "Deprecate HostConfig at container start"
2016-02-05 14:01:43 -08:00
Lantao Liu
bb9457e7a3 Revert "Deprecate HostConfig at container start" 2016-02-05 12:50:35 -08:00
Random-Liu
45e3a1f596 Remove old reason cache 2016-02-05 19:19:46 +00:00
Random-Liu
2b7d0182ca Remove ConvertPodStatusToAPIPodStatus from runtime interface 2016-02-05 19:19:46 +00:00
k8s-merge-robot
bd67b8a5db Merge pull request #20192 from Random-Liu/remove-get-api-podstatus
Auto commit by PR queue bot
2016-02-05 11:00:42 -08:00
k8s-merge-robot
ae15a4437b Merge pull request #19944 from mwielgus/simple-cm
Auto commit by PR queue bot
2016-02-05 06:41:28 -08:00
k8s-merge-robot
df0bbd45d7 Merge pull request #20615 from Random-Liu/deprecate-hostconfig-at-container-start
Auto commit by PR queue bot
2016-02-05 04:54:28 -08:00
Marcin Wielgus
bf0c881263 Set Docker custom metric label for cAdvisor if custom metric volume is mounted 2016-02-05 12:00:02 +01:00
k8s-merge-robot
2084fba199 Merge pull request #18842 from vishh/kubelet_docker
Auto commit by PR queue bot
2016-02-04 17:08:34 -08:00
Lantao Liu
8118092d11 Deprecate HostConfig at container start 2016-02-04 15:35:14 -08:00
Vishnu kannan
df1f164b34 Do not fail container creation if the contaienr exits before applyting
oom score adjust.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-04 13:39:19 -08:00
Saad Ali
7d70edc91f Merge pull request #20553 from jonboulle/yifan-gu-rkt_dns
rkt: Add DNS support
2016-02-04 10:55:38 -08:00
Lantao Liu
4a386f881f Deprecate HostConfig at container start 2016-02-04 01:00:03 +00:00
Dan Williams
fabb65c13f Add a network plugin that duplicates "configureCBR0" functionality 2016-02-03 10:08:08 -06:00
Yifan Gu
e9139bb0e5 kubelet: Rename RunContainerOptionsGenerator to RuntimeHelper.
Also add GetClusterDNS() to the interface to let rkt get the
DNS servers, DNS names.
2016-02-03 14:54:08 +01:00
Random-Liu
7b4cdb6f8f Remove GetAPIPodStatus from runtime interface 2016-02-02 23:41:55 +00:00
k8s-merge-robot
c0fd002fbb Merge pull request #20019 from thockin/dont-cni-hostnet-pods
Auto commit by PR queue bot
2016-02-02 01:43:24 -08:00
harry
1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
k8s-merge-robot
9fef5f2938 Merge pull request #19785 from Random-Liu/remove-get-podstatus-and-apipodstatus
Auto commit by PR queue bot
2016-01-30 11:35:26 -08:00
k8s-merge-robot
29c640d5ba Merge pull request #19579 from Random-Liu/add-new-reason-cache
Auto commit by PR queue bot
2016-01-30 02:06:49 -08:00
Random-Liu
f116a5eb8f Remove temporary function GetPodStatusAndAPIPodStatus() 2016-01-30 00:39:26 -08:00
Random-Liu
e93febfd61 Start returning PodSyncResult in SyncPod 2016-01-30 00:25:50 -08:00
k8s-merge-robot
2d061aa199 Merge pull request #19784 from Random-Liu/cleanup-kubelet-syncpod
Auto commit by PR queue bot
2016-01-30 00:25:49 -08:00
Jimmi Dyson
1c289943f5 Ensure kubelet pid is not moved to system container 2016-01-29 09:30:20 +00:00
Fabio Yeon
547a2e2387 Merge pull request #20131 from thockin/logs-for-19574
Augment logs in runContainer path
2016-01-28 13:49:59 -08:00
Andy Goldstein
86ae623a09 Help debug port forward flakes 2016-01-28 15:28:40 -05:00
Tim Hockin
df4c1ccd14 Don't apply net plugins to net=host pods 2016-01-27 15:43:33 -08:00
Eric Paris
8e1ca68760 Merge pull request #20020 from apcera/cleanup-docker-engine-check
kubelet: Update engine version parsing to handle semantic versioning
2016-01-26 11:44:02 -05:00
Tim Hockin
45e5912c3d Augment logs in runContainer path
Generating errors that are useful is hard.
2016-01-25 16:31:32 -08:00
Ken Robertson
fff8a7c371 kubelet: Update engine version parsing to handle semantic versioning
This updates the dockertools.dockerVersion to use a semantic versioning
library to more gracefully support engine versions which include
additional version fields.

Previously, go-dockerclient's APIVersion struct was use which only
handles plain numeric x.y.z version strings. With #19675, the library
was now used on the Docker engine string, however it is possible for the
engine string to include include additional information for beta, rc, or
distro specific builds.

This PR also enables the TestDockerRuntimeVersion test which was
previously just a FIXME and updates it to pass, and be used to test the
version string that cause #20005.

This negates the need for fsouza/go-dockerclient#451, since even with
that change, if a user was running Docker 1.10.0-rc1, this would cause
the kubelet to report it as simply 1.10.0.
2016-01-22 13:18:52 -08:00
Clayton Coleman
4a6935b31f Remaining codec change refactors 2016-01-22 13:27:27 -05:00
nikhiljindal
2ad642d370 Merge registered and latest and move to apimachinery 2016-01-21 14:42:21 -08:00
Alex Mohr
c52122cab5 Merge pull request #19675 from apcera/kubelet-report-runtime-version
Update container runtime to properly report the engine and version
2016-01-21 10:31:19 -08:00
k8s-merge-robot
d0f59e2126 Merge pull request #18172 from Random-Liu/generate-sync-event
Auto commit by PR queue bot
2016-01-20 22:48:35 -08:00
Random-Liu
eb56d46b74 Minor clean up in kubelet syncPod() 2016-01-20 17:31:59 -08:00
Ken Robertson
a7b07c01df Update container runtime to properly report the engine and version
This address a TODO when collecting the node version information so it
will properly report the configured runtime and its version. Previously,
this was hardcoded to "docker://" and the docker version, and would show
"docker://1.9.1" even when the kubelet was configured to use rkt.

With this change, it will use the runtime's Type() and Version() data.

This also changes the container.Runtime interface to add an APIVersion()
method. This can be used when the runtime has separate versions for the
engine and the API, such as with Docker. The Docker minimum version
validation has been updated to use APIVersion(), and
DockerManager.Version() now returns the engine version.
2016-01-20 16:42:25 -08:00
Random-Liu
0e612afa98 Start using PodSyncResult in dockertools 2016-01-17 00:42:45 -08:00
harry
7405c7899b Add strings pkg to hold strings utils
Replace funtions with strings pkg

Fix all references and rename the pkg
2016-01-15 12:37:50 +08:00
Clayton Coleman
791d160b42 Split the Kubelet flag options and struct
Reduces the size of the app/server.go file and ensures that the flags
and their defaults are clearly separated.
2016-01-06 21:23:06 -05:00
k8s-merge-robot
38f926dbb9 Merge pull request #19206 from Random-Liu/remove-wired-docker-label
Auto commit by PR queue bot
2016-01-05 19:32:01 -08:00
Random-Liu
884dc5c9e5 Put TerminationGracePeriod, DeletionGracePeriod and PreStopHandler to docker labels 2016-01-05 15:45:29 -08:00
Random-Liu
2ea11690b8 Remove running pod from SyncPod() of container runtime 2016-01-04 10:18:46 -08:00
Random-Liu
b2a72ca384 Change my TODO to be the same with others 2015-12-31 00:41:05 -08:00
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
Random-Liu
3cbdf79f8c Change original PodStatus to APIPodStatus, and start using kubelet internal PodStatus in dockertools 2015-12-04 17:37:39 -08:00
Avesh Agarwal
3d5207fd73 This commit adds type information to events.
This addresses issue #15624.
2015-11-24 09:59:54 -05: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
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
zhengguoyong
d5f2bb00a7 Del unused var 2015-11-16 15:53:20 +08:00
Brendan Burns
fb576f30c8 Refactor an interface for style 2015-11-13 15:56:27 -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
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
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
Lantao Liu
894dc5a5a2 Move TerminationMessagePath into docker label. 2015-11-02 14:32:58 -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
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
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
feisky
296e44cc08 Delete infra container if network plugin fails 2015-10-12 23:23:17 +08: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
4c8a836260 Move original container gc to docker runtime 2015-10-09 06:57:09 +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