Commit Graph

131 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
b18cfd6141 Merge pull request #132873 from tallclair/runtime-actuated
Make actuated resources an internal detail of the KubeGenericRuntimeManager
2025-09-10 11:48:13 -07:00
Ali Abbasi Alaei
9ca3159e34 Fix fake runtime's image pull
Fixed fake_runtime.PullImage to be blocked at the fake image pulling behavior,
not just before before returning
2025-09-09 19:40:23 -04:00
Ali Abbasi Alaei
a77fc586c7 Fix negative pod startup duration
Fixed an issue with the pod startup duration metric,
which may show negative values when parallel image pulling is enabled
2025-09-09 19:36:22 -04:00
Tim Allclair
82eb8bd23a Populate memory requests from actuated resources at pod status generation time 2025-09-08 12:56:01 -07:00
zhangzhifei16
80e6f9e20a chore(kubelet): migrate container to contextual logging
fix: the failed ci
2025-09-05 21:55:15 +08:00
Tim Allclair
09548c6bdf Move actuated resources state to kuberuntime.Manager 2025-09-03 15:53:45 -07:00
Stephen Kitt
81cec6df1d Bump to mockery v3
mockery has introduced breaking changes and switched to a v3 branch,
this migrates to that, mostly using the built-in migration tool. Mocks
are now generated in single files per package, except in packages
containing mocks for multiple interface packages (in
pkg/kubelet/container/testing).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-08-29 13:43:54 +02:00
Tim Allclair
d9c91127d0 Check memory usage before decreasing limits 2025-07-17 13:17:35 -07:00
Kubernetes Prow Robot
93c1605310 Merge pull request #131083 from HirazawaUi/clean-return-value
kubelet: Remove the unused 'error' parameter return from the GeneratePodStatus method
2025-07-15 10:56:30 -07:00
zhangzhifei16
c1ff9cf4e8 chore: Upgrade the mockery version to v2.53.3. 2025-04-10 21:16:47 +08:00
HirazawaUi
ae08504ca6 Remove unneeded return values 2025-03-27 22:29:39 +08:00
Ajay Sundar Karuppasamy
a09cb22e4d disable in-place vertical pod scaling for non-restartable swappable containers 2025-03-20 20:43:18 +00:00
Natasha Sarkar
16abcd78bd [FG:InPlacePodVerticalScaling] surface pod resize actuation errors in pod resize conditions (#130902)
* surface pod resize actuation errors in pod resize conditions

* update kubelet unit tests

* fix all other kubelet unit tests

* fix linter error

* address feedback

* fix test failure
2025-03-19 20:12:54 -07:00
Stanislav Láznička
cb7468b077 kubelet imagepuller: PullImage() - accept TrackAuthConfigs directly
The image puller's PullImage() method should be just a dumb pull
without any further logic. Make it accept everything it needs
to pull an image and defer any other magic to the image manager.
2025-03-14 10:47:54 +01:00
Anish Ramasekar
ad8666ce88 Update credential provider plugin to support using service account token
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-03-11 20:36:32 -07:00
Tim Allclair
da9c2c553b Set pod watch conditions for resize 2024-11-06 11:05:24 -08:00
Ed Bartosh
e1bc8defac kubelet: Migrate DRA Manager to contextual logging
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2024-08-22 11:12:41 +03:00
Kubernetes Prow Robot
b860feb2a6 Merge pull request #126540 from skitt/avoid-double-mock-headers
Handle all mock header generation with mockery
2024-08-15 15:39:51 -07:00
Kubernetes Prow Robot
702cea241d Merge pull request #123952 from kinvolk/rata/userns-add-tests-namespacesForPod
pkg/kubelet/kuberuntime: Add userns tests for NamespacesForPod
2024-08-14 04:23:22 -07:00
Stephen Kitt
f4ddb44c36 Handle all mock header generation with mockery
mockery is set up to generate headers in all the mocks it produces, so
the separate header generation in update-mocks.sh is no longer useful
(and leads to duplicate headers in three cases). This removes the
relevant parts of the shell script.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-08-05 11:19:37 +02:00
Sascha Grunert
979863d15c Add ImageVolumeSource implementation
This patch adds the kubelet implementation of the image volume source
feature.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-22 18:46:46 +02:00
Rodrigo Campos
6f81aa6aa9 pkg/kubelet/kuberuntime: Add userns tests for NamespacesForPod
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-07-19 12:32:57 +02:00
Stephen Kitt
3f36c83c68 Switch to stretchr/testify / mockery for mocks
testify is used throughout the codebase; this switches mocks from
gomock to testify with the help of mockery for code generation.

Handlers and mocks in test/utils/oidc are moved to a new package:
mockery operates package by package, and requires packages to build
correctly; test/utils/oidc/testserver.go relies on the mocks and fails
to build when they are removed. Moving the interface and mocks to a
different package allows mockery to process that package without
having to build testserver.go.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-20 19:42:53 +02:00
Stephen Kitt
6bf667af06 Switch from golang/mock to uber-go/mock
See https://github.com/golang/mock#gomock: golang/mock is no longer
maintained, and should be replaced by go.uber.org/mock.

This allows golang/mock to be dropped from the status and vendored
fields in unwanted-dependencies.json.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-03-07 09:12:16 +01:00
Giuseppe Scrivano
b2a92406ef KEP-127: check for runtime handler userns support
block the creation of a pod that requires a user namespace, unless the
runtime handler has support for it.

If the pod requested for a user namespace, and the handler does not
support it then return an error regardless of the feature gate.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-27 12:01:00 +01:00
Kubernetes Prow Robot
14f8f5519d Merge pull request #121719 from ruiwen-zhao/metric-size
Add image pull duration metric with bucketed image size
2024-02-13 16:23:50 -08:00
ruiwen-zhao
0f5cf6c1cd Add image pull duration metric with bucketed image size
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2024-02-08 00:30:31 +00:00
Kubernetes Prow Robot
30bb24b1c3 Merge pull request #121913 from liggitt/testing-dep
Drop testing dependency from shipped binaries
2023-12-13 23:55:56 +01:00
Jordan Liggitt
5164db066c Drop testing dependency from shipped binaries 2023-11-15 15:05:18 -05:00
Kubernetes Prow Robot
c3114b2789 Merge pull request #119652 from lixd/kubelet_image_gc
fix kubelet image gc
2023-11-13 17:36:15 +01:00
Kevin Hannon
26923b91e8 implementation of split disk kep 2023-11-01 14:46:33 -04:00
lixd
41584bde23 fix code style
Signed-off-by: lixd <xueduan.li@gmail.com>
2023-09-20 09:08:30 +08:00
lixd
12c0c08e65 fix data race in test
Signed-off-by: lixd <xueduan.li@gmail.com>
2023-09-19 15:49:12 +08:00
kannon92
0819d34204 using parsers in applyDefaultImageTag 2023-05-15 15:53:47 +00:00
Kubernetes Prow Robot
cb5ad1e044 Merge pull request #115576 from silenceshell/fix-fake-os-files-concurrent-map-write
fix concurrent-map-write of FakeOS.Create
2023-03-14 09:39:26 -07:00
ruiwen-zhao
572e6e0ffb Add MaxParallelImagePulls support
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2023-03-02 03:57:59 +00:00
silenceshell
99154b1661 fix concurrent-map-write of FakeOS.Create 2023-02-07 21:37:31 +08:00
Ed Bartosh
4f88332ab4 kubelet: prepare DRA resources before CNI setup 2023-02-06 20:40:11 +02:00
HirazawaUi
a8173eded3 delete unused functions in pkg/kubelet directory 2023-01-16 20:00:49 +08:00
Peter Hunt
6298ce68e2 kubelet: wire ListPodSandboxMetrics
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-11-08 14:47:08 -05:00
Harshal Patil
86284d42f8 Add support for Evented PLEG
Signed-off-by: Harshal Patil <harpatil@redhat.com>
Co-authored-by: Swarup Ghosh <swghosh@redhat.com>
2022-11-08 20:06:16 +05:30
David Ashpole
64af1adace Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet

* clean up extra timeouts

* try fixing incorrectly cancelled context
2022-11-05 06:02:13 -07:00
Antonio Ojea
9c2b333925 Revert "plumb context from CRI calls through kubelet"
This reverts commit f43b4f1b95.
2022-11-02 13:37:23 +00:00
David Ashpole
f43b4f1b95 plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
Kubernetes Prow Robot
127f33f63d Merge pull request #111221 from inosato/remove-ioutil-from-kubelet
Remove ioutil in kubelet/kubeadm and its tests
2022-09-17 21:56:28 -07:00
Giuseppe Scrivano
9b2fc639a0 kubelet: add GetUserNamespaceMappings to RuntimeHelper
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-03 19:53:22 +02:00
inosato
3b95d3b076 Remove ioutil in kubelet and its tests
Signed-off-by: inosato <si17_21@yahoo.co.jp>
2022-07-30 12:35:26 +09:00
Adrian Reber
8c24857ba3 kubelet: add CheckpointContainer() to the runtime
Signed-off-by: Adrian Reber <areber@redhat.com>
2022-07-14 10:27:41 +00:00
Kir Kolyshkin
4513de06a8 Regen mocks using go 1.18
Generated by ./hack/update-mocks.sh using go 1.18

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-23 10:19:38 -07:00
Ciprian Hacman
0819451ea6 Clean up logic for deprecated flag --container-runtime in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-02-10 13:26:59 +02:00