Commit Graph

18 Commits

Author SHA1 Message Date
Sascha Grunert
de37b9d293
Make CRI v1 the default and allow a fallback to v1alpha2
This patch makes the CRI `v1` API the new project-wide default version.
To allow backwards compatibility, a fallback to `v1alpha2` has been added
as well. This fallback can either used by automatically determined by
the kubelet.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-11-17 11:05:05 -08:00
James Sturtevant
3564cd5beb Reduce calls to docker from dockershim for stats 2021-11-10 11:25:03 -08:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
JunYang
7735cf7f26 Structured Logging migration: modify dockershim and network part logs of kubelet.
Signed-off-by: JunYang <yang.jun22@zte.com.cn>
2021-02-14 16:01:47 +08:00
James Sturtevant
3da0d99d52 Ignore transient errors when gather stats 2021-02-02 13:56:51 -08:00
zvier
d43817b5ec fix golint errors for pkg/kubelet/dockershim
Signed-off-by: zvier <zvier20@gmail.com>
2020-05-24 23:45:17 +08:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Kubernetes Prow Robot
4339ac30a0
Merge pull request #90554 from vboulineau/vboulineau/fix_win_stats_init_containers
kubelet: fix `/stats/summary` endpoint on Windows when init-containers are present on the node
2020-05-13 15:58:51 -07:00
mattjmcnaughton
b36f637f0d
Add dockerless tags to all files in dockershim
As the final step, add the `dockerless` tags to all files in the
dockershim. Using `-tags=dockerless` in `go build`, we can compile
kubelet without the dockershim.

Once cadvisor no longer depends on `docker/docker`, compiling with
`-tags=dockerless` should be sufficient to compile the Kubelet w/o a
dependency on `docker/docker`.
2020-05-07 17:18:50 -04:00
Vincent Boulineau
3bff11244b
kubelet: fix /stats/summary endpoint on Windows when init-containers are present on the node
Following changes in #87730, Kubelet is directly hcsshim to gather stats.
However, unlike `docker stats` API that was used before, hcsshim does not
keep information about exited containers.

When the Kubelet lists containers (`docker_container.go:ListContainers()`),
it sets `All: true`, retrieving non-running containers.

When docker stats is called with such container id, it'll return a valid JSON
with all values set to 0. The non-running containers are filtered later on in the process.

When the hcsshim is called with such container id, it'll return an error, effectively
stopping the stats retrieval for all containers.
2020-05-04 14:42:02 +02:00
marosset
999fdfaddf Calling hcsshim instead of docker api to get stats for windows to greatly reduce latency 2020-02-06 17:59:10 +00:00
Arnav Sankaran
9ed8340306 Removed duplicate code 2019-07-15 08:41:06 -07:00
Davanum Srinivas
33081c1f07
New staging repository for cri-api
Change-Id: I2160b0b0ec4b9870a2d4452b428e395bbe12afbb
2019-03-26 18:21:04 -04:00
Pengfei Ni
196381c039 Add fs status for Windows containers 2018-05-17 14:22:21 +08:00
hzxuzhonghu
70e45eccf2 Replace "golang.org/x/net/context" with "context" 2018-03-22 20:57:14 +08:00
Lee Verberne
e10042d22f Increment CRI version from v1alpha1 to v1alpha2
This also incorporates the version string into the package name so
that incompatibile versions will fail to connect.

Arbitrary choices:
- The proto3 package name is runtime.v1alpha2. The proto compiler
  normally translates this to a go package of "runtime_v1alpha2", but
  I renamed it to "v1alpha2" for consistency with existing packages.
- kubelet/apis/cri is used as "internalapi". I left it alone and put the
  public "runtimeapi" in kubelet/apis/cri/runtime.
2018-02-07 09:06:26 +01:00
Yu-Ju Hong
e8da890aee dockershim: remove the use of kubelet's internal API
We let dockershim implement the kubelet's internal (CRI) API as an
intermediary step before transitioning fully to communicate using gRPC.
Now that kubelet has been communicating to the runtime over gRPC for
multiple releases, we can safely retire the extra interface in
dockershim.
2018-01-19 16:31:18 -08: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