Commit Graph

4 Commits

Author SHA1 Message Date
Itamar Holder
e4da568f33 Make kuberuntime unit tests environment independent + support cgroup v2
Before this commit, to find out the current node's
cgroup version, a libcontainers function was used
directly. This way, cgroup version is hard to mock
and is dependant on the environment in which the unit
tests are being run.

After this commit, libcontainer's function is wrapped
within a variable function that can be re-assigned by
the tests. This way the test can easily mock the cgroup
version and become environment independant.

After this commit both cgroup versions v1 and v2
are being tested, no matter in which environment
it runs.

Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-14 14:52:27 +03:00
TommyStarK
73d9a9cfa0 kubelet/kuberuntime: Fix flaky test 'TestGeneratePodSandboxConfig'
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-04-25 17:29:25 +02: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
Eric Ernst
2c0fad1f52 kuberuntime: populate sandbox resources, overhead
Populate Resources and Overhead fields which, are now part of
LinuxPodSandboxConfig.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-20 11:30:23 -07:00