Commit Graph

27 Commits (7ffa2faeacb213d25c86ab91a2ce5b67f30b9c33)

Author SHA1 Message Date
Pengfei Ni 22e99504d7 Update CRI references 2017-06-09 10:16:40 +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 38d8da1215 FakeDockerClient: add creation timestamp
This is necessary for kubemark to work correctly.
2017-03-08 17:11:16 -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
Yu-Ju Hong 1759b87ffe Generate valid container id in fake docker client. 2017-03-01 10:33:08 -08:00
Jordan Liggitt 66dec96735 Revert "Generate valid container id in fake docker client." 2017-02-18 10:06:24 -05:00
Random-Liu de922962de Generate valid container id in fake docker client. 2017-02-16 17:10:33 -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
Yu-Ju Hong 8a6285d844 CRI: Rename container/sandbox states
The enum constants are not namespaced. The shorter, unspecifc names are likely
to cause naming conflicts in the future.

Also replace "SandBox" with "Sandbox" in the API.
2016-11-01 13:18:21 -07:00
Random-Liu 121a91eb12 Symlink docker logs to CRI defined log path. 2016-10-23 19:08:47 -07:00
Ivan Shvedunov f1258dca4e Fix typos 2016-10-15 00:21:00 +03:00
Kubernetes Submit Queue b99a9094cc Merge pull request #34380 from Random-Liu/fix-cri-image
Automatic merge from submit-queue

CRI: Image pullable support in dockershim

For #33189.

The new test `ImageID should be set to the manifest digest (from RepoDigests) when available` introduced in #33014 is failing, because:
1) `docker-pullable://` conversion is not supported in dockershim;
2) `kuberuntime` and `dockershim` is using `ListImages with image name filter` to check whether image presents. However, `ListImages` doesn't support filter with `digest`.

This PR:
1) Change `kuberuntime.IsImagePresent` to use `runtime.ImageStatus` and `dockershim.InspectImage` instead. ***Notice an API change: `ImageStatus` should return `(nil, nil)` for non-existing image.***
2) Add `docker-pullable://` support.
3) Fix `RemoveImage` in dockershim https://github.com/kubernetes/kubernetes/pull/29316.

I've tried myself, the test can pass now.

@yujuhong @feiskyer @yifan-gu 
/cc @kubernetes/sig-node
2016-10-12 12:25:37 -07:00
Random-Liu afa3414779 * Add docker pullable support.
* Fix inspect image bug.
* Fix remove image bug.
2016-10-12 09:21:10 -07:00
Random-Liu 13459411c1 Change dockershim to use UnixNano instead of Unix. 2016-10-11 14:50:55 -07:00
Random-Liu 76056a47f9 Change the timestamp unit to nanosecond. 2016-10-07 14:10:19 -07:00
Random-Liu c3ce58b934 Implement temporary ImageStats in kuberuntime_manager, and
fix a bug in dockershim which causes summary api not working
properly.
2016-10-03 22:56:25 -07:00
Kubernetes Submit Queue a241daf3f2 Merge pull request #33500 from Random-Liu/apparmor-seccomp-cri
Automatic merge from submit-queue

Add seccomp and apparmor support.

This PR adds seccomp and apparmor support in new CRI.

This a WIP because I'm still adding unit test for some of the functions. Sent this PR here for design discussion.

This PR is similar with https://github.com/kubernetes/kubernetes/pull/33450.
The differences are:
* This PR passes seccomp and apparmor configuration via annotations;
* This PR keeps the seccomp handling logic in docker shim because current seccomp implementation is very docker specific, and @timstclair told me that even the json seccomp profile file is defined by docker.

Notice that this PR almost passes related annotations in `api.Pod` to the runtime directly instead of introducing new CRI annotation.

@yujuhong @feiskyer @timstclair
2016-10-03 20:34:13 -07:00
Random-Liu 37273693e5 Fix bug in dockershim to set sandbox id properly. 2016-10-01 20:55:06 -07:00
Random-Liu 0771e64ab8 Add unit test for get security option functions. 2016-09-28 18:38:23 -07:00
Random-Liu 3d1263d2cf Use fakeclock in fake docker client. 2016-09-24 22:43:39 -07:00
Yu-Ju Hong 737769954a CRI: add Message in ContainerStatus
Kubernetes expects a brief CamelCase string as "Reason" and a human-readable
string as "Message" in the conatiner status. It is difficult for kubelet to
derive the other one if the runtime only provides one of the two fields.
Augment the API by adding the "Message" field.
2016-09-23 14:32:54 -07:00
Yu-Ju Hong 2f60b72dd3 dockershim: add support for annotations 2016-09-16 11:31:15 -07: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