Commit Graph

189 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
c34d140241
Merge pull request #86129 from damemi/remove-priority-code
Remove priority execution path from prioritizeNodes in generic_scheduler
2019-12-13 01:41:04 -08:00
Mike Dame
255ab6d2c3 Remove priority execution paths in favor of score plugins
Mainly affects core/generic_scheduler.go (and related tests). Removes the "prioritizers" field and related functions.
2019-12-12 19:30:44 -05:00
Abdullah Gharaibeh
2fdf1fa3c1 inter-pod affinity prefilter 2019-12-12 15:20:14 -05:00
Igor Zibarev
6350095d3c scheduler: make algorithm source an option
Changes scheduler.New so that algorithm source is moved from the
parameter to an option. The default algorithm source is source with the
DefaultProvider.
2019-11-13 10:22:29 +03:00
Aldo Culquicondor
6a98c93f3c Add MetadataProducerFactory for predicates
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-11-11 11:27:44 -05:00
draveness
715068312a feat(scheduler): convert InterPodAffinity to score plugin 2019-11-08 15:37:33 +08:00
draveness
3bb88356f4 feat(scheduler): remove deprecated pattern in scheduler priority 2019-11-07 22:43:07 +08:00
draveness
089e85e098 feat: convert selector spread priority to score plugin 2019-11-06 15:48:29 +08:00
Abdullah Gharaibeh
c6baa263a3 Update priorities to use SharedLister instead of using the snapshot directly 2019-10-29 16:22:00 -04:00
louisgong
70ca08ec89 filter plugin for cloud provider storage predicate 2019-10-21 23:56:23 +08:00
zouyee
04340eaa34 rename FilterPlugin NodeResources
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-20 12:51:16 +08:00
zouyee
408c9da2a6 LeastRequestedPriority/MostRequestedPriority/BalancedResourceAllocation as Score plugins
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-19 20:49:05 +08:00
draveness
00a12c787c feat: implement node unschedulable as a filter plugin 2019-10-19 17:29:25 +08:00
draveness
1163a1d51e feat: update taint nodes by condition to GA 2019-10-19 09:17:41 +08:00
lichuqiang
671f7690fe [migration phase 1] MatchInterPodAffinity as filter plugin 2019-10-18 16:26:34 +08:00
Kubernetes Prow Robot
d1a79f136b
Merge pull request #84054 from ahg-g/ahg-gp
GeneralPredicate as framework plugin config
2019-10-17 21:19:58 -07:00
Kubernetes Prow Robot
91050062f9
Merge pull request #83894 from notpad/feature/migration_nodevolumelimit
[migration phase 1] CSIMaxVolumeLimitChecker as filter plugin
2019-10-17 19:50:41 -07:00
Abdullah Gharaibeh
517116921b GeneralPredicate as plugin config 2019-10-17 11:13:57 -04:00
notpad
f06925b0ee [migration phase 1] CSIMaxVolumeLimitChecker as filter plugin 2019-10-17 22:04:02 +08:00
draveness
3d74da4d53 feat(scheduler): implement node affinity as score plugin 2019-10-17 17:02:10 +08:00
draveness
2d7044a556 feat(scheduler): implement NodePreferAvoidPods as score plugin 2019-10-14 21:21:24 +08:00
notpad
4ff7251026 [migration phase 1] VolumeZoneChecker as filter plugin 2019-10-14 07:45:40 +08:00
Kubernetes Prow Robot
dd5cb6426d
Merge pull request #83849 from draveness/feature/node-locality-as-score-plugin
feat: implement imagelocality as a score plugin
2019-10-13 06:36:35 -07:00
draveness
6f6618fc5d feat: implement imagelocality as a score plugin 2019-10-13 19:58:21 +08:00
Ahmad Diaa
4448a1cea9 move factory package to scheduler 2019-10-12 23:03:07 +02:00
notpad
9e426a6be1 [migration phase 1] NoDiskConflict as filter plugin 2019-10-12 08:00:44 +08:00
Kubernetes Prow Robot
77b86c4adf
Merge pull request #83764 from cofyc/fix83635
[migration phase 1] Implement CheckVolumeBinding as a filter plugin
2019-10-11 09:29:52 -07:00
Kubernetes Prow Robot
c980000176
Merge pull request #83663 from draveness/feature/add-shared-informers-factory
feat(scheduler): expose SharedInformerFactory to the framework handle
2019-10-11 09:29:40 -07:00
Yecheng Fu
e8795562f9 [migration phase 1] Implement CheckVolumeBinding as a filter plugin 2019-10-11 20:35:11 +08:00
draveness
ee4dec65b5 feat(scheduler): expose SharedInformerFactory to the framework handle 2019-10-11 10:23:21 +08:00
Abdullah Gharaibeh
7429b0fe86 Implemented taints and tolerations priority function as a Score plugin 2019-10-10 17:49:40 -04:00
Abdullah Gharaibeh
66386fdf49 Added the first predicate as a filter plugin: PodToleratesNodeTaints. 2019-10-05 08:43:17 -04:00
Abdullah Gharaibeh
30e7016ccf Refactor scheduler.New so that all framework-related parameters are passed as options 2019-10-03 11:39:59 -04:00
Wei Huang
cbdb4e3fdb
refactor scheduler extender related API
- move extender related API from pkg/scheduler/api to pkg/scheduler/apis/extender/v1

- alias extenderv1 to pkg/scheduler/apis/extender/v1

- use NodeScore and NodeScoreList in non-extender logic
2019-10-01 09:51:24 -07:00
Ahmad Diaa
bf6a70a1ce use scheduler.Option in initTestSchedulerWithOptions 2019-09-21 00:06:42 +02:00
Ahmad Diaa
995e741ef9 use scheduler.New in createConfiguratorArgsWithPodInformer 2019-09-21 00:06:41 +02:00
Abdullah Gharaibeh
3174d9c847 Added a noop plugin to make sure we have the dependencies worked out for the default registry of the scheduler framework. 2019-09-13 13:36:35 -04:00
Ahmad Diaa
61ab77ef7a use factory.Config fields directly in scheduler struct 2019-08-16 15:21:28 +02:00
Aldo Culquicondor
0ce1c95232 Store config args instead of config factory in test context
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-24 17:16:30 -04:00
Aldo Culquicondor
8e9af0185d Remove NodeLister from Scheduler Configurator
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-24 17:16:30 -04:00
Yassine TIJANI
08522f8e5a move scheduler to use v1beta1.events
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-07-12 11:39:01 +02:00
Fabio Bertinatto
00b0ab86af Update scheduler to use volume limits from CSINode 2019-06-25 16:30:54 +02:00
JieJhih Jhang
2cd5fc54a1 add scheduling framework configuration
update bazel build

fix get plugin config method

initialize only needed plugins

fix unit test

fix import duplicate package

update bazel

add docstrings

add weight field to plugin

add plugin to v1alpha1

add plugins at appropriate extension points

remove todo statement

fix import package file path

set plugin json schema

add plugin unit test to option

initial plugin in test integration

initialize only needed plugins

update bazel

rename func

change plugins needed logic

remove v1 alias

change the comment

fix alias shorter

remove blank line

change docstrings

fix map bool to struct

add some docstrings

add unreserve plugin

fix docstrings

move variable inside the for loop

make if else statement cleaner

remove plugin config from reserve plugin unit test

add plugin config and reduce unnecessary options for unit test

update bazel

fix race condition

fix permit plugin integration

change plugins to be pointer

change weight to int32

fix package alias

initial queue sort plugin

rename unreserve plugin

redesign plugin struct

update docstrings

check queue sort plugin amount

fix error message

fix condition

change plugin struct

add disabled plugin for unit test

fix docstrings

handle nil plugin set
2019-05-18 06:30:28 +08:00
Bobby (Babak) Salamat
77824f5135 Change scheduler constructors to receive a plugin registry. 2019-04-29 16:40:56 -07:00
Bobby (Babak) Salamat
404dc1ed79 Update scheduler framework plugins to align with the latest changes to the framework design 2019-04-29 16:40:56 -07:00
caiweidong
4c12c76a90 clean up unused code 2019-04-10 19:12:40 +08:00
danielqsj
49c4c6f76f add yaml test cases for scheduler creation 2019-03-29 11:29:09 +08:00
Mayank Kumar
e0a7d96632 Move informer event handlers to Scheduler 2019-01-29 17:53:20 -08:00
Guoliang Wang
3c24c99b08 Move users of factory.NewConfigFactory to scheduler.New 2019-01-09 06:40:30 +08:00
wangqingcan
b82a1d4600 Move predicate types from algorithm to predicates 2018-12-21 22:26:47 +08:00
yuexiao-wang
f3353c358d [scheduler cleanup phase 2]: Rename to
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:21:12 +08:00
Dr. Stefan Schimanski
d91feb6d18 kube-scheduler: move stopCh creation out of scheduler factory code
Enforces clean ownership of the channel.
2018-11-08 16:43:59 +01:00
Bobby (Babak) Salamat
f340f8baf8 Remove PDB and its event handlers from the scheduler cache 2018-09-26 14:22:21 -07:00
Kubernetes Submit Queue
ca43f007a3
Merge pull request #67731 from gnufied/fix-csi-attach-limit
Automatic merge from submit-queue (batch tested with PRs 68161, 68023, 67909, 67955, 67731). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix csi attach limit

Add support for volume limits for CSI.

xref: https://github.com/kubernetes/community/pull/2051

```release-note
Add support for volume attach limits for CSI volumes
```
2018-09-05 14:51:55 -07:00
Michelle Au
e124159990 Add scheduler option for bind timeout 2018-09-04 17:25:23 -07:00
Silvery Fu
3e438d7083 Add integration tests for image locality priority 2018-08-31 01:28:18 -07:00
Di Xu
7c68c585f4 use external KubeSchedulerConfiguration 2018-08-24 10:58:09 +08:00
Hemant Kumar
4b17a48def Implement support for updating volume limits
Create a new predicate to count CSI volumes
2018-08-22 19:36:00 -04:00
Guoliang Wang
761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
Dr. Stefan Schimanski
a3a52a8cf7 Revert "Revert "scheduler: align with ctrl-managers and apiservers, add https+auth in options""
This reverts commit 7b93d81a97.
2018-05-15 13:09:55 +02:00
Kubernetes Submit Queue
484f62a568
Merge pull request #63333 from deads2k/api-14-snip
Automatic merge from submit-queue (batch tested with PRs 63421, 63432, 63333). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update tests to be specific about the versions they are testing

When setting up tests, you want to rely on your own scheme.  This eliminates coupling to floating versions which gives unnecessary flexibility in most cases and prevents testing all the versions you need.

@liggitt  scrubs unnecessary deps.

```release-note
NONE
```
2018-05-04 10:52:10 -07:00
Wojciech Tyczynski
7b93d81a97
Revert "scheduler: align with ctrl-managers and apiservers, add https+auth in options" 2018-05-03 21:05:00 +02:00
David Eads
94e3d94d67 update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
Dr. Stefan Schimanski
abc8c98e35 scheduler: align plumbing with controller-manager and apiservers 2018-04-28 22:36:13 +02:00
Da K. Ma
2c10d15ae5 Do not schedule pod to the node under PID pressure.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-04-26 10:07:42 +08:00
Jonathan Basseri
02d657827c Test race condition in equivalence cache.
Add a unit test that invalidates equivalence cache during a scheduling
cycle. This exercises the bug described in
https://github.com/kubernetes/kubernetes/issues/62921
2018-04-25 10:18:40 -07:00
Bobby (Babak) Salamat
719a56fa67 Added test for scheduler informers 2018-04-23 11:07:53 -07:00
Kubernetes Submit Queue
bdd6ff40db
Merge pull request #62765 from wgliang/master.pob-name-conflict
Automatic merge from submit-queue (batch tested with PRs 61324, 62880, 62765). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

-Fix the name could cause a conflict if an object with the same name …

…is created in a different namespace

**What this PR does / why we need it**:
/kind bug

Using the name could cause a conflict if an object with the same name is created in a different namespace

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #
#62750

**Special notes for your reviewer**:
/assign @bsalamat 

**Release note**:
```
NONE
```
2018-04-20 17:23:23 -07:00
Guoliang Wang
df49a4b8c6 -Fix the name could cause a conflict if an object with the same name is created in a different namespace 2018-04-20 11:37:46 +08:00
Mikhail Mazurskiy
468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Harry Zhang
187c5bc91e Use initTest for integration to start scheduler
Fix import path

Fix configurator name
2018-03-31 00:28:08 -07:00
Harry Zhang
782a092e2e Use feature gate in integration
Clean up unused import
2018-03-31 00:28:08 -07:00
Yang Guo
f69eaa3b18 kube-scheduler: Use default predicates/prioritizers if policy config does not specify them 2018-02-06 13:01:33 -08:00
Jonathan Basseri
30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Michelle Au
01a8772111 Scheduler volume cache plumbing and predicate invalidation 2017-11-21 23:19:43 -08:00
Bobby (Babak) Salamat
8a17ae241d Add logic to account for pods nominated to run on nodes, but are not running yet.
Add tests for the new logic.
2017-11-20 22:17:05 -08:00
Dan Mace
efb2bb71cd Refactor scheduler config API
Refactor the kube-scheduler configuration API, command setup, and server
setup according to the guidelines established in #32215 and using the
kube-proxy refactor (#34727) as a model of a well factored component
adhering to said guidelines.

* Config API: clarify meaning and use of algorithm source by replacing
modality derived from bools and string emptiness checks with an explicit
AlgorithmSource type hierarchy.
* Config API: consolidate client connection config with common structs.
* Config API: split and simplify healthz/metrics server configuration.
* Config API: clarify leader election configuration.
* Config API: improve defaulting.
* CLI: deprecate all flags except `--config`.
* CLI: port all flags to new config API.
* CLI: refactor to match kube-proxy Cobra command style.
* Server: refactor away configurator.go to clarify application wiring.
* Server: refactor to more clearly separate wiring/setup from running.

Fixes #52428.
2017-11-07 09:41:39 -05:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Haoran Wang
4b185b4db9 update scheduler to use schedulerName selector 2017-10-24 13:31:38 +08:00
Kubernetes Submit Queue
6a444673b9 Merge pull request #53914 from bsalamat/pdb
Automatic merge from submit-queue (batch tested with PRs 53903, 53914, 54374). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add PodDisruptionBudget to scheduler cache.

**What this PR does / why we need it**:
This is the first step to add support for PodDisruptionBudget during preemption. This PR adds PDB to scheduler cache.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**: None

**Release note**:

```release-note
Add PodDisruptionBudget to scheduler cache.
```

ref/ #53913
2017-10-23 12:27:06 -07:00
Bobby (Babak) Salamat
9a5d058e5e Add PodDisruptionBudget to scheduler cache. 2017-10-20 23:22:02 -07:00
Kubernetes Submit Queue
2523e3ebae Merge pull request #53759 from anfernee/sched-test
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make scheduler integration test faster

Not to wait for 30 seconds for every negative test case. This commit
also organizes the test code to make it more readable.

It cuts the test time from 450s to 125s.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53302

**Special notes for your reviewer**:

**Release note**: 
```release-note
NONE
```
2017-10-19 16:50:58 -07:00
Dr. Stefan Schimanski
7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Yongkun Anfernee Gui
dc15e9cf90 Make scheduler integration test faster
Not to wait for 30 seconds for every negative test case. It cuts the
test time from 450s to 125s.
2017-10-17 10:32:46 -07:00
Bobby (Babak) Salamat
4a08dff168 Add pod eviction logic for scheduler preemption
Add Preempt to scheduler interface
Add preemption to the scheduling workflow
Minor changes to the scheduler integration test library
2017-09-07 15:31:55 -07:00
Bobby (Babak) Salamat
20931d7a68 Add specific types for PredicateMetadata and PredicateMetadataProducer 2017-08-30 10:32:09 -07:00
Klaus Ma
18dc690c7c Moved node condition filter into a predicates. 2017-08-26 09:08:07 +08:00
Klaus Ma
df3a699069 Revert #50362. 2017-08-19 10:24:50 +08:00
Klaus Ma
78e078390f Renamed to RegisterMandatoryFitPredicate. 2017-08-12 07:28:40 +08:00
Klaus Ma
e9738c0ce6 Moved node condition filter into a predicates. 2017-08-11 16:43:33 +08:00
supereagle
edce96c5b6 use the core client with version 2017-07-26 19:16:02 +08:00
supereagle
adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Bobby (Babak) Salamat
2612422a7f Addressed reviewer comments 2017-07-20 14:59:18 -07:00
Bobby (Babak) Salamat
684ac3f665 Added utility functions for scheduler integration testing and cleaned up
scheduler_test.go
2017-07-20 14:40:31 -07:00
Harry Zhang
0e8517875e Update factory.go informers to update equivalence cache
Fix tombstone

Add e2e to verify equivalence cache

Addressing nits in factory,go and e2e

Update build files
2017-07-18 23:55:01 +08:00
Jacob Simpson
8bcbbd4d08 Migrate api.Registry to testapi.Groups in tests. 2017-07-17 15:05:38 -07:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00