Commit Graph

51822 Commits

Author SHA1 Message Date
Siyuan Zhang
8fc3a33454 Refactor compatibility version code
Replace DefaultComponentGlobalsRegistry with new instance of componentGlobalsRegistry in test api server.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

move kube effective version validation out of component base.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

move DefaultComponentGlobalsRegistry out of component base.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

move ComponentGlobalsRegistry out of featuregate pkg.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

remove usage of DefaultComponentGlobalsRegistry in test files.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

change non-test DefaultKubeEffectiveVersion to use DefaultBuildEffectiveVersion.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Restore useDefaultBuildBinaryVersion in effective version.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

rename DefaultKubeEffectiveVersion to DefaultKubeEffectiveVersionForTest.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

pass options.ComponentGlobalsRegistry into config for controller manager and scheduler.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Pass apiserver effective version to DefaultResourceEncodingConfig.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

change statusz registry to take effective version from the components.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Address review comments

Signed-off-by: Siyuan Zhang <sizhang@google.com>

update vendor

Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-02-05 16:10:53 -08:00
Kubernetes Prow Robot
72d74869e9 Merge pull request #129114 from bart0sh/PR167-fix-DRA-registration-test
kubelet: fix DRA registration test
2025-02-05 14:38:26 -08: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
925cf7db71 Merge pull request #129930 from serathius/deprecate-watch-from-storage
Deprecate WatchFromStorageWithoutResourceVersion
2025-02-05 10:18:23 -08:00
Marek Siarkowicz
065bf2004d Deprecate WatchFromStorageWithoutResourceVersion
Around the 1.31 release, we discovered that a change introduced in 1.27 allowead
clients to open WATCH requests directly to etcd. This had detrimental consequences,
enabling abusive clients to bypass caching and overwhelm etcd.
Unlike the API server, etcd lacks protection against such behavior.

To mitigate this, we redirected all WATCH requests to be served from the cache.
The WatchFromStorageWithoutResourceVersion feature gate was retained as an escape hatch.
However, since we have no plans to allow direct WATCH requests to etcd again,
this flag is now obsolete.

Direct WATCH requests to etcd offer no advantage, as they don't provide stronger
consistency guarantees. WATCH operations are inherently inconsistent; unlike LIST
operations, they do not confirm the resource version with a quorum. While Kubernetes
uses the WithRequireLeader option on WATCH requests to prevent maintaining connections
to isolated etcd members, the API server provides the same level of guarantee through
its health checks, which fail if it cannot connect to etcd member.  Therefore,
the WatchFromStorageWithoutResourceVersion feature gate can be deprecated and removed.
2025-02-05 11:42:18 +01:00
Kubernetes Prow Robot
481cc1a392 Merge pull request #129560 from bart0sh/PR168-DRA-fix-All-allocation-mode
DRA: fix allocation mode `All`
2025-02-05 00:38:16 -08:00
Kubernetes Prow Robot
fab0d76574 Merge pull request #129731 from gjkim42/promote-sidecar-containers-to-ga
Promote SidecarContainers feature to GA
2025-02-04 16:22:58 -08:00
Kubernetes Prow Robot
f82439f536 Merge pull request #129486 from iholder101/bugfix/swap-container-cri-stats
[KEP-2400] [Bugfix]: Ensure container-level swap metrics are collected
2025-02-04 08:14:59 -08:00
Kensei Nakada
3701e39327 fix: remove the mention that DRA uses Pending 2025-02-04 06:45:05 +09:00
Kubernetes Prow Robot
1b7a059187 Merge pull request #128999 from macsko/improve_goroutines_metric_writes_in_parallelizer_until
Improve Goroutines metric calls in parallelizer.Until
2025-02-03 07:30:57 -08:00
Kubernetes Prow Robot
fc268ecd09 Merge pull request #129823 from googs1025/chore/log_improve
fix(dra plugin): when there is no resourceclaim, return directly
2025-02-02 16:28:56 -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
Gunju Kim
8d27bf2108 Leave TODOs in pkg/kubelet/kuberuntime for later removal
This leaves TODOs in pkg/kubelet/kuberuntime to remove these redundant
code paths later, since they are supposed to be a subset of the new code
paths.
2025-02-02 17:45:50 +09:00
Gunju Kim
0bee0bcaa7 Promote SidecarContainers feature to GA 2025-02-02 17:45:36 +09:00
Kubernetes Prow Robot
295ed0a607 Merge pull request #129901 from bart0sh/PR165-migrate-sysctl-to-contextual-logging
kubelet: Migrate pkg/kubelet/sysctl to contextual logging
2025-01-31 01:52:57 -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
Kubernetes Prow Robot
4e54a67d57 Merge pull request #128679 from ffromani/unshare-containermap-among-managers-cleanup
node: cm: use maps.Clone instead of reinvent it
2025-01-30 13:05:25 -08:00
Filipe Xavier
f7df3ec07f move log restored state to better location. 2025-01-30 12:06:12 -04:00
Kubernetes Prow Robot
586f0fad5c Merge pull request #125046 from tklauser/min-max-builtins
Use Go 1.21 min/max builtins
2025-01-30 07:33:23 -08:00
Ed Bartosh
829fa63b5b DRA: fix allocation mode All
`All` allocation mode should mean 'at least one' for DRA.
Allocation should fail if `All` devices requested and none found.
2025-01-30 16:34:25 +02:00
Francesco Romani
e766b04ade node: cm: use maps.Clone instead of reinvent it
As pointed out in https://github.com/kubernetes/kubernetes/pull/128657#discussion_r1832973928

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-01-30 14:45:04 +01:00
Ed Bartosh
71b9114840 kubelet: Migrate pkg/kubelet/sysctl to contextual logging 2025-01-30 10:31:58 +02:00
Kubernetes Prow Robot
814e2c89a8 Merge pull request #128792 from vivzbansal/sidecar-3
Added unit test for resize policy validation check of sidecar containers
2025-01-29 18:23:22 -08:00
Kubernetes Prow Robot
76506f1d87 Merge pull request #129816 from sambdavidson/master
Improve SA max token expiry with external signer logic, and plumb extended expiry duration.
2025-01-29 16:41:29 -08:00
Kubernetes Prow Robot
547654a8a1 Merge pull request #129813 from yongruilin/golangci-featuregate-add
feat: add a lint rule to prevent Add unversioned featuregate
2025-01-29 16:41:22 -08:00
Kubernetes Prow Robot
f05b5dddb8 Merge pull request #129870 from yongruilin/fix-componentstatus-500
chore: use NewNotFound error for missing components
2025-01-29 12:09:29 -08:00
Kubernetes Prow Robot
87defb5fb1 Merge pull request #129242 from tallclair/windows-mkdir
[windows] Don't chmod existing directory in MkdirAll
2025-01-29 12:09:22 -08:00
Tim Allclair
424c7ca7e5 Remove unused ClearState function 2025-01-29 12:04:40 -08:00
Samuel Davidson
7936d64e03 Replace IsExternalSigner boolean with ExtendedSigningDuration throughout apiserver to ensure consistent token signing length between local and external token signing. 2025-01-29 17:49:22 +00:00
yongruilin
bde75d6020 chore: use NotFound error for missing components
In this way, the return status could be 404 instead of 500
2025-01-28 17:29:30 -08:00
googs1025
ed826dddfe fix(dra plugin): when there is no resourceclaim, return directly 2025-01-29 08:47:52 +08:00
Kubernetes Prow Robot
8294abc599 Merge pull request #128998 from bart0sh/PR165-migrate-oom-to-contextual-logging
kubelet: Migrate pkg/kubelet/oom to contextual logging
2025-01-28 13:33:22 -08:00
yongruilin
8a0937c034 feat: add a lint rule to prevent Add unversioned featuregate 2025-01-28 09:37:43 -08:00
Maciej Szulik
1fa995224a Update scale sub-resource to return the same error everywhere
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-01-28 15:42:08 +01:00
Kubernetes Prow Robot
2bda5dd8c7 Merge pull request #129656 from vinayakankugoyal/kep2862beta
KEP-2862: Graduate to BETA.
2025-01-27 19:05:23 -08:00
vivzbansal
cfa0349159 Update validation code 2025-01-28 00:55:55 +00:00
vivzbansal
c31b1b3332 Resolved some review comments 2025-01-27 19:46:55 +00:00
vivzbansal
c479f007d8 Update field to use feature gate 2025-01-27 19:46:55 +00:00
vivzbansal
5889da1bbc Resolved latest review comments 2025-01-27 19:46:54 +00:00
vivzbansal
242dec3e34 Updated some unit tests and resolved some review comments 2025-01-27 19:46:54 +00:00
vivzbansal
5ed5732fa2 Refactored status manager code of updatePodFromAllocation 2025-01-27 19:46:54 +00:00
vivzbansal
8fa8277908 Added some unit tests 2025-01-27 19:46:54 +00:00
vivzbansal
2ba61325f6 Fix e2e test error due to ContainersToUpdate map not created 2025-01-27 19:46:54 +00:00
vivzbansal
6c5cf68722 Resolved latest review comments 2025-01-27 19:46:33 +00:00
vivzbansal
6cf5b80c64 Fix some unit test error 2025-01-27 19:42:14 +00:00
vivzbansal
1cf4587277 Fix build error 2025-01-27 19:42:14 +00:00
vivzbansal
1eb966cb45 Added unit test for sidecar containers in TestValidatePodResize 2025-01-27 19:42:13 +00:00
vivzbansal
a0d3cb0a2c Added proper validation msg when non-sidecar containers are resized 2025-01-27 19:42:13 +00:00
vivzbansal
591b0f547a Fix issue of pod spec mismatch if there is any non-restarble init container present 2025-01-27 19:42:13 +00:00
vivzbansal
3885d2f8ab Added sidecar support in ValidatePodResize and dropNonResizeUpdates 2025-01-27 19:42:13 +00:00