Commit Graph

49698 Commits

Author SHA1 Message Date
Kensei Nakada
041efcd1d4 scheduler: update an old comment 2023-12-22 02:01:13 +00:00
Dan Winship
1c089afcf3 Fix a set type 2023-12-21 09:44:08 -05:00
Dan Winship
147114e648 Update some change tracker doc comments
In particular, fix the description of ServiceChangeTracker.Update's
return value, and point out that it's different from
EndpointsChangeTracker.EndpointSliceUpdate's (though fortunately, in a
way that doesn't matter for any existing code).
2023-12-21 09:44:08 -05:00
Dan Winship
a8a12be3d3 Rename cache's endpointSliceInfo/endpointInfo to endpointSliceData/endpointData
EndpointSliceCache was using the name "endpointInfo" to refer to two
different data types (most egregiously in addEndpoints(), which had a
variable named `endpoint` of type `*endpointInfo` and a variable named
`endpointInfo` of type `Endpoint`).

Continue using "endpointInfo" in places that refer to proxy.Endpoint /
BaseEndpointInfo, since that's consistent with other code, but rename
the local "cache of the Endpoints field of an EndpointSlice" type from
"endpointInfo" to "endpointData". Likewise, rename endpointSliceInfo
to endpointSliceData, for consistency.
2023-12-21 09:44:08 -05:00
Dan Winship
764cb0457f Move some code around in servicechangetracker.go/endpointschangetracker.go
Put the ServiceChangeTracker and EndpointsChangeTracker definitions at
the top of the files, and put the ServicePortMap and EndpointsMap
definitions before their methods.

(No code changes.)
2023-12-21 09:44:04 -05:00
Dan Winship
a73b275031 Split ServicePort/Endpoint from ServiceChangeTracker/EndpointsChangeTracker
Move the ServicePort/BaseServicePortInfo types to serviceport.go.
Move the Endpoint/BaseEndpointInfo types to endpoint.go.

To avoid confusion with the new filenames, rename service.go to
servicechangetracker.go and endpoints.go to endpointschangetracker.go.

(No code changes; this just moves some code from types.go and
services.go to serviceport.go, and some code from types.go and
endpoints.go to endpoint.go.)
2023-12-21 09:38:25 -05:00
Dan Winship
ede0dc1d07 Make newBaseServiceInfo a function rather than a method
(in preparation for moving it)
2023-12-21 09:38:25 -05:00
Dan Winship
0779042a6f Remove a useless "_" assignment to appease the linter
(This would become an error rather than a warning once we try to move
this code to another file.)

Also rename an "ok" variable to "exists" since that what it really
means.
2023-12-21 09:38:24 -05:00
Dan Winship
452fcc5fd6 Remove some dead code in service.go
ServicePortMap.merge had a giant comment explaining its return value,
but nothing ever used that return value.

ServicePort had an InternalTrafficPolicy() method, but nothing used it
(because it was redundant with InternalPolicyLocal().)
2023-12-21 09:38:24 -05:00
Aleksandra Malinowska
f89c744b7b Only run Prioritize() for extenders with prioritizeVerb configured 2023-12-21 13:42:27 +01:00
Aleksandra Malinowska
cd3f7a31e8 Add unit tests for no score plugin scenario 2023-12-21 13:42:21 +01:00
Aleksandra Malinowska
7abba24231 Fix existing unit test (add no op scoring plugin) 2023-12-21 13:30:01 +01:00
Aleksandra Malinowska
e19be41f58 Don't evaluate extra nodes if there's no score plugin defined 2023-12-21 13:29:46 +01:00
Kubernetes Prow Robot
247ea2046d Merge pull request #122204 from danwinship/proxy-pending-changes
Fix race condition in iptables partial sync handling
2023-12-20 19:22:17 +01:00
Lubomir I. Ivanov
47ee56a7f2 core/v1: remove note about hostAliases not working with hostNetwork
Support for this was added in 1.8 by PR 50646.
Local tests confirm that the feature indeed works.
E2e tests seem to be missing.
2023-12-20 18:09:21 +02:00
Kubernetes Prow Robot
f68a965e5a Merge pull request #122032 from carlory/remove-fg-APISelfSubjectReview
remove feature-gate APISelfSubjectReview in 1.30
2023-12-20 16:46:53 +01:00
Patrick Ohly
b0d4a8cd6d dra scheduler: fix incorrect tracking of claim candidates for reallocation
When dealing with unschedulable pods, the intent was to deallocate only claims
which are allocated and use delayed allocation. That if check wasn't handled
correctly, causing also claims with immediate allocation to be considered as
candidates.

Found during code reading, probably has never occurred in practice yet.
2023-12-20 09:04:01 +01:00
wen.rui
4a7592f8a4 Remove GA feature gate LegacyServiceAccountTokenTracking in 1.30 2023-12-20 13:41:10 +08:00
Kubernetes Prow Robot
0a54839370 Merge pull request #122387 from kerthcet/cleanup/change-error
More understandable error for scheduler configuration validation
2023-12-20 06:19:37 +01:00
kerthcet
1f3e668e18 Use semantic comparation for API
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-12-20 10:23:29 +08:00
Dan Winship
626f349fef Drop PendingChanges methods from change trackers, move into UpdateResults
This fixes a race condition where the tracker could be updated in
between us calling .PendingChanges() and .Update().
2023-12-19 18:27:33 -05:00
Dan Winship
5d0656b1f6 Squash some unnecessarily-chained methods in the change trackers
ServicePortMap.Update() and EndpointsMap.Update() were just a tiny
wrappers around the corresponding apply() methods, which had no other
callers. So squash them together.

(Also fix the variable naming in ServicePortMap.Update() to match
other methods.)
2023-12-19 18:27:33 -05:00
Kubernetes Prow Robot
755b4e2bc4 Merge pull request #121576 from huww98/opti-aswp
ad controller: optimize populateActualStateOfWorld
2023-12-19 17:43:45 +01:00
kerthcet
538248df0d More understandable error for scheduler configuration validation
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-12-19 19:13:30 +08:00
Kubernetes Prow Robot
b5ba7bc4f5 Merge pull request #122126 from liggitt/duplicate-warning
Update duplicate env var warning
2023-12-19 04:37:27 +01:00
Dan Winship
c1ce1e00ee Properly build-tag the Linux kube-proxy backend code
This had to be able to build on OS X before to make verify-typecheck
pass, but now that that's fixed we can tag the code properly as being
linux-only.
2023-12-18 20:20:51 -05:00
Dan Winship
b69510b069 Remove an unnecessary abstraction
safeIpset was a wrapper for thread-safely sharing an ipset.IPSet, but
this was unnecessary because ipset.IPSet is just a wrapper around exec
anyway and doesn't need any locking.
2023-12-18 19:58:47 -05:00
Kubernetes Prow Robot
2b5c0c281d Merge pull request #122310 from weilaaa/use_buildin_max_min_instead
use build-in max and min func to instead of k8s.io/utils/integer funcs
2023-12-18 19:25:34 +01:00
Kubernetes Prow Robot
d74705119d Merge pull request #122334 from carlory/fix-118893-4
NodeUnschedulable: scheduler queueing hints
2023-12-18 18:13:52 +01:00
Kubernetes Prow Robot
9dc0dbe878 Merge pull request #122195 from nayihz/feat_queuinghints
podtopologyspread: scheduler queueing hints
2023-12-18 16:58:12 +01:00
Kubernetes Prow Robot
56d0da546a Merge pull request #121950 from sanposhiho/doc-postfilter
fix(framework): elaborate the document on PostFilter
2023-12-18 16:57:49 +01:00
Jordan Liggitt
b6e34187ca Update duplicate env var warning 2023-12-18 10:06:30 -05:00
Kensei Nakada
1d0453127d feature(NodeAffinity): return Skip in PreScore when nothing to do in Score 2023-12-18 12:00:10 +00:00
Kubernetes Prow Robot
138ac71fb1 Merge pull request #122011 from carlory/fix-121752
fix falky test pkg/registry/core/persistentvolume/storage TestUpdateStatus
2023-12-18 06:21:00 +01:00
nayihz
09a80df1d1 podtopologyspread: scheduler queueing hints 2023-12-17 14:30:53 +08:00
Kubernetes Prow Robot
e6acd1caf5 Merge pull request #122330 from dims/remove-unused-code-in-kubelet
Remove unused code in kubelet - DockerContainer / ContainerInfo / SubcontainerInfo / WatchEvents
2023-12-16 23:46:02 +01:00
carlory
d36a7089cd scheduler/NodeUnschedulable: reduce pod scheduling latency
Co-authored-by: wackxu <xushiwei5@huawei.com>
Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
2023-12-16 20:50:11 +08:00
Kubernetes Prow Robot
162599da69 Merge pull request #122311 from nayihz/fix_122304
add unit test for the scheduling queue for QueueingHint disabled
2023-12-16 03:48:58 +01:00
Davanum Srinivas
642574e964 WatchEvents seems useless
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-12-15 17:07:20 -05:00
Davanum Srinivas
aee1d54a0d Drop SubcontainerInfo
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-12-15 16:58:00 -05:00
Davanum Srinivas
c865ad532a fixing based on feedback in PR
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-12-15 16:51:15 -05:00
Kubernetes Prow Robot
55f1e21fdc Merge pull request #122341 from jsafrane/fix-vsphere-migration
Fix CSI migration for vSphere volumes
2023-12-15 18:33:14 +01:00
Kubernetes Prow Robot
e04316a68a Merge pull request #121954 from AxeZhan/nodeInfo
Sched framework: expose NodeInfo in all functions of PluginsRunner interface
2023-12-15 18:33:00 +01:00
Kubernetes Prow Robot
b1cf91b300 Merge pull request #122309 from carlory/fix-118893-1
nodeaffinity: scheduler queueing hints
2023-12-15 17:17:33 +01:00
Kubernetes Prow Robot
195bb67d36 Merge pull request #119177 from carlory/fix-118893-3
noderesourcefit: scheduler queueing hints
2023-12-15 17:17:19 +01:00
Kubernetes Prow Robot
c633ea71ed Merge pull request #122211 from gnufied/fix-uncertain-raw-block-devices
Fix device uncertain errors on reboot
2023-12-15 15:42:40 +01:00
Davanum Srinivas
d621e09a52 remove unused GetRawContainerInfo
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-12-15 05:56:22 -08:00
Jan Safranek
15e0c41601 Fix CSI migration for vSphere volumes
Restore `migratedPlugins` entry for in-tree vSphere volumes and mark them
as migrated. Otherwise the CSI volume plugin ignores in-tree vSphere
volumes and they will never get attached / mounted by CSI migration.

The entry in `migratedPlugins` was incorrectly removed during
CSIMigrationvSphere feature gate removal.
2023-12-15 13:03:35 +01:00
carlory
85d08833bf warnning on relaim policy when it is Recycle 2023-12-15 17:50:37 +08:00
weilaaa
eb8f3f194f use build-in max and min func to instead of k8s.io/utils/integer funcs 2023-12-15 15:09:11 +08:00