Commit Graph

172 Commits

Author SHA1 Message Date
Adhityaa Chandrasekar
1b223b861a scheduler: run Unreserve if Reserve fails
If a reserve plugin's Reserve method returns an error, there could be
previously allocated resources from successfully completed reserve
plugins that must be unallocated by the corresponding Unreserve
operation. Since Unreserve operations are idempotent, this patch runs
the Unreserve operation of ALL reserve plugins when a Reserve operation
fails.
2020-06-26 20:41:33 +00:00
Adhityaa Chandrasekar
ec83143342 scheduler: merge Reserve and Unreserve plugins
Previously, separate interfaces were defined for Reserve and Unreserve
plugins. However, in nearly all cases, a plugin that allocates a
resource using Reserve will likely want to register itself for Unreserve
as well in order to free the allocated resource at the end of a failed
scheduling/binding cycle. Having separate plugins for Reserve and
Unreserve also adds unnecessary config toil. To that end, this patch
aims to merge the two plugins into a single interface called a
ReservePlugin that requires implementing both the Reserve and Unreserve
methods.
2020-06-24 21:10:35 +00:00
Wei Huang
d99cc01646
Register and enable defaultpreemption plugin
- Enable defaultpreemption as a PostFilter plugin
- Remote legacy hard-coded preemption logic
2020-06-22 17:22:27 -07:00
Ali Farah
a22e115a0e Split scheduler framework implementation into new runtime package 2020-06-22 00:23:43 +10:00
Wei Huang
7dfabd7af6
Expose EventRecorder to scheduler FrameworkHandle 2020-06-10 18:27:21 -07:00
Wei Huang
69b9ba6012
Introduce PostFilter extension point 2020-06-05 13:23:45 -07:00
Kubernetes Prow Robot
c682b313d9
Merge pull request #91420 from pancernik/scheduler-config-v1beta1
Promote kubescheduler.config.k8s.io to v1betav1
2020-05-28 12:24:39 -07:00
Kubernetes Prow Robot
5217fa2299
Merge pull request #91462 from lo24/fwk-typo
fix typo in scheduler framework
2020-05-26 16:49:05 -07:00
Wei Huang
59eff29d22
- Add Extenders() and PluginsRunner interface to PreemptHandle
- Make some private functions stateless
  - make addNominatedPods() not dependent on genericScheduler
  - make addNominatedPods() not dependent on genericScheduler
  - make selectVictimsOnNode() not dependent on genericScheduler
  - make selectNodesForPreemption() not dependent on genericScheduler
2020-05-26 10:00:45 -07:00
lo24
4caae61f03 fix typo in scheduler framework 2020-05-26 16:00:22 +00:00
Rafal Wicha
852442c0ff Promote kubescheduler.config.k8s.io to v1betav1 2020-05-25 22:25:57 +01:00
Yecheng Fu
0a3d55f2e0 Add versioned counterparts for VolumeBindingArgs 2020-05-22 09:30:52 +08:00
Kubernetes Prow Robot
d871ab9690
Merge pull request #91278 from chendave/testcase
scheduler: Expand testcases to cover more plugin defaults
2020-05-20 19:41:39 -07:00
Kubernetes Prow Robot
f7a6e9e2f1
Merge pull request #91175 from Huang-Wei/volume-binding-leftover
Cleanup volume binding leftover
2020-05-20 19:41:10 -07:00
Wei Huang
f4b726237a
Add function NominatedPodsForNode to PodNominator interface.
- replace SchedulingQueue with PodNominator in genericScheduler.
2020-05-20 14:05:18 -07:00
Wei Huang
b6d5a3328a
cleanup volume binding leftover 2020-05-20 10:30:22 -07:00
Dave Chen
c74a5d4fe2 scheduler: Expand testcases to cover more plugin defaults
Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-05-20 12:37:06 +08:00
Kubernetes Prow Robot
4310732c55
Merge pull request #91102 from chendave/capacity_ratio
Move `RequestedToCapacityRatio` Args defaults to versioned packages
2020-05-19 20:35:20 -07:00
Wei Huang
bd184035c4
Extract logic related with scheduler nominatedPods to an interface
- rename `UpdateNominatedPodForNode` to `AddNominatedPod`
- promote `update` to `UpdateNominatedPod`
- anonymous lock in nominatedMap
- pass PodNominator as an option to NewFramework
2020-05-18 10:29:08 -07:00
Dave Chen
838a0a8c03 Move RequestedToCapacityRatio Args defaults to versioned packages
Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-05-18 14:19:39 +08:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Abdullah Gharaibeh
087839daf7 Added pre-processed preferred affinity terms to scheduler's PodInfo type. 2020-05-15 09:00:56 -04:00
Kubernetes Prow Robot
c453be845a
Merge pull request #91062 from ahg-g/ahg-affinity1
Added pre-processed required affinity terms to scheduler's PodInfo type.
2020-05-15 02:49:07 -07:00
Abdullah Gharaibeh
5e0211c72d Added pre-processed required affinity terms to scheduler's PodInfo type. 2020-05-14 10:30:42 -04:00
Wei Huang
eb17b7559c
move SchedulerExtender interface to pkg/scheduler/framework/v1alpha1 2020-05-13 13:09:13 -07:00
Wei Huang
e4f878ea3a
cleanup: use string instead of v1.Node as key of nodeToVictims 2020-05-13 13:08:20 -07:00
Aldo Culquicondor
2935480cc8 Move Plugin Args defaults to versioned packages
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-05-06 18:00:23 -04:00
Wei Huang
92ba2a4e09
Simplify status handling of scheduler RunFilterPlugins 2020-04-24 12:16:42 -07:00
Kubernetes Prow Robot
b850b5ce2e
Merge pull request #89222 from fengzixu/master
bugfix: initcontainer is also taken into account when calculating resource requests
2020-04-23 00:45:44 -07:00
Abdullah Gharaibeh
57585640e8 change scheduler's framework PodLister to PodInfoLister 2020-04-22 19:25:27 -04:00
fengzixu
d54822d193 bugfix: initcontainer wasn't considered when calculate resource request 2020-04-23 02:08:33 +09:00
Abdullah Gharaibeh
a151682887 Split scheduler's PodInfo into two types, PodInfo and PodQueueInfo 2020-04-21 21:45:20 -04:00
Kubernetes Prow Robot
b35fdbc037
Merge pull request #89904 from alculquicondor/raw-extension-plugin-args
Use RawExtension and Object for external and internal, respectively, scheduling plugin args
2020-04-15 15:22:59 -07:00
Aldo Culquicondor
ce05382b58 Use RawExtension and Object for external and internal scheduling plugin args, respectively
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-04-14 13:44:42 -04:00
Abdullah Gharaibeh
bed9b2f23b Cleanup obsolete NodeInfo methods 2020-04-12 18:13:46 -04:00
Kubernetes Prow Robot
de5508839d
Merge pull request #90037 from angao/redundant
remove redundant code
2020-04-11 03:29:47 -07:00
Wen Gao
65b43e5d10 remove redundant code 2020-04-10 10:59:30 +08:00
Abdullah Gharaibeh
2c51c13620 Scheduler NodeInfo cleanup 2020-04-09 19:03:51 -04:00
Abdullah Gharaibeh
b8ddd00312 scheduler's NodeInfo tracks PodInfos instead of Pods 2020-04-08 17:53:20 -04:00
Abdullah Gharaibeh
a5d8172715 move nodeinfo type to framework pkg 2020-04-07 10:25:24 -04:00
Harsh Singh
015d06bf41 Internal channels for scheduler 2020-04-04 02:30:16 +05:30
Abdullah Gharaibeh
ed3fe054df move scheduler nodeinfo to pkg/scheduler/types 2020-03-31 21:02:09 -04:00
Aldo Culquicondor
e902e70d0d Use sqrt(n) chunk size in pod affinity and core scheduler 2020-03-24 10:29:59 -04:00
Kubernetes Prow Robot
ad2a1054b0
Merge pull request #88717 from mosesyou/dev-boris
Add unit test TestListPlugins for the scheduler
2020-03-17 16:21:55 -07:00
mosesyou
d874275fb7 Add unit test TestListPlugins for the scheduler 2020-03-09 15:33:42 +08:00
Aldo Culquicondor
13fa48e592 Disallow duplicate PluginConfig in framework creation
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-03-05 14:51:41 -05:00
louisgong
c6b94e4606 refactor volume binder 2020-02-29 12:03:39 +08:00
skilxn-go
e8245d6fd9 Add unit test for framework plugin configuration 2020-02-26 23:57:07 +08:00
Mateusz
d221d82eaf run permit plugins in the scheduling cycle 2020-02-18 10:04:23 -08:00