Commit Graph

125 Commits

Author SHA1 Message Date
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
Mark Janssen
345e528c86 Fix staticcheck failures for pkg/scheduler/... 2019-09-23 22:49:59 +02:00
Ahmad Diaa
009ffaf803 validate scheduler policy instead of the decoded policy in compatibility_test 2019-09-20 21:42:12 +02:00
Kubernetes Prow Robot
82f5531df3
Merge pull request #82119 from wgliang/fixbug/fix-scheudle-function-context
Take the context as the first argument of Schedule
2019-09-12 11:46:28 -07:00
Guoliang Wang
d84a75c140 Fix filter plugins are not been called during preemption 2019-09-06 09:59:01 +08:00
Guoliang Wang
008f4e2ddc Take the context as the first argument of Schedule 2019-08-29 17:47:49 +08:00
Ahmad Diaa
61ab77ef7a use factory.Config fields directly in scheduler struct 2019-08-16 15:21:28 +02:00
Shintaro Murakami
11f043c784 Remove algorithm.NodeLister from scheduler interface
Will fixup
2019-08-13 10:30:30 +09:00
Kubernetes Prow Robot
1a01d10f5f
Merge pull request #80590 from alculquicondor/refactor/configurator-pod
Remove Configurator interface
2019-08-06 21:05:31 -07:00
draveness
feb64858aa feat: implement "post-filter" extension point for scheduling framework 2019-08-02 10:12:54 +08:00
Aldo Culquicondor
d935b1054c Remove Configurator interface
The Configurator has been used as a holder for listers that tests need,
which is not its purpose. By making the tests obtain listers from more
appropriate places, such as informers, there is no need for various
accessors to the Configurator.

Also, FakeConfigurator is not being used anymore, so there's no need for
an interface instead of a plain pointer.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-08-01 08:36:38 -04:00
Aldo Culquicondor
f58abdf966 Use scheduler cache in affinity priority functions
Make the cache implement NodeLister and expose it to the priority
functions. This way, the priority functions make use of a single cache,
the scheduler's, instead of mixing it with the lister's caches.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-23 22:10:49 -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
Abdullah Gharaibeh
a61a437ef2 prefilter extension point implementation. 2019-06-10 17:01:50 -04:00
wangqingcan
52f3380ef3 change preempting to PreemptionPolicy 2019-05-31 12:42:05 +08:00
wangqingcan
5c9438c691 non-preempting-priorityclass
Co-authored-by: Vallery Lancey <vallery@zeitgeistlabs.io>
Co-authored-by: Tan shanshan <tan.shanshan@zte.com.cn>
2019-05-31 12:37:07 +08: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
draveness
d60bccc6a4 feat: implement "queue-sort" extension point for scheduling framework 2019-05-15 09:40:15 +08:00
Kubernetes Prow Robot
ea5be337dd
Merge pull request #76698 from WanLinghao/scheduler_duplicate_import
Remove duplicate package import
2019-05-06 02:19:36 -07:00
Yecheng Fu
214ea1a9d3 Update scheduler to use new volume scheduling library
To fix scheme issue, use k8s.io/client-go/kubernetes/scheme instead of
legacyscheme.
2019-05-02 14:57:47 +08: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
WanLinghao
baf371a188 Remove duplicate package import 2019-04-17 16:37:36 +08:00
danielqsj
412adb8ca9 add unit test for initPolicyFromFile 2019-03-31 21:23:24 +08:00
Wei Huang
49346c1e04
shorten scheduler package alias for better readability
- schedulerinternalcache -> internalcache
2019-03-21 18:14:19 -07:00
Bobby (Babak) Salamat
a20a243380 Add a PVC to pod spec in volume binding tests to ensure that the predicate runs 2019-02-02 15:01:55 -08:00
Mayank Kumar
e0a7d96632 Move informer event handlers to Scheduler 2019-01-29 17:53:20 -08:00
Kubernetes Prow Robot
14b2014c4a
Merge pull request #72079 from sonasingh46/cleanup
refactor(scheduler): Move priority types to priorities package
2019-01-15 09:24:15 -08:00
Kubernetes Prow Robot
2c8b571d57
Merge pull request #71875 from wgliang/cleanup/remove-newfrom-functions
Move users of `factory.NewConfigFactory` to `scheduler.New`
2019-01-09 13:55:51 -08:00
Guoliang Wang
3c24c99b08 Move users of factory.NewConfigFactory to scheduler.New 2019-01-09 06:40:30 +08:00
sonasingh46
1fe7ce21bc refactor(scheduler): Move priority types to priorities package
This moves the priority types from the algorithm package
to priorities package.
Idea is to move the type to the packages where it is
implemented. This will ease the future refactor process.
2019-01-09 02:39:11 +05:30
Kubernetes Prow Robot
1c2624effc
Merge pull request #71926 from wgliang/feature/modify-scheduler-result-and-add-log
[scheduler] Modify the scheduling result struct and improve logging f…
2019-01-03 14:37:50 -08:00
Guoliang Wang
3e69638772 [scheduler] Modify the scheduling result struct and improve logging for successful binding 2019-01-03 11:00:35 +08:00
Jordan Liggitt
73dcfe12da Stop checking VolumeScheduling feature gate 2018-12-27 17:45:45 -05:00
wangqingcan
b82a1d4600 Move predicate types from algorithm to predicates 2018-12-21 22:26:47 +08:00
wangqingcan
1081e919e3 Eclass Task 1: clean up old equiv class code
Co-authored-by: Harry Zhang <resouer@gmail.com>
Co-authored-by: Wang Qingcan <wangqingcan@baidu.com>
2018-12-17 17:05:49 -08:00
Jonathan Basseri
8e25361320 Move ScheduleAlgorithm to the core package.
This moves the type `ScheduleAlgorithm` from `pkg/scheduler/algorithm`
to `pkg/scheduler/core`. The reason for this move is to fix our import
dependency graph and allow predicate & priority types to be moved into
their appropriate packages.

The new location makes sense because `core` is the only package that
exports an implementation of this type.
2018-12-13 15:08:38 -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
Bobby (Babak) Salamat
f74b30868c Add plugin invocation for 'reserve' and 'prebind' plugins to the scheduler. 2018-11-30 16:03:47 -08:00
Jordan Liggitt
de8bf9b63d fix scheduler and kubelet unit tests leaking feature flag changes 2018-11-16 10:52:53 -05:00
Jordan Liggitt
358c092abe fix storage unit tests leaking feature flag changes 2018-11-16 10:52:52 -05: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
He Xiaoxi
12634bf136 Refactor scheduler_test.go to use Clientset
Signed-off-by: He Xiaoxi <xxhe@alauda.io>
2018-10-29 09:51:07 +08:00
wangqingcan
608911d5ac add test for new constructor 2018-10-10 17:15:10 +08:00
wangqingcan
a74fd15e62 create a new scheduler constructor 2018-10-10 17:10:10 +08:00
Guoliang Wang
558e1960b8 [scheduler cleanup phase 1]: Move FakeCache to pkg/scheduler/internal/cache/fake 2018-10-06 23:58:53 +08:00
Guoliang Wang
187e2e01c9 Move scheduler cache interface and implementation to pkg/scheduler/internal/cache 2018-10-06 20:48:59 +08:00
Bobby (Babak) Salamat
f340f8baf8 Remove PDB and its event handlers from the scheduler cache 2018-09-26 14:22:21 -07:00
Michelle Au
01d83fa104 Scheduler changes to assume volume and pod together, and then bind
volume and pod asynchronously afterwards. This will also make it easier
to migrate to the scheduler framework.
2018-09-04 16:30:14 -07:00
Bobby (Babak) Salamat
abb70aee98 Add a scheduler config argument to set the percentage of nodes to score 2018-08-17 11:18:51 -07:00
John Calabrese
7735dd6843 use subtest for table units
apply consistent format to name strings

  - #63661 (comment)
  - #63661 (comment)

inline subtest logic

  https://github.com/kubernetes/kubernetes/pull/63661/files#r192540031

remove duplicate messaging in subtest errors
2018-06-08 10:52:28 -04:00
Guoliang Wang
761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
Avesh Agarwal
ea057eb9b5 Fix TestSchedulerWithVolumeBinding to avoid setting predicate ordering.
It is causing data race condition as predicate ordering is changing global
variable predicatesOrdering. Infact this test does not require any special
predicate order and should work on default predicate ordering as far as
VolumeScheduling feature is enabled.
2018-05-18 14:19:26 -04:00
ceshihao
56b3f2f409 move pkg/scheduler/util/testutil.go to pkg/scheduler/testing 2018-04-28 02:36:04 +00:00
Harry Zhang
4f0bd4121e Disable pod preemption by config 2018-04-12 21:11:51 -07:00
Yongkun Anfernee Gui
5bad68ac58 Use pod UID as cache key instead of namespace/name
UID uniquely identifies pods across lifecycles, while namespace/name
could be 2 different pods across lifecycles. This could result in
tricky scheduler bugs.

Fixes #60966
2018-03-13 10:25:37 -07:00
Yang Guo
8d880506fe Support cluster-level extended resources in kubelet and kube-scheduler
Co-authored-by: Yang Guo <ygg@google.com>
Co-authored-by: Chun Chen <chenchun.feed@gmail.com>
2018-02-27 17:25:30 -08:00
Michelle Au
c7884550b2 Add VolumeNodeAffinity to PersistentVolumeSpec 2018-02-16 17:54:10 -08:00
Kubernetes Submit Queue
5a4b160cf0
Merge pull request #59281 from bsalamat/nominated_node
Automatic merge from submit-queue (batch tested with PRs 59010, 59212, 59281, 59014, 59297). 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>.

Replace nominateNodeName annotation with PodStatus.NominatedNodeName

**What this PR does / why we need it**:
Replaces nominateNodeName annotation with PodStatus.NominatedNodeName in scheudler's logic. We don't expect any logic/behavior changes.

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

ref #57471

/sig scheduling
cc: @k82cn @aveshagarwal @resouer
2018-02-07 15:27:43 -08:00
Bobby (Babak) Salamat
bfd950e471 Replace nominateNodeName annotation with PodStatus.NominatedNodeName in scheudler logic 2018-02-02 13:06:33 -08:00
tanshanshan
c389e3cec7 Make predicate errors more human readable 2018-02-01 10:22:53 +08:00
junxu
5deb5f4913 Rename func name according TODO 2018-01-15 00:08:59 -05:00
Wang Guoliang
b8526cd077 -Add scheduler optimization options, short circuit all predicates if one predicate fails 2018-01-13 18:18:55 +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
hurf
6203ce9f85 Move pkg/scheduler to plugin/pkg/scheduler
As the TODO in plugin/pkg/scheduler/scheduler.go described:

move everything from pkg/scheduler into this package. Remove
references from registry.
2015-05-13 14:03:25 +08:00
Eric Paris
6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Kris Rousey
81497f3ed2 Changing the scheduler package to use *api.Pod instead of api.Pod to
avoid unnecessary shallow copies. The change rippled through a lot of
code.
2015-04-17 13:34:31 -07:00
Piotr Szczesniak
5c6439d449 Removed PodStatus.Host
Fixes #6165
2015-04-02 16:38:45 +02:00
Tim Hockin
ea548b8260 Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-27 21:05:59 -08:00
Daniel Smith
650f6cb826 Revert "Multi-port Endpoints" 2015-02-23 13:53:21 -08:00
Tim Hockin
e0fd83096c Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-21 22:26:38 -08:00
markturansky
8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Tim Hockin
0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
Daniel Smith
0760e9bc2c Fix up usage and tests, split into multiple files.
Doing this in multiple commits in an attempt to preserve the file movement history.
2014-06-29 12:35:43 -07:00
Daniel Smith
21e63cf75a Move scheduler to own package. 2014-06-29 12:30:49 -07:00