Commit Graph

85 Commits

Author SHA1 Message Date
danielqsj
6596a14d39 add missing alias of api errors under test 2019-12-26 17:29:38 +08: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
Wei Huang
c649666b4a
manual API changes and code refactoring
- add Policy API to pkg/scheduler/apis/config and staging/src/k8s.io/kube-scheduler/config/v1
- dual-register Policy as apiGroup "v1" and "kubescheduler.config.k8s.io
- move/merge pkg/scheduler/api to pkg/scheduler/apis/config/...
- alias schedulerapi to pkg/scheduler/apis/config
- alias legacyapi to pkg/scheduler/api
- eliminate latest.Codec; use scheme.Codecs instead
- unit tests to verify Policy YAML with version "v1" or "kubescheduler.config.k8s.io/v1" can be loaded properly
- update api/api-rules/violation_exceptions.list
2019-11-01 14:24:36 -07:00
draveness
1163a1d51e feat: update taint nodes by condition to GA 2019-10-19 09:17:41 +08:00
Kubernetes Prow Robot
534051acec
Merge pull request #84036 from Huang-Wei/tbe-int-test-issue
Ensure TaintBasedEviction int test not rely on TaintNodeByConditions
2019-10-17 05:12:50 -07:00
Wei Huang
fbcc3c183a
Ensure TaintBasedEviction int test not rely on TaintNodeByConditions 2019-10-17 01:25:12 -07:00
draveness
47a6c5b693 feat(scheduler): use context in the scheduler package
+ Use context instead of stopCh
+ Add context to the scheduling framework interface
2019-10-17 09:03:55 +08:00
Ahmad Diaa
4448a1cea9 move factory package to scheduler 2019-10-12 23:03:07 +02:00
draveness
ee4dec65b5 feat(scheduler): expose SharedInformerFactory to the framework handle 2019-10-11 10:23:21 +08: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
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
Kubernetes Prow Robot
c7619bd770
Merge pull request #80824 from damemi/preemption-e2e-to-integration
Move PodPriorityResolution e2e to integration
2019-09-20 12:27:25 -07:00
Mike Dame
ca18b48151 Move PodPriorityResolution e2e to integration 2019-09-19 20:25:03 -04: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
Kubernetes Prow Robot
927f45191e
Merge pull request #81527 from yastij/move-controller-util
move WaitForCacheSync to the sharedInformer package
2019-08-27 00:52:54 -07:00
Yassine TIJANI
7e4c3096fe move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-22 16:13:41 +01:00
Ahmad Diaa
61ab77ef7a use factory.Config fields directly in scheduler struct 2019-08-16 15:21:28 +02: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
Wei Huang
caab8b74ba
EvenPodsSpread: integration test 2019-08-01 10:42:27 -07: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
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
Abdullah Gharaibeh
c54c4d1962 Score plugin for the scheduling framework. 2019-07-16 09:38:37 -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
dfc78caa21 Add missing CSINodeInformer when creating ConfigFactoryArgs 2019-06-28 13:32:03 +02:00
Fabio Bertinatto
00b0ab86af Update scheduler to use volume limits from CSINode 2019-06-25 16:30:54 +02:00
draveness
ca6003bc75 feat: cleanup PodPriority features gate 2019-06-23 11:57:24 +08:00
Morten Torkildsen
f1883c9e8c Support scale subresource for PDBs (#76294)
* Support scale subresource for PDBs

* Check group in finder functions

* Small fixes and more tests
2019-05-23 22:24:17 -07: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
404dc1ed79 Update scheduler framework plugins to align with the latest changes to the framework design 2019-04-29 16:40:56 -07:00
Davanum Srinivas
7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
caiweidong
4c12c76a90 clean up unused code 2019-04-10 19:12:40 +08:00
Eric Walker
75df4dc04c Remove test/integration/* from hack/.golint_failures 2019-02-28 19:52:39 -07: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
Bobby (Babak) Salamat
5581497846 Add a test that reproduces the race condition between setting nominated node name of a pod and scheduling cycle of other pods 2018-12-27 02:15:59 -08:00
Weibin Lin
842bd1e1ec update deployment, daemonset, replicaset, statefulset to apps/v1 2018-12-19 10:46:45 -05: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
Bobby (Babak) Salamat
679d88c1a0 Add 'reserve' and 'prebind' plugin tests 2018-11-30 16:09:43 -08:00
Bobby (Babak) Salamat
1b8e1d9ed8 Disable equivalence cache by default in the scheduler integration tests 2018-11-13 11:23:19 -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
wangqingcan
a74fd15e62 create a new scheduler constructor 2018-10-10 17:10:10 +08:00
Bobby (Babak) Salamat
f340f8baf8 Remove PDB and its event handlers from the scheduler cache 2018-09-26 14:22:21 -07:00
k8s-ci-robot
2fb9fc2400
Merge pull request #67230 from tanshanshan/schedulertest810
add ns for pod in scheduler integration test
2018-09-24 13:19:55 -07:00
Michelle Au
e124159990 Add scheduler option for bind timeout 2018-09-04 17:25:23 -07:00
Michelle Au
8091c7975b Integration and e2e tests 2018-09-04 16:30:14 -07:00
Kubernetes Submit Queue
da25aaa39e
Merge pull request #68081 from silveryfu/image-locality-tests-new
Automatic merge from submit-queue (batch tested with PRs 63437, 68081). 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.

Enable ImageLocalityPriority by default with integration tests

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

This PR is a follow-up to [#63842](https://github.com/kubernetes/kubernetes/issues/63842). It moves the ImageLocalityPriority function to default priority functions of the default algorithm provider and adds integration tests for the updated scheduling policy.

- Compared to [#64662](https://github.com/kubernetes/kubernetes/pull/64662), this PR does note provide e2e test due to concerns about a large image may add too much overhead to the testing infrastructure and pipeline. We should add e2e tests in the future with the use of large enough image(s) in following PRs. 

- Compared to [#64662](https://github.com/kubernetes/kubernetes/pull/64662), this PR simplifies the code changes and keeps code changes under test/integration/scheduler/.

- The PR contains a bug fix for [#65745](https://github.com/kubernetes/kubernetes/pull/65745) - caught by the integration test - where the image states are not properly cloned to the scheduler's cachedNodeInfoMap. We might split this fix into a separate PR.

The integration test covers what follows: a pod requiring a large image (~= 3GB) is submitted to the cluster and there is a single node in the cluster has the same large image; the pod should get scheduled to that node. We might also consider whether more scenarios are desired.

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

Kindly ping @resouer and @bsalamat 

**Release note**:

```release-note
None
```
2018-09-01 16:58:33 -07:00
Klaus Ma
26142e614c Wait for Scheduler cache empty.
Signed-off-by: Klaus Ma <klaus1982.cn@gmail.com>
2018-08-31 19:42:10 +08:00
Silvery Fu
3e438d7083 Add integration tests for image locality priority 2018-08-31 01:28:18 -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