Commit Graph

265 Commits

Author SHA1 Message Date
Tim Allclair
3f4ef42e9a Move PodResizeStatus cache out of allocated state 2025-02-18 09:19:23 -08:00
Filipe Xavier
14c0bc19ac kubelet: improve allocated resources checkpointing
changed calls to set allocation from container level to pod level on status manager.
2025-02-06 09:20:39 -03:00
Kubernetes Prow Robot
0634e21fb5 Merge pull request #128367 from vivzbansal/sidecar-2
[FG:InPlacePodVerticalScaling] Implement resize for sidecar containers
2025-02-05 14:38:15 -08:00
Kubernetes Prow Robot
6e3546228d Merge pull request #129895 from tallclair/refactor-allocation
Delete unused code: allocated state ClearState
2025-02-02 09:40:55 -08:00
Kubernetes Prow Robot
0e9ca10eeb Merge pull request #129504 from felipeagger/cleanup/ckpt-pod-alloc-state-mem
Cleanup Kubelet Checkpointing: Refactor state mem
2025-01-30 13:05:33 -08:00
Filipe Xavier
f7df3ec07f move log restored state to better location. 2025-01-30 12:06:12 -04:00
Tim Allclair
424c7ca7e5 Remove unused ClearState function 2025-01-29 12:04:40 -08:00
vivzbansal
5ed5732fa2 Refactored status manager code of updatePodFromAllocation 2025-01-27 19:46:54 +00:00
vivzbansal
6c5cf68722 Resolved latest review comments 2025-01-27 19:46:33 +00:00
vivzbansal
d1fac494f4 resolve merge conflicts 2025-01-27 19:42:13 +00:00
Davanum Srinivas
4e05bc20db Linter to ensure go-cmp/cmp is used ONLY in tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-24 20:49:14 -05:00
Filipe Xavier
fd35f652d4 fix state mem constructor and adjust restoreState 2025-01-11 15:37:57 -03:00
Filipe Xavier
efdd6bea2e kubelet checkpoint: refactor state memory
refactor state mem constructor to accept the state as parameter
and SetPodAllocation to update a single pod.
2025-01-07 16:31:06 -03:00
Filipe Xavier
8e872978e8 kubelet: improve allocated resources checkpointing
changed calls to set allocation from container level to pod level on status manager.
2025-01-07 09:20:36 -03:00
Paco Xu
03a15fa65d Revert "[FG:InPlacePodVerticalScaling] Graduate to Beta" 2024-11-20 14:55:29 +08:00
Tim Allclair
479b300227 Fix unit tests 2024-11-09 14:29:02 -08:00
vivzbansal
763e810fb5 refactor code to add sidecar container support in IPPR 2024-11-07 21:20:48 +00:00
Tim Allclair
ea53083c14 Don't checkpoint ResizeStatus 2024-11-05 15:48:35 -08:00
yunwang0911
f428881ec0 Update pkg/kubelet/status/state/state_checkpoint_test.go 2024-10-31 14:02:35 +08:00
yunwang0911
05493c0924 Update pkg/kubelet/status/state/state_checkpoint_test.go
Co-authored-by: Tim Allclair <timallclair@gmail.com>
2024-10-30 18:11:10 +08:00
yunwang0911
e4c8eefeb2 Update pkg/kubelet/status/state/state_checkpoint_test.go
Co-authored-by: Tim Allclair <timallclair@gmail.com>
2024-10-30 18:08:53 +08:00
yunwang
b00f221a85 fix InPlacePodVerticalScaling restore bug: the content wrote to and read from file pod_status are different 2024-10-29 13:39:58 +08:00
yunwang0911
114d4df4b4 Update pkg/kubelet/status/state/state_checkpoint.go
Co-authored-by: Tim Allclair <timallclair@gmail.com>
2024-10-29 11:39:54 +08:00
yunwang0911
8edc80c470 Update pkg/kubelet/status/state/state_checkpoint_test.go
Co-authored-by: Tim Allclair <timallclair@gmail.com>
2024-10-29 11:39:41 +08:00
yunwang0911
9d18e900c8 Update pkg/kubelet/status/state/checkpoint.go
Co-authored-by: Tim Allclair <timallclair@gmail.com>
2024-10-29 11:39:32 +08:00
yunwang0911
b67a5623b1 Update pkg/kubelet/status/state/checkpoint.go
Co-authored-by: Tim Allclair <timallclair@gmail.com>
2024-10-29 11:39:18 +08:00
yunwang
cf8cdaf5a7 fix InPlacePodVerticalScaling restore bug: the content wrote to and read from file pod_status are different 2024-10-28 14:50:06 +08:00
Tim Allclair
40595bd94b Fix FakeStatusManager SetPodAllocation 2024-10-25 09:51:42 -07:00
Tim Allclair
321eff34f7 Rework allocated resources handling 2024-10-24 09:27:40 -07:00
Tim Allclair
53aa727708 Checkpoint allocated requests and limits 2024-10-22 11:26:48 -07:00
Kubernetes Prow Robot
a7fcc89ac0 Merge pull request #125936 from sivchari/use-ptr
use utils/ptr package instead of utils/pointer
2024-10-07 01:02:04 +01:00
sivchari
4eab3cca0a use utils/ptr package instead of utils/pointer
Signed-off-by: sivchari <shibuuuu5@gmail.com>
2024-10-03 11:33:12 +09:00
Matthieu MOREL
f736cca0e5 fix: enable expected-actual rule from testifylint in module k8s.io/kubernetes
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-27 07:56:31 +02:00
Matthieu MOREL
fa0e38981c fix: enable compares rule from testifylint in module k8s.io/kubernetes
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-22 11:20:05 +02:00
zhifei92
86e0ed1892 add unit test 2024-09-14 17:06:07 +08:00
zhifei92
df87982950 fix: normalize ephemeral container statuses 2024-09-14 17:04:28 +08:00
Kubernetes Prow Robot
5d40866fae Merge pull request #125994 from carlory/fix-job-api
clean up codes after PodDisruptionConditions was promoted to GA
2024-07-17 14:37:09 -07:00
Kubernetes Prow Robot
2d4514e169 Merge pull request #125802 from mmorel-35/testifylint/len+empty
fix: enable empty and len rules from testifylint on pkg and staging package
2024-07-11 23:12:06 -07:00
carlory
850bc09e9b clean up codes after PodDisruptionConditions was promoted to GA and locked to default 2024-07-11 10:40:21 +08:00
Matthieu MOREL
f014b754fb fix: enable empty and len rules from testifylint on pkg package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2024-07-06 23:15:43 +00:00
Michal Wozniak
780191bea6 review remarks for graduating PodDisruptionConditions 2024-06-28 17:32:27 +02:00
Michal Wozniak
bf0c9885a4 Graduate PodDisruptionConditions to stable 2024-06-28 16:36:51 +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
HirazawaUi
7a4531c5ba add ContainerStatusUnknown constant 2024-05-03 00:27:19 +08:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +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
Kubernetes Prow Robot
f997e50425 Merge pull request #117516 from sourcelliu/intcast
Remove unnecessary type conversion
2023-10-26 06:25:02 +02:00
Kevin Hannon
c94240e2e2 move kubelet constant for podreadytostart to staging 2023-10-12 11:18:11 -04:00
Qian Xiao
0944c00778 Fix some typo in kubelet component source code 2023-08-03 23:56:50 -07:00
Gunju Kim
9d6c1030db Generate containers ready condition including restartable init containers 2023-07-18 08:12:24 +09:00