Commit Graph

61 Commits (08606b530b151c69924f0ed8673071293c84ae14)

Author SHA1 Message Date
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
Random-Liu 0deec63d1a Unify fake runtime helper in kuberuntime, rkt and dockertools. 2017-02-27 01:43:37 -08:00
Random-Liu 8380148d48 Remove extra operations when generating pod sandbox configuration. 2017-02-24 15:06:03 -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
Dan Williams 20e1cdb97c dockertools: tear down dead infra containers in SyncPod()
Dead infra containers may still have network resources allocated to
them and may not be GC-ed for a long time.  But allowing SyncPod()
to restart an infra container before the old one is destroyed
prevents network plugins from carrying the old network details
(eg IPAM) over to the new infra container.
2017-02-16 13:51:19 -06:00
Dan Williams dc2fd511ab dockertools: use network PluginManager to synchronize pod network operations
We need to tear down networking when garbage collecting containers too,
and GC is run from a different goroutine in kubelet.  We don't want
container network operations running for the same pod concurrently.
2017-02-16 13:51:19 -06:00
Dan Williams 60525801c1 kubelet/network: move mock network plugin to pkg/kubelet/network/testing 2017-02-16 13:48:32 -06:00
Yu-Ju Hong 05c3b8c1cf Set docker opt separator correctly for SELinux options 2017-02-06 14:47:30 -08:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
Dr. Stefan Schimanski 79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Random-Liu e5ee619449 Add IsContainerNotFound in kube_docker_client and change dockershim to
use it.
2017-01-26 16:10:50 -08:00
Yu-Ju Hong 87f1291c19 Use fnv hash in the CRI implementation
Leave the old implementation (dockertools/rkt) untouched so that
containers will not be restarted during kubelet upgrade. For CRI
implementation (kuberuntime), container restart is required for kubelet
upgrade.
2017-01-25 15:01:41 -08:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Kubernetes Submit Queue b5929bfb2b Merge pull request #38789 from jessfraz/cleanup-temp-dirs
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
2017-01-20 12:34:58 -08:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Kubernetes Submit Queue 180936f8df Merge pull request #39826 from shyamjvs/fake-docker-client-fix
Automatic merge from submit-queue

Made tracing of calls and container lifecycle steps in FakeDockerClient optional

Fixes #39717 

Slightly refactored the FakeDockerClient code and made tracing optional (but enabled by default).

@yujuhong @Random-Liu
2017-01-17 21:11:36 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Shyam Jeedigunta 814c850fe5 Made tracing of calls and container lifecycle steps in FakeDockerClient optional 2017-01-17 18:56:39 +01:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jess Frazelle 7db9c8b454
cleanup fooPodContainerDir in /tmp
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:27:08 -08:00
Pengfei Ni fcbf39ea54 dockertools: add image ref to ImageService interfaces 2016-12-29 16:31:14 +08:00
Pengfei Ni 1a67e0ee7a Do not test linux-specific cases on OSX in dockertools 2016-12-23 10:37:10 +08:00
Mike Danese 8fdec87d19 bazel: fix some unit tests 2016-12-15 18:36:22 -08:00
Dan Winship c788793868 Port remaining code to pkg/util/version 2016-12-13 08:53:24 -05:00
Chao Xu b50367cbdc remove v1.Semantics 2016-11-23 15:53:09 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Random-Liu 99ee3f4b76 Add non-numeric user name support. 2016-11-08 16:07:29 -08:00
Pengfei Ni 3aee57d4ae Add security context support in dockershim 2016-11-07 11:07:56 +08:00
Random-Liu afa3414779 * Add docker pullable support.
* Fix inspect image bug.
* Fix remove image bug.
2016-10-12 09:21:10 -07:00
Wojciech Tyczynski 77371c3bf4 Revert "Kubelet: Use RepoDigest for ImageID when available" 2016-10-08 10:19:22 +02:00
Solly Ross 01b0b5ed70 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-04 20:41:53 -04:00
Yu-Ju Hong e6a6513552 Apply default image tags for all runtimes
Move the docker-specific logic up to the ImageManager to allow code sharing
among different implementations.
2016-09-28 18:58:21 -07:00
Maciej Kwiek a2472c2a4e Pod creation moved outside of docker manager tests
Also one deprecated TODO deleted
2016-08-30 13:30:26 +03:00
Tim St. Clair 785c83cc2d
Include security options in the container created event 2016-08-26 15:32:48 -07:00
Justin Santa Barbara 902ba4e249 Add network-plugin-mtu option for MTU selection
MTU selection is difficult, and if there is a transport such as IPSEC in
use may be impossible.  So we allow specification of the MTU with the
network-plugin-mtu flag, and we pass this down into the network
provider.

Currently implemented by kubenet.
2016-08-23 01:50:58 -04:00
Tim St. Clair 3c7896719b
Implement AppArmor Kubelet support 2016-08-15 13:25:17 -07:00
Michal Rostecki 31cdd70808 Set pod state as "unknown" when CNI plugin fails
Before this change, CNI plugin failure didn't change anything in
the pod status, so pods having containers without requested
network were "running".

Fixes #29148
2016-08-08 17:55:19 +02:00
Kubernetes Submit Queue c2614aee9a Merge pull request #29500 from lixiaobing10051267/masterFound
Automatic merge from submit-queue

Check all places to break the loop when object found

Check all places to break the loop when object found.
2016-08-03 20:05:15 -07:00
Michal Rostecki 59ca5986dd Print/log pointers of structs with %#v instead of %+v
There are many places in k8s where %+v is used to format a pointer
to struct, which isn't working as expected.

Fixes #26591
2016-08-01 22:27:56 +02:00
Harry Zhang cb14b35bde Refactor util clock into it's own pkg 2016-07-28 02:29:04 -04:00
k8s-merge-robot c186afd46e Merge pull request #29122 from ronnielai/image-gc-1-1
Automatic merge from submit-queue

Syncing imaging pulling backoff logic

- Syncing the backoff logic in the parallel image puller and the sequential image puller to prepare for merging the two pullers into one.
- Moving image error definitions under kubelet/images
2016-07-25 11:43:22 -07:00
lixiaobing10051267 be8d081539 Check all places to break the loop when object found 2016-07-23 13:49:04 +08:00
k8s-merge-robot d525d5345e Merge pull request #29119 from wongma7/pv-gid-squash2
Automatic merge from submit-queue

Allow PVs to specify supplemental GIDs

Retry of https://github.com/kubernetes/kubernetes/pull/28691 . Adds a Kubelet helper function for getting extra supplemental groups
2016-07-22 22:36:51 -07:00
Matthew Wong cbdd121d2d Remove pod mutation for PVs with supplemental GIDs 2016-07-22 17:41:44 -04:00
k8s-merge-robot 480e8a30ef Merge pull request #29316 from ronnielai/docker-image-remove
Automatic merge from submit-queue

Removing images with multiple tags

If an image has multiple tags, we need to remove all the tags in order to make docker image removing successful.

#28491
2016-07-21 17:47:17 -07:00
Ron Lai e25da21503 Clear tags to remove images with multiple tags 2016-07-21 14:14:32 -07:00
xiangpengzhao c51346e5cc Fix incorrect if conditions and add test case 2016-07-20 20:50:02 -04:00