Commit Graph

1680 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
7c56aa5a58 Merge pull request #128353 from sanposhiho/patch-13
fix: register ResourceSlice to allResources
2024-10-31 04:41:25 +00:00
Kubernetes Prow Robot
daef8c2419 Merge pull request #127266 from pohly/dra-admin-access-in-status
DRA API: AdminAccess in DeviceRequestAllocationResult + DRAAdminAccess feature gate
2024-10-30 03:41:25 +00:00
Kubernetes Prow Robot
988769933e Merge pull request #128307 from NoicFank/bugfix-scheduler-preemption
bugfix(scheduler): preemption picks wrong victim node with higher priority pod on it
2024-10-29 19:05:02 +00:00
Kubernetes Prow Robot
c5ccf59974 Merge pull request #128379 from pohly/dra-owners-wg-label
DRA: add wg/device-management label automatically
2024-10-29 15:24:57 +00:00
Kubernetes Prow Robot
d09d98e07c Merge pull request #128022 from googs1025/cleanup/ut/preemption
chore(scheduler): add unit test for framework preemption part
2024-10-29 13:16:55 +00:00
NoicFank
68f7a7c682 bugfix(scheduler): preemption picks wrong victim node with higher priority pod on it.
Introducing pdb to preemption had disrupted the orderliness of pods in the victims,
which would leads picking wrong victim node with higher priority pod on it.
2024-10-29 19:50:55 +08:00
Patrick Ohly
4419568259 DRA: treat AdminAccess as a new feature gated field
Using the "normal" logic for a feature gated field simplifies the
implementation of the feature gate.

There is one (entirely theoretic!) problem with updating from 1.31: if a claim
was allocated in 1.31 with admin access, the status field was not set because
it didn't exist yet. If a driver now follows the current definition of "unset =
off", then it will not grant admin access even though it should. This is
theoretic because drivers are starting to support admin access with 1.32, so
there shouldn't be any claim where this problem could occur.
2024-10-29 10:22:31 +01:00
Patrick Ohly
9a7e4ccab2 DRA admin access: add feature gate
The new DRAAdminAccess feature gate has the following effects:
- If disabled in the apiserver, the spec.devices.requests[*].adminAccess
  field gets cleared. Same in the status. In both cases the scenario
  that it was already set and a claim or claim template get updated
  is special: in those cases, the field is not cleared.

  Also, allocating a claim with admin access is allowed regardless of the
  feature gate and the field is not cleared. In practice, the scheduler
  will not do that.
- If disabled in the resource claim controller, creating ResourceClaims
  with the field set gets rejected. This prevents running workloads
  which depend on admin access.
- If disabled in the scheduler, claims with admin access don't get
  allocated. The effect is the same.

The alternative would have been to ignore the fields in claim controller and
scheduler. This is bad because a monitoring workload then runs, blocking
resources that probably were meant for production workloads.
2024-10-29 09:50:11 +01:00
Patrick Ohly
f3fef01e79 DRA API: AdminAccess in DeviceRequestAllocationResult
Drivers need to know that because admin access may also grant additional
permissions. The allocator needs to ignore such results when determining which
devices are considered as allocated.

In both cases it is conceptually cleaner to not rely on the content of the
ClaimSpec.
2024-10-29 09:50:07 +01:00
Patrick Ohly
9d1b0654e0 DRA: add wg/device-management label automatically
This makes PRs show up automatically in the WG's project
board (https://github.com/orgs/kubernetes/projects/95/views/1).
2024-10-28 16:36:04 +01:00
Kubernetes Prow Robot
25d6f76538 Merge pull request #128337 from torredil/fix-gce-cos-master-serial-5123
Add VolumeAttachment event registration to CSI volume limits plugin
2024-10-26 16:00:52 +01:00
Kensei Nakada
3e9d88b0ff fix: register ResourceSlice to allResources 2024-10-26 22:48:02 +09:00
torredil
fe1badf635 Add VolumeAttachment event registration to CSI volume limits plugin
Signed-off-by: torredil <torredil@amazon.com>
2024-10-26 13:41:28 +00:00
Kubernetes Prow Robot
aec2ea1877 Merge pull request #124609 from AxeZhan/refac
Move some helper functions from api/v1 to component-helpers
2024-10-25 17:26:52 +01:00
AxeZhan
2ffb568540 rename functions 2024-10-25 12:53:24 +08:00
Kubernetes Prow Robot
352056f09d Merge pull request #127757 from torredil/scheduler-bugfix-5123
scheduler: Improve CSILimits plugin accuracy by using VolumeAttachments
2024-10-23 18:12:52 +01:00
googs1025
e940b86e86 chore(scheduler): add unit test for framework preemption part 2024-10-23 15:23:11 +08:00
Kensei Nakada
089457e908 fix: check correctly if the event is scale down
Signed-off-by: Kensei Nakada <handbomusic@gmail.com>
2024-10-22 10:01:20 +09:00
Kubernetes Prow Robot
e39571591d Merge pull request #127478 from googs1025/scheduler/fine-grained
feature(scheduler): more fine-grained QHints for podtopologyspread plugin
2024-10-20 13:29:03 +01:00
googs1025
1edbd0b54f feature(scheduler): more fine-grained QHints for podtopologyspread plugin 2024-10-19 23:45:13 +08:00
torredil
56f2b192cc scheduler: Improve CSILimits plugin accuracy by using VolumeAttachments
Signed-off-by: torredil <torredil@amazon.com>
2024-10-18 19:02:14 +00:00
Kensei Nakada
83f9e4b6df cleanup: remove event list 2024-10-18 11:10:10 +10:00
Patrick Ohly
f84eb5ecf8 DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled
by it (claim.spec.controller, claim.status.deallocationRequested,
claim.status.allocation.controller, class.spec.suitableNodes), the
PodSchedulingContext type, and all code related to the feature.

The feature gets removed because there is no path towards beta and GA and DRA
with "structured parameters" should be able to replace it.
2024-10-16 23:09:50 +02:00
Kubernetes Prow Robot
95612e7b3b Merge pull request #127878 from AxeZhan/sidecar
[scheduler] calculate pod requests resources with sidecar containers
2024-10-10 17:54:19 +01:00
AxeZhan
b1f07bb36c add tests for scheduler 2024-10-10 15:53:19 +08:00
AxeZhan
6fbc3a618f using NonMissingContainerRequests 2024-10-10 15:53:07 +08:00
kerthcet
693d4fa156 Refactor the sample log
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-10-08 09:54:05 +08:00
Kubernetes Prow Robot
3de975b732 Merge pull request #125171 from YamasouA/ft/queuehint-csidriver
volumebinding: scheduler queueing hints - CSIDriver
2024-10-04 00:26:27 +01:00
YamasouA
6dbaa5660e fix test 2024-10-02 22:50:39 +09:00
googs1025
24a28766d4 chore(scheduler dra): improve dra queue hint unit test 2024-10-01 17:22:15 +08:00
Kubernetes Prow Robot
67cdc26214 Merge pull request #127497 from pohly/dra-scheduler-queueing-hints-fix
DRA scheduler: fix queuing hint support
2024-09-30 23:21:48 +01:00
Patrick Ohly
aee77bfc84 DRA scheduler: add special ActionType for ResourceClaim changes
Having a dedicated ActionType which only gets used when the scheduler itself
already detects some change in the list of generated ResourceClaims of a pod
avoids calling the DRA plugin for unrelated Pod changes.
2024-09-27 16:53:58 +02:00
Patrick Ohly
d425353c13 DRA scheduler: reduce verbosity of queuing hints
Other hints also only use V(5) or higher.
2024-09-27 08:15:33 +02:00
Patrick Ohly
4a265feb83 DRA scheduler: fix queuing hint support
d66f8f9 added that "plugins have to implement a QueueingHint for Pod/Update
event if the rejection from them could be resolved by updating unscheduled
Pods itself".

This applies to DRA because the name of a generated ResourceClaim must be
recorded in the pod status before the pod can be scheduled.
2024-09-27 08:15:33 +02:00
Kubernetes Prow Robot
960e3984b0 Merge pull request #127444 from dom4ha/fine-grained-qhints
Fine grain QueueHints for NodeAffinity plugin
2024-09-27 01:42:00 +01:00
dom4ha
c7db4bb450 Fine grain QueueHints for nodeaffinity plugin.
Skip queue on unrelated change that keeps pod schedulable when QueueHints are enabled.

Split add from QHints disabled case

Remove case when QHints are disabled

Remove two GHint alternatives in unit tests

more fine-grained Node QHint for NodeResourceFit plugin

Return early when updated Node causes unmatch

Revert "more fine-grained Node QHint for NodeResourceFit plugin"

This reverts commit dfbceb60e0c1c4e47748c12722d9ed6dba1a8366.

Add integration test for requeue of a pod previously rejected by NodeAffinity plugin when a suitable Node is added

Add integratin test for a Node update operation that does not trigger requeue in NodeAffinity plugin

Remove innacurrate comment

Apply review comments
2024-09-26 10:21:08 +00:00
dom4ha
903b1f7e28 more fine-grained Node QHint for NodeResourceFit plugin 2024-09-26 09:51:36 +00:00
YamasouA
84f45c81ca tweak 2024-09-25 22:37:05 +09:00
YamasouA
b4d9fe3957 delete framework.Add 2024-09-25 22:37:05 +09:00
YamasouA
b98634c2da volumebinding: scheduler queueing hints - CSIDriver
fix if condition

add test

add log

eliminate unnecessary args from log

fix Queue condition

check original pod status

fix return value when can scheduleable

fix tweak

fix testcase
2024-09-25 22:37:05 +09:00
Kubernetes Prow Robot
75214d11d5 Merge pull request #127428 from googs1025/scheduler/plugin
chore(scheduler): refactor import package ordering in scheduler
2024-09-25 11:40:07 +01:00
Kubernetes Prow Robot
211d67a511 Merge pull request #125398 from AxeZhan/pvAffinity
[scheduler] When the hostname and nodename of a node do not match, ensure that pods carrying PVs with nodeAffinity are scheduled correctly.
2024-09-23 21:22:02 +01:00
Kubernetes Prow Robot
a87215915f Merge pull request #127447 from sanposhiho/bug-topologyspread
fix(topologyspread): register UpdatePodTolerations when QHint is enabled
2024-09-22 06:59:58 +01:00
Kubernetes Prow Robot
04bba3c222 Merge pull request #127427 from sanposhiho/bug-nodeunsched
bug(nodeunschedulable): register missing Pod event for NodeUnschedulable plugin
2024-09-19 20:23:37 +01:00
Kensei Nakada
f457777fe8 chore: use DeepEqual from equality.Semantic instead of reflect 2024-09-19 11:22:12 +09:00
googs1025
86aee8cbc7 feature(scheduler): more fine-grained QHints for nodeunschedulable plugin 2024-09-19 10:05:06 +08:00
Kensei Nakada
9c3d4a6fe4 fix(topologyspread): register UpdatePodTolerations when QHint is enabled 2024-09-19 00:36:51 +09:00
googs1025
69831b0043 chore(scheduler): refactor import package ordering 2024-09-18 20:31:03 +08:00
Kensei Nakada
495981974e bug(nodeunschedulable): register missing Pod event for NodeUnschedulable plugin 2024-09-18 17:49:12 +09:00
Kensei Nakada
4a81a85449 chore(noderesourcefit): correct tests and clean up comments 2024-09-17 13:28:27 +09:00