Commit Graph

28 Commits (13b12e89408869c5b560a81e95bca33267bdb8e1)

Author SHA1 Message Date
Yu-Ju Hong 059fa35a84 dockershim: bump the minimum supported docker version to 1.11
Drop the 1.10 compatibilty code.
2018-01-04 10:22:16 -08:00
Pengfei Ni 4d5d97438b Use credentials from providers for docker sandbox image 2017-09-09 07:02:04 +08:00
Jan Safranek 0c767355d8 Implement mount propagation in docker shim 2017-09-01 21:36:33 +02:00
Yang Guo bf2ced837c Updates Docker Engine API 2017-07-13 12:55:07 -07:00
Dong Liu 4df4ea2bea Move seccomp helper methods and tests to platform-specific files. 2017-06-23 09:49:06 +08:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Pengfei Ni 22e99504d7 Update CRI references 2017-06-09 10:16:40 +08:00
Adam Worrall d44c458a19 Support sandbox images from private registries
**What this PR does / why we need it**:

The --pod-infra-container-image parameter allows the user to specify
an arbitrary image to be used as the pod infra container (AKA
sandbox), an internal piece of the dockershim implementation of the
Container Runtime Interface.

The dockershim does not have access to any of the pod-level image pull
credentials configuration, so if the user specifies an image from a
private registry, the image pull will fail.

This change allows the dockershim to read local docker configuration
(e.g. /root/.docker/config.json) and use it when pulling the pod infra
container image.

**Which issue this PR fixes**: fixes #45738

**Special notes for your reviewer**:
The changes to fake_client for writing local config files deserve some
attention.

**Release note**:

```release-note
NONE
```
2017-05-26 12:17:10 -07:00
Pengfei Ni 2b4956c208 dockershim: get sysctls from sandbox config instead of annotations 2017-05-15 12:53:32 +08:00
Michael Taufen cbad320205 Reorganize kubelet tree so apis can be independently versioned 2017-05-12 10:02:33 -07:00
Yu-Ju Hong fccf34ccb6 Remove various references of dockertools
Also update the bazel files.
2017-05-11 10:01:41 -07:00
Yu-Ju Hong 389c140eaf Move docker client code from dockertools to dockershim/dockerlib
The code affected include DockerInterface (renamed to Interface),
FakeDockerClient, etc.
2017-05-05 11:48:08 -07:00
Yu-Ju Hong 3cd6b21b77 Add the seccomp profile loading test to dockershim
The test was originally in docker_manager_test.go (now removed). I
copied and adapated the logic for the new test.

Also move the original test fixtures needed for the test.
2017-05-03 12:55:56 -07:00
Pengfei Ni ac76766a92 CRI: move apparmor annotations to container security context 2017-05-01 20:55:16 +08:00
Pengfei Ni 53b5f2df48 Add unit test for MakePortsAndBindings 2017-03-20 17:47:38 +08:00
Yu-Ju Hong 516848c37d Various fixes for the fake docker client
* Properly return ImageNotFoundError
 * Support inject "Images" or "ImageInspects" and keep both in sync.
 * Remove the FakeDockerPuller and let FakeDockerClient subsumes its
   functinality. This reduces the overhead to maintain both objects.
 * Various small fixes and refactoring of the testing utils.
2017-03-07 10:11:49 -08:00
Random-Liu 29a063e62e Check infra container image existence before pulling. 2017-02-27 10:59:36 -08:00
Yu-Ju Hong d8e29e782f dockershim: set security option separators based on the docker version
Also add a version cache to avoid hitting the docker daemon frequently.
2017-02-07 11:06:40 -08:00
Random-Liu e5ee619449 Add IsContainerNotFound in kube_docker_client and change dockershim to
use it.
2017-01-26 16:10:50 -08:00
Random-Liu 90e91a8989 Add unit test for the work around. 2017-01-25 14:15:41 -08:00
Pengfei Ni d4bfcd1fda kubelet/dockershim: update cri to protobuf v3 2017-01-20 09:55:37 +08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Yu-Ju Hong 5c90908eb0 dockershim: remove container upon naming conflicts
We have observed that, after failing to create a container due to "device or
resource busy", docker may end up having inconsistent internal state. One
symptom is that docker will not report the existence of the "failed to create"
container, but if kubelet tries to create a new container with the same name,
docker will error out with a naming conflict message.

To work around this, this commit parses the creation error message and if there
is a naming conflict, it would attempt to remove the existing container.
2016-11-16 10:20:16 -08:00
Random-Liu 2ce5deb6fd Add separate username field in CRI and use it. 2016-11-15 16:50:02 -08:00
Pengfei Ni fee6daaa8d Add sysctls for dockershim 2016-10-25 11:24:31 +08:00
Random-Liu 0771e64ab8 Add unit test for get security option functions. 2016-09-28 18:38:23 -07:00
Yu-Ju Hong 2f60b72dd3 dockershim: add support for annotations 2016-09-16 11:31:15 -07:00