Commit Graph

60 Commits

Author SHA1 Message Date
danielqsj
8ae3f80048 remove deprecated metrics of dockershim 2020-01-10 17:05:38 +08:00
Kubernetes Prow Robot
49e24adf3e
Merge pull request #86832 from mattjmcnaughton/mattjmcnaughton/remove-dead-code-in-fake-docker-client
Remove dead code in fake docker client
2020-01-07 07:36:18 -08:00
louisgong
324e5ce7e3 hollow-node use remote CRI 2020-01-07 11:00:45 +08:00
mattjmcnaughton
f2cb1f35fe
Remove dead code in fake docker client
The `FakeDockerClient` had a number of methods defined on it which were
not being called anywhere. The majority were of the form `Assert...`.

In the spirit of removing dead code, remove the methods which aren't
being called.
2020-01-05 08:31:59 -05:00
Jacek Kaniuk
4303be3d9f Revert pull request #85879 "hollow-node use remote CRI" 2019-12-19 10:52:35 +01:00
louisgong
0dd468039d inject remoteRuntime to kubelet dependency 2019-12-06 14:12:08 +08:00
Krzysztof Siedlecki
d46daf891c fixing docker fake client InspectExec 2019-11-08 12:43:16 +01:00
Tim Allclair
e06912ca3e Clean up deprecated references 2019-08-21 10:40:21 -07:00
Arnav Sankaran
0c1d6d330f Run gofmt 2019-07-15 09:58:09 -07:00
Arnav Sankaran
cd8d8f2dce Add tracing to GetContainerStats 2019-07-15 09:56:55 -07:00
Mikhail Mazurskiy
4ce1fb7d40
Cleanup math/rand package usage 2019-05-24 09:25:04 +10:00
Yu-Ju Hong
903f635ab3 dockershim: Fix negotiating docker API version
API version negotiation needs to happen before any meaningful docker
calls, including simple commands such as "/version".
2019-04-15 15:25:06 -07:00
Alok Kumar Singh
5b3a44fd56 Use docker api IsErrNotFound(). String handling is not required anymore
Why? https://github.com/kubernetes/kubernetes/pull/75843#discussion_r273785877
Moby support: https://github.com/moby/moby/pull/38689
Moby def: 053c6f097a/client/errors.go (L44-L49)
2019-04-11 20:52:57 +05:30
Kubernetes Prow Robot
cf24d24e66
Merge pull request #70647 from vshn/imagegc_multi_repo_image_removal
Always run untag when removing docker image
2019-02-26 11:04:58 -08:00
Kubernetes Prow Robot
ae45068688
Merge pull request #72323 from danielqsj/dockershim
Change docker metrics to conform metrics guidelines
2019-02-06 09:30:54 -08:00
Kubernetes Prow Robot
ce19aad22b
Merge pull request #70527 from qingsenLi/git181101
remove repetitive word in annotation
2019-01-15 20:19:09 -08:00
Yu-Ju Hong
f62cc81934 Bump minimum docker version to 1.13.1 2019-01-11 10:21:38 -08:00
danielqsj
94d1050303 Change docker metrics to conform guideline 2018-12-26 15:58:04 +08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Christian Haeusler
5f904044eb Use test table for TestRemoveImage 2018-11-06 14:37:52 +01:00
qingsenLi
3ac9b27b2a remove repetitive word in annotation 2018-11-02 00:54:41 +08:00
Christoph Blecker
97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Jess Frazelle
20cc40a5dc
ProcMount: add dockershim support
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:40:06 -04:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Wang Guoliang
89669283fe should use time.Since instead of time.Now().Sub 2018-04-10 12:05:51 +08:00
hzxuzhonghu
70e45eccf2 Replace "golang.org/x/net/context" with "context" 2018-03-22 20:57:14 +08:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Shyam Jeedigunta
517301df21
Fake docker-client assigns random IPs to containers 2018-02-14 14:28:52 +01:00
hangaoshuai
e416f3746e clean up unused function GetKubeletDockerContainers 2018-02-07 19:21:05 +08:00
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
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
David Ashpole
0e38a0e7dd fake docker client can remove containers which have not been started 2017-12-04 14:18:32 -08:00
David Ashpole
63f7836d39 mock container networking and fix filtering bug 2017-11-28 15:32:18 -08:00
Harry Zhang
de1c305356 Remove docker dep in kubelet startup
Update bazel
2017-11-01 10:03:01 +08:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue
b543f67fc8 Merge pull request #53297 from x1957/code_format
Automatic merge from submit-queue (batch tested with PRs 53297, 53328). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

format some code in dockershim

**What this PR does / why we need it**:
format some code in dockershim

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-10 11:20:34 -07:00
Yuhao Fang
c1c89d986b format some code in dockershim 2017-10-08 22:30:37 +08:00
Kubernetes Submit Queue
f0a061e361 Merge pull request #51152 from bobbypage/cri
Automatic merge from submit-queue (batch tested with PRs 50555, 51152). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Implement CRI stats in Docker Shim

**What this PR does / why we need it**:
This PR implements CRI Stats in the Docker Shim. It is needed to enable CRI stats for Docker and ongoing /stats/summary API changes in moving to use CRI.

Related issues:
#46984 (CRI: instruct kubelet to (optionally) consume container stats from CRI)
#45614 (CRI: add methods for container stats) 

This PR is also a followup to my original PR (https://github.com/kubernetes/kubernetes/pull/50396) to implement Windows Container Stats. The plan is that Windows Stats will use a hybrid model: pod and container level stats will come from CRI (via dockershim) and that node level stats will come from a "winstats" package that exports cadvisor like datastructures using windows specific perf counters from the node. I will update that PR to only export node level stats. 

@yujuhong @yguo0905 @dchen1107 @jdumars @anhowe @michmike

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-10-02 14:49:12 -07:00
David Porter
5eae7eb166 Implement CRI stats in dockershim for Windows
Implement CRI stats for dockershim using docker stats. This enables use
of the summary api to get container metrics on Windows where CRI stats
are enabled.
2017-10-02 04:10:48 +00:00
Andy Goldstein
95f373fde6 Normalize RepoTags before checking for match
on projectatomic-based docker, we get "docker.io/library/busybox:latest"
when someone uses an unqualified name like "busybox". Though when we
inspect, the RepoTag will still say "docker.io/busybox:latest", So
we have reparse the tag, normalize it and try again. Please see the
additional test case.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-27 20:51:31 -04:00
Yu-Ju Hong
331628b7dc Move prometheus metrics for docker operations into dockershim 2017-09-25 10:03:17 -07:00
Yu-Ju Hong
aaf26b2eaa dockershim: remove support for legacy containers
The code was first introduced in 1.6 to help pre-CRI-kubelet upgrade to
using the CRI implementation. They can safely be removed now.
2017-09-11 08:44:27 -07:00
David Ashpole
e5a6a79fd7 update cadvisor, docker, and runc godeps 2017-09-05 12:38:57 -07:00
Kubernetes Submit Queue
2ab7ad14b4 Merge pull request #47991 from ncdc/fix-initial-exec-terminal-dimensions
Automatic merge from submit-queue

Fix initial exec terminal dimensions

**What this PR does / why we need it**:
Delay attempting to send a terminal resize request to docker until after
the exec has started; otherwise, the initial resize request will fail.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47990

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-18 14:47:11 -07:00
Kubernetes Submit Queue
b9b875f0d7 Merge pull request #46105 from sjenning/update-conatiner-resource-cri
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Add UpdateContainerResources method to CRI

This is first step toward support for opinionated cpu pinning for certain guaranteed pods.

In order to do this, the kubelet needs to be able to dynamically update the cpuset at the container level, which is managed by the container runtime.  Thus the kubelet needs a method to communicate over the CRI so the runtime can then modify the container cgroup.

This is used in the situation where a core is added or removed from the shared pool to become a exclusive core for a new G pod.  The cpuset for all containers in the shared pool will need to be updated to add or remove that core.

Opening this up now so we can start discussion.  The need for a change to the CRI might be unexpected.

@derekwaynecarr @vishh @ConnorDoyle 

```release-note
NONE
```
2017-08-11 14:14:00 -07:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Seth Jennings
9fbf8f57dd add UpdateContainerResources function to CRI 2017-07-31 20:47:56 -05:00
Andy Goldstein
a4811daf31 Fix initial exec terminal dimensions
Delay attempting to send a terminal resize request to docker until after
the exec has started; otherwise, the initial resize request will fail.
2017-07-31 11:52:27 -04:00
Yang Guo
bf2ced837c Updates Docker Engine API 2017-07-13 12:55:07 -07:00