Commit Graph

99 Commits (ead65fc25fe309464b40d0ba212f83ae256725da)

Author SHA1 Message Date
Solly Ross 135f87dc15 Kubelet: Use RepoDigest for ImageID when available
Previously, we used the docker config digest (also called "image ID"
by Docker) for the value of the `ImageID` field in the container status.
This was not particularly useful, since the config manifest is not
what's used to identify the image in a registry, which uses the manifest
digest instead.  Docker 1.12+ always populates the RepoDigests field
with the manifest digests, and Docker 1.10 and 1.11 populate it when
images are pulled by digest.

This commit changes `ImageID` to point to the the manifest digest when
available, using the prefix `docker-pullable://` (instead of
`docker://`)
2016-10-10 15:16:58 -04:00
Solly Ross b46dbbec1b Add method to inspect Docker images by ID
Previously, the `InspectImage` method of the Docker interface expected a
"pullable" image ref (name, tag, or manifest digest).  If you tried to
inspect an image by its ID (config digest), the inspect would fail to
validate the image against the input identifier.  This commit changes
the original method to be named `InspectImageByRef`, and introduces a
new method called `InspectImageByID` which validates that the input
identifier was an image ID.
2016-10-10 15:16:58 -04:00
Wojciech Tyczynski 77371c3bf4 Revert "Kubelet: Use RepoDigest for ImageID when available" 2016-10-08 10:19:22 +02:00
Solly Ross 2991bfcef1 Add method to inspect Docker images by ID
Previously, the `InspectImage` method of the Docker interface expected a
"pullable" image ref (name, tag, or manifest digest).  If you tried to
inspect an image by its ID (config digest), the inspect would fail to
validate the image against the input identifier.  This commit changes
the original method to be named `InspectImageByRef`, and introduces a
new method called `InspectImageByID` which validates that the input
identifier was an image ID.
2016-10-04 16:32:51 -04:00
Yu-Ju Hong d3e1f2c75e dockershim: add unit tests for sandbox/container status
Also add a fake clock in the FakeDockerClient to allow testing container
CreatedAt, StartedAt, FinishedAt timestamps.
2016-09-13 10:32:28 -07:00
Wojciech Tyczynski 3a0112f6ee Revert "dockershim: add unit tests for sandbox/container status" 2016-09-13 09:01:19 +02:00
Yu-Ju Hong 0075e9dbee dockershim: add unit tests for sandbox/container status
Also add a fake clock in the FakeDockerClient to allow testing container
CreatedAt, StartedAt, FinishedAt timestamps.
2016-09-12 12:55:49 -07:00
Yu-Ju Hong 5960d87d21 dockershim: Implement sandbox methods 2016-08-02 15:24:52 -07:00
Ron Lai e25da21503 Clear tags to remove images with multiple tags 2016-07-21 14:14:32 -07:00
Andy Goldstein 3b21a9901b Support terminal resizing for exec/attach/run
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
2016-07-13 17:06:16 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Random-Liu 52a3d8a19d Add unit test for image history cache 2016-05-27 14:49:48 -07:00
Random-Liu 7796b619fd Cleanup the code with new engine-api 2016-04-29 13:34:38 -07:00
Vishnu kannan e566948a75 Track image storage usage for docker containers
add image fs info to summary stats API.
Adding node e2e test for image stats.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-04-25 16:00:34 -07:00
Harry Zhang a3939473d3 Refactor PullImage RemoveImage methods
Refactor image remove
2016-04-23 10:33:47 -04:00
Harry Zhang 3918eee5bf Refactor InspectImage method 2016-04-23 16:37:15 +08:00
Harry Zhang 7ecb44fe16 Refactor list image to use new api 2016-04-23 16:37:15 +08:00
Random-Liu d981fee2ee Refactor Info and Version. 2016-04-21 12:02:50 -07:00
Random-Liu d33b69a0de Refactor AttachToContainer and Logs. 2016-04-17 13:00:52 -07:00
Random-Liu de5f407058 Refactor CreateExec, StartExec and InspectExec. 2016-04-17 12:58:47 -07:00
Random-Liu d3d98b372b Refactor StartContainer, StopContainer and RemoveContainer. 2016-04-14 17:05:46 -07:00
Random-Liu ba4a5ed39e Refactor CreateContainer. 2016-04-14 17:05:46 -07:00
Random-Liu da07fa9dd5 Refactor InspectContainer. 2016-04-14 17:05:46 -07:00
Random-Liu b348e7d1c9 Refactr ListContainers. 2016-04-14 17:05:05 -07:00
Daniel Smith 86b7dbb2c6 Merge pull request #23844 from Random-Liu/proper-fake-docker-version
Set fake docker client to minimum required version.
2016-04-14 16:55:47 -07:00
Harry Zhang c31ec5607a Refactor version cache into kubelet util 2016-04-13 00:42:22 -04:00
Random-Liu 8fb7ee38b0 Set fake docker client to minimum required version. 2016-04-04 17:41:01 -07:00
Random-Liu 07b21c50fa Add Status in runtime interface and use it for runtime health check. 2016-03-04 21:26:41 -08:00
k8s-merge-robot 6dee237d85 Merge pull request #21790 from vishh/seccomp
Auto commit by PR queue bot
2016-03-01 12:21:47 -08:00
Random-Liu 98283d894c dockertools: fix error exited container list in fake docker client 2016-02-28 13:19:57 -08:00
Fabio Yeon a56a315d99 Revert "kubelet: fix duplicated status updates at pod cleanup" 2016-02-26 14:39:11 -08:00
Random-Liu 61f7a5d228 Fix bug in fake docker client 2016-02-24 21:23:41 -08:00
Vishnu kannan 5db37b0b2d Disable seccomp policy by default on docker versions >= v1.10
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-24 10:26:21 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
k8s-merge-robot 55267640bc Merge pull request #20842 from Random-Liu/deprecate-hostconfig-at-container-start
Auto commit by PR queue bot
2016-02-10 20:00:08 -08:00
Lantao Liu bb9457e7a3 Revert "Deprecate HostConfig at container start" 2016-02-05 12:50:35 -08: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
Lantao Liu 8118092d11 Deprecate HostConfig at container start 2016-02-04 15:35:14 -08:00
Lantao Liu 4a386f881f Deprecate HostConfig at container start 2016-02-04 01:00:03 +00:00
Random-Liu 7b4cdb6f8f Remove GetAPIPodStatus from runtime interface 2016-02-02 23:41:55 +00:00
Avesh Agarwal de804332f4 Fix docker version errors in integration tests. 2016-01-29 13:48:07 -05:00
Mike Danese 41df8749a8 Merge pull request #19470 from gmarek/kubemark-performance
Shorten the sleep amount in the fake docker client
2016-01-14 11:55:24 -08:00
gmarek 573c3ca320 Shorten the sleep amount in the fake docker client 2016-01-11 12:15:11 +01:00
Yu-Ju Hong b969599daf Fix fake docker client to corretly report status of containers 2016-01-07 18:20:41 -08:00
Random-Liu b2a72ca384 Change my TODO to be the same with others 2015-12-31 00:41:05 -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
Lantao Liu 90ac508524 Cleanup fake_docker_client.go and manager_test.go 2015-11-19 19:03:35 -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
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
Lantao Liu 67a7633202 Put restart count into docker label 2015-10-23 13:02:32 -07:00