Commit Graph

47 Commits

Author SHA1 Message Date
Adrian Reber
fc37a7a990
kubelet: wire checkpoint container support through
This adds the last pieces to wire through the container checkpoint
support in the kubelet.

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-07-14 10:27:41 +00:00
Adrian Reber
1ac7d78296
kubelet: add CheckpointContainer in remote runtime
This is the first step to implement checkpointing and restoring of
container and containers starting from the lowest layer in the kubelet.

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-07-14 10:27:40 +00:00
Claudiu Belu
93701ce0c1 cleanup: Removes duplicate utils code
The utils found in pkg/kubelet/cri/remote/utils are the same as the
ones in pkg/kubelet/utils, with the difference that the latter have
had a few improvements recently.

This commit removes the duplicated code.
2022-06-28 22:58:14 -07:00
21kyu
df168d5b5c Change reflect.Ptr to reflect.Pointer 2022-06-26 01:23:43 +09:00
Davanum Srinivas
ab690750df
Switch to v3 of github.com/emicklei/go-restful
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-09 14:11:41 -04:00
Kubernetes Prow Robot
4bec6b34ef
Merge pull request #107122 from songlh/fixing-5
fixing the panic in TestVersion
2022-05-05 16:28:41 -07:00
Kubernetes Prow Robot
5d6ef39406
Merge pull request #96004 from serathius/datapolicy-kubelet-pkg
Add datapolicy tags to  pkg/kubelet/
2022-03-04 15:34:51 -08:00
Sascha Grunert
effbcd3a0a
Add support for CRI verbose fields
The remote runtime implementation now supports the `verbose` fields,
which are required for consumers like cri-tools to enable multi CRI
version support.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-02-10 17:12:26 +01:00
Jordan Liggitt
3a132bd206 Fix kubelet cri round trip test 2022-02-05 17:59:29 -05:00
yanghesong
4cab028a92 Remove dockershim comments in kubelet
Signed-off-by: yanghesong <hesong.yang@foxmail.com>
2022-01-20 16:15:29 +08:00
songlh
50840f5039 change to use require.NoError 2022-01-14 21:46:12 -05:00
songlh
e03a0bc105 fixing the panic in TestVersion 2021-12-18 19:20:15 -05:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Sascha Grunert
a063a2ba3e
Revert dockershim CRI v1 changes
We should not touch the dockershim ahead of removal and therefore
default to `v1alpha2` CRI instead of `v1`.

Partially reverts changes from https://github.com/kubernetes/kubernetes/pull/106501

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-12-03 18:37:11 +01:00
Elana Hashman
31c4273f66
Add test for memory equivalence
See https://github.com/kubernetes/kubernetes/pull/106006#issuecomment-971004230

Co-Authored-By: Jordan Liggitt <liggitt@google.com>
2021-11-17 11:07:09 -08:00
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
Kubernetes Prow Robot
efa9029a0d
Merge pull request #104920 from tkashem/response-writer-cleanup
apiserver: decorate http.ResponseWriter correctly
2021-10-05 00:53:09 -07:00
Abu Kashem
0d50c969c5
apiserver: wrap ResponseWriter using abstraction 2021-10-04 10:59:11 -04:00
wojtekt
53ce79a18a Migrate to k8s.io/utils/clock in pkg/kubelet 2021-09-10 12:20:09 +02: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
Peter Hunt
a9b7dcc8c2 kubelet: update remote runtimes for cri stat changes
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-07-08 13:17:04 -04:00
Kubernetes Prow Robot
4a3e1b90c7
Merge pull request #100175 from changshuchao/testcase_utils
test case for pkg/kubelet/cri/remote/utils.go
2021-04-08 20:28:22 -07:00
Kubernetes Prow Robot
4fae6ae5d2
Merge pull request #99839 from saschagrunert/portforward-stream-cleanup
Cleanup portforward streams after their usage
2021-04-08 15:59:51 -07:00
Kubernetes Prow Robot
c5680da8df
Merge pull request #99006 from yangjunmyfm192085/run-test17
Structured Logging migration: modify cri  part logs of kubelet.
2021-03-16 20:10:56 -07:00
Sascha Grunert
6459ed6717
Cleanup portforward streams after their usage
This implements a stream cleanup when using portforwardings. Before
applying this patch, the streams []httpstream.Stream within
`spdy/connection.go` would fill-up for each streaming request. This
could result in heavy memory usage. Now we use the stream identifier to
keep track of them and finally remove them again once they're no longer
needed.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-03-15 09:43:46 +01:00
changshuchao
fa6654ff19 test case for pkg/kubelet/cri/remote/utils_test.go 2021-03-12 23:47:24 +08:00
afrouz
8f2e927b4a Migrate cmd/kubelet, image, cadvisor and cri to structured logging 2021-03-09 23:12:10 +03:30
JunYang
024ce9a843 Structured Logging migration: modify cri part logs of kubelet.
Signed-off-by: JunYang <yang.jun22@zte.com.cn>
2021-03-09 08:53:13 +08:00
Kubernetes Prow Robot
da2f6385e9
Merge pull request #98589 from chenyw1990/structuredLogsOfRemote
pkg/kubelet/cri/remote: migrate to structured logs
2021-03-02 15:49:19 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
chenyw1990
8d86470417 pkg/kubelet/cri/remote: migrate to structured logs 2021-02-22 11:44:58 +08:00
Sergey Kanzhelev
4c9e96c238 Revert "Merge pull request #92817 from kmala/kubelet"
This reverts commit 88512be213, reversing
changes made to c3b888f647.
2021-01-12 22:27:22 +00:00
jornshen
c38637a08b [flaky test] fix race in TestVersion in pkg/kubelet/cri/remote 2020-12-03 14:26:11 +08:00
Andrew Sy Kim
af40d18b67 kubelet: move pkg/kubelet/cri/.import-restrictions to pkg/kubelet/cri/streaming
Based on the comments in this file, it seems like these import
restrictions were originally meant for the kubelet CRI streaming
package. This commit moves the import restrictions to
pkg/kubelet/cri/streaming so that pkg/kubelet/cri can import internal
packages like pkg/probe/exec

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-09 13:05:09 -05:00
Andrew Sy Kim
4bb30c3b0e kubelet: add feature gate check for exec probe timeouts
This change also involves adding a custom error type for probe timeouts
so that the kubelet exec prober can distinguish between failed probes
that have exited or probes that have timed out.

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-09 13:05:09 -05:00
Andrew Sy Kim
2887e707f8 kubelet: respect probe exec timeout from CRI by returning utilexec.CodeExitError
This fixes a bug where the exec timeouts are not respected with
containerd

Exec prober expects a utilexec.CodeExitError on failed probes, otherwise
the prober returns 'Unknown' and a non-nil error which the kubelet throws
away. As a temporary fix, ExecSync as part of the CRI remote runtime
should return utilexec.CodeExitError when the grpc error code is
DeadlineContextExceeded. This ensure the exec prober registers exec
timeouts as real probe failures to the kubelet. We should also add a
TimededError type to k8s.io/utils/exec since it doesn't really make
sense to use CodeExitError for exec time outs.

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-09 13:03:28 -05:00
Marek Siarkowicz
035469bd0c Add datapolicy tags to pkg/kubelet/ 2020-10-29 18:19:33 +01:00
Yixiang2019
62710bc034 cleanup: fix some error log capitalization
Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn>
2020-10-28 16:44:54 +08:00
Kubernetes Prow Robot
88512be213
Merge pull request #92817 from kmala/kubelet
Check for sandboxes before deleting the pod from apiserver
2020-09-10 07:27:45 -07:00
Sergey Kanzhelev
df2f67daf8 fix linter issues for pkg/kubelet/cri/remote and staging/src/k8s.io/cri-api/pkg/apis/testing 2020-08-28 04:15:39 +00:00
Keerthan Reddy,Mala
d4325f42fb Check for sandboxes before deleting the pod from apiserver 2020-07-22 11:54:56 -07:00
Ali Farah
81b91563e4 Fix typo in util_linux.go 2020-06-17 02:04:15 +10:00
Jordan Liggitt
591e0043c8 Revert "Merge pull request 89667 from kmala/kubelet"
This reverts commit fa785a5706, reversing
changes made to cf13f8d994.
2020-05-21 13:30:14 -04:00
Davanum Srinivas
c7e79d2048
fix import restrictions and BUILD
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:47 -04:00
Davanum Srinivas
e049e594cd
Copy util directory for use in cri/remote package
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:47 -04:00
Davanum Srinivas
0608e8be25
update bazel BUILD files
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:47 -04:00
Davanum Srinivas
5692926914
Move packages for slightly better UX for consumers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:46 -04:00