Commit Graph

129272 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
990b02bf39
Merge pull request #130033 from ardaguclu/completion-use-restclientgetter
Add completion in kubectl debug
2025-03-19 10:18:40 -07:00
Kubernetes Prow Robot
4467dd3d6c
Merge pull request #130028 from AkihiroSuda/subids-per-pod
kubelet: config: add userNamespaces.idsPerPod
2025-03-19 10:18:33 -07:00
yongruilin
dab8758a59 chore: avoid resetting config of emulation verison and featuregates when adding flags
This change introduces improvements to the component compatibility registry:
- Modify the kube-scheduler test server to create a separate ComponentGlobalsRegistry
- Update the compatibility registry to handle multiple flag configurations
- Enhance test cases to support emulation version mapping between components
2025-03-19 16:31:13 +00:00
Kubernetes Prow Robot
f1c634f93e
Merge pull request #130463 from sanposhiho/ga-mlk
feat: graduate MatchLabelKeysInPodAffinity to GA
2025-03-19 09:06:31 -07:00
Jon Huhn
7d74a504ca Remove unused VAP for DRA admin access e2e test 2025-03-19 11:02:56 -05:00
Natasha Sarkar
1889e0cad6 scheduler sets observedGeneration in pod conditions 2025-03-19 15:45:41 +00:00
vinay kulkarni
951e33fdf9 Fix gofmt issues 2025-03-19 15:13:44 +00:00
Kensei Nakada
10c6a4258f feat: graduate MatchLabelKeysInPodAffinity to GA 2025-03-19 23:06:04 +09:00
vinay kulkarni
917c4b310b Fix lint issues, use kuberuntime's minGracePeriod const, boost container restart wait period 2025-03-19 13:26:01 +00:00
Swati Sehgal
327ebcffc8 node: cpumgr: e2e: Define constants and use them instead of literals
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-03-19 13:19:20 +00:00
Swati Sehgal
c90f0539c8 node: cpumgr: e2e: Tests for distribute-cpus-across-numa policy option
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-03-19 13:19:03 +00:00
Swati Sehgal
b6a3ac47de node: cpumgr: e2e: tests for NUMA allocation spread metrics
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-03-19 13:13:56 +00:00
Marek Siarkowicz
3edeb60c08 Create Snapshotter interface to fake the implementation 2025-03-19 14:08:21 +01:00
Marek Siarkowicz
7da942ca74 Change precedence order for continue and legacy exact match
This doesn't matter for shouldDelegateList, but matters when picking
source of RV. RV from continue takes precedence.
2025-03-19 14:06:34 +01:00
Maciej Skoczeń
e367dca6c5 Change backoffQ less function to order pods by priority in windows 2025-03-19 13:04:15 +00:00
Dan Winship
88f8e6697d Implement PreferSameNode traffic distribution in kube-proxy 2025-03-19 08:46:17 -04:00
Dan Winship
c85083589c Clarify hostname vs node name in kube-proxy
Various parts of kube-proxy passed around a "hostname", but it is
actually the name of the *node* kube-proxy is running on, which is not
100% guaranteed to be exactly the same as the hostname. Rename it
everywhere to make it clearer that (a) it is definitely safe to use
that name to refer to the Node, (b) it is not necessarily safe to use
that name with DNS, etc.
2025-03-19 08:46:15 -04:00
Dan Winship
ff640c3679 Minor updates to kube-proxy topology code
Clarify the comments around terminating endpoints.

Remove stale references to the ProxyTerminatingEndpoints feature gate
in the unit tests.
2025-03-19 08:39:13 -04:00
Dan Winship
19952a2b7b Implement the EndpointSlice controller side of PreferSameZone/PreferSameNode 2025-03-19 08:39:13 -04:00
Dan Winship
90c8f9aef1 Don't write out dummy zone hints in clusters with no zones
If you set `trafficDistribution: PreferClose` on a service in a
cluster with no defined zones, then it would add

  hints:
    forZones:
    - name: ""

to each endpoint. This ended up working anyway since kube-proxy would
likewise end up looking for an endpoint for the "" zone, but it's
unnecessary, since you'd get exactly the same behavior by just leaving
all of the endpoints unhinted. (Of course there's no point in using
PreferClose traffic distribution in this case, but this will make
PreferSameNode cleaner.)
2025-03-19 08:39:13 -04:00
Dan Winship
413af836b3 Minor updates to traffic distribution unit tests
Merge TestReconcileHints_trafficDistribution_is_PreferClose and
TestReconcileHints_trafficDistribution_is_nil_or_empty together.
Change the `trafficDistribution: ""` test to `trafficDistribution:
Unknown`, since `""` is not actually a possible value (but we should
still test that unknown values are ignored, to prevent weird skew
bugs).

Fill in the NodeName field in the endpoints. It's not needed yet but
it will be.
2025-03-19 08:39:13 -04:00
Dan Winship
af3584778e update generate docs for PreferSameTrafficDistribution 2025-03-19 08:39:13 -04:00
Dan Winship
4435ead24a Add PreferSameTrafficDistribution feature gate and associated API. 2025-03-19 08:39:13 -04:00
Dan Winship
6ca82f9c16 Update the use of sets in EndpointSlice validation
Don't use sets for validating port name and zone hint uniqueness,
since constructing a new set each time is likely to be less efficient
than just doing a linear search.

Keep the sets for supportedAddressTypes and supportedPortProtocols
(since they're only constructed once) but switch to the generic set
API.
2025-03-19 08:39:13 -04:00
Marek Siarkowicz
929a9c0cad Extend shouldDelegateList testing incorportating state of cacher 2025-03-19 12:40:33 +01:00
Kubernetes Prow Robot
73f54b67b2
Merge pull request #130816 from macsko/move_scheduler_perf_topology_spreading_tests_to_separate_package
Move scheduler_perf topology spreading tests to a separate package
2025-03-19 02:00:37 -07:00
Akihiro Suda
09fdae408f
pkg/kubelet/userns: add idsPerPod tests
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 17:26:11 +09:00
Akihiro Suda
1592bfa4a8
kubelet: config: add userNamespaces.idsPerPod
IDsPerPod is the mapping length of subids for UserNS.
The length must be multiple of 65536.
Default: 65536

Implements kubernetes/enhancements PR 5020 (addendum to KEP-127)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 17:26:11 +09:00
Patrick Ohly
9f161590be metrics testing: add type aliases to avoid direct prometheus imports
In tests it is sometimes unavoidable to use the Prometheus types directly,
for example when writing a custom gatherer which needs to normalize data
before testing it. device_taint_eviction_test.go does this to strip
out unpredictable data in a histogram.

With type aliases in a package that is explicitly meant for tests we
can avoid adding exceptions for such tests to the global exception list.
2025-03-19 09:18:38 +01:00
Patrick Ohly
37b47f4724 DRA helper: support dropped fields and TimeAdded defaults
Both the new DeviceTaint.TimeAdded and dropped fields when
the DRADeviceTaints feature is disabled confused the ResourceSlice
controller because what is stored and sent back can be different
from what the controller wants to store.

It's now more lenient regarding TimeAdded (doesn't need to be exact because of
rounding during serialization, only having a value on the server is okay)
and dropped fields (doesn't try to store them again). It also preserves
a server-side TimeAdded when updating slices.
2025-03-19 09:18:38 +01:00
Patrick Ohly
2499663b84 DRA E2E: tests for device taints 2025-03-19 09:18:38 +01:00
Jon Huhn
5760a4f282 DRA scheduler: device taints and tolerations
Thanks to the tracker, the plugin sees all taints directly in the device
definition and can compare it against the tolerations of a request while
trying to find a device for the request.

When the feature is turnedd off, taints are ignored during scheduling.
2025-03-19 09:18:38 +01:00
Patrick Ohly
a027b439e5 DRA: add device taint eviction controller
The controller is derived from the node taint eviction controller.
In contrast to that controller it tracks the UID of pods to prevent
deleting the wrong pod when it got replaced.
2025-03-19 09:18:38 +01:00
Keita Mochizuki
07a275437f
kubectl debug: Display a warning message that the debug container's capabilities may not work with a non-root user (#127696)
* Add warning message about capabilities of debug container

* fix1

* fix2

* fix3
2025-03-19 00:50:30 -07:00
vinay kulkarni
d5d008a6bd Invoke UpdateContainerResources or trigger container restarts (for RestartContainer policy) when memory requests are resized 2025-03-19 06:33:27 +00:00
Rita Zhang
0301e5a9f8
DRA: AdminAccess validate based on namespace label
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2025-03-18 22:56:54 -07:00
Kubernetes Prow Robot
3a14b619d5
Merge pull request #130910 from googs1025/fix/datarace
flake: fix data race for func TestBackoff_Step
2025-03-18 22:49:55 -07:00
Kubernetes Prow Robot
a6227695ab
Merge pull request #128402 from richabanker/mvp-agg-discovery
KEP 4020: Replace StorageVersionAPI with aggregated discovery to fetch served resources by a peer apiserver
2025-03-18 21:43:49 -07:00
Kubernetes Prow Robot
4dfed146e0
Merge pull request #130891 from pohly/dra-scheduler-plugin-unit-test-fix
DRA scheduler: fix potential panic during unit test verification
2025-03-18 20:34:16 -07:00
Kubernetes Prow Robot
9f8a84930d
Merge pull request #130573 from natasha41575/pod-conditions
[FG:PodObservedGenerationTracking] kubelet sets observedGeneration on pod conditions
2025-03-18 20:34:08 -07:00
Kubernetes Prow Robot
f287bc21b7
Merge pull request #130115 from danmillwood/danmillwood-dispatcher-test-patch
Fix intermittent failure in TestDispatcher test
2025-03-18 20:34:01 -07:00
Kubernetes Prow Robot
3b6596d1e0
Merge pull request #130020 from mozillazg/patch-3
test: fix a typo
2025-03-18 20:33:49 -07:00
googs1025
2f1f19a992 flake: fix data race for func TestBackoff_Step 2025-03-19 10:48:58 +08:00
Kubernetes Prow Robot
32b1819423
Merge pull request #130906 from serathius/streaming-validation
Update kube-openapi and integrate streaming tags validation
2025-03-18 18:46:00 -07:00
Kubernetes Prow Robot
7fb8bd8aca
Merge pull request #130905 from tallclair/ippr-beta
[FG:InPlacePodVerticalScaling] Graduate to Beta
2025-03-18 18:45:54 -07:00
Kubernetes Prow Robot
83f8513db8
Merge pull request #130550 from sanposhiho/async-preemption-beta
feat: graduate the async preemption feature to beta
2025-03-18 17:17:54 -07:00
Kubernetes Prow Robot
6a968c5789
Merge pull request #130904 from serathius/watchcache-corrupt
In TestListCorruptObject corrupt the object in etcd instead of changing encryption key
2025-03-18 16:09:55 -07:00
Marek Siarkowicz
75a4d136ab Update kube-openapi and integrate streaming tags validation 2025-03-18 23:52:55 +01:00
Tim Allclair
cd1a5c6d5c Fix Kubelet unit tests 2025-03-18 15:51:09 -07:00
Kubernetes Prow Robot
94d66387d0
Merge pull request #130553 from Phaow/vac-e2e
Add protection finalizer to vac when it is created
2025-03-18 14:59:54 -07:00