Commit Graph

133 Commits

Author SHA1 Message Date
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
Kubernetes Submit Queue
6274590518
Merge pull request #66656 from wackxu/fixappversion
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>.

 use apps/v1 version for scheduler

/kind cleanup

**Release note**:

```release-note
NONE
```
2018-08-11 23:25:33 -07:00
tanshanshan
98880edbf3 add ns for pod in integration test 2018-08-11 11:53:14 +08:00
Kubernetes Submit Queue
f4d8220df5
Merge pull request #65616 from cofyc/fix56163
Automatic merge from submit-queue (batch tested with PRs 65570, 65616). 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>.

Retry scheduling on StorageClass events

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

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

**Special notes for your reviewer**:

I have taken over #60006.
It's hard to test in e2e, because we cannot know reschedule of pod is triggered by which event (periodically service/node events will move pods to active queue too). ~~I'll add integration tests for this functionality after [this PR](https://github.com/kubernetes/kubernetes/pull/65296) get merged.~~ (already added)

**Release note**:

```release-note
NONE
```
2018-07-31 19:18:00 -07:00
xushiwei 00425595
fed8572745 use apps/v1 version for scheduler 2018-07-26 17:37:29 +08:00
Wei Huang
243c7ff11b test(scheduler): add more integration tests for TaintNodesByCondition
- refactor test cases to table driven testing style
- more scenarios are covered for TaintNodesByCondition
- update bazel stuff
2018-07-25 16:09:02 -07:00
Yecheng Fu
c868b5bc88 Test rescheduling on various events.
- Add resyncPeriod parameter for setupCluster to make resync period of
scheduler configurable.
- Add test case for static provisioning and delay binding storage class.
Move pods into active queue on PV add/update events.
- Add a stress test with scheduler resync to detect possible race
conditions.
2018-07-20 09:54:46 +08:00
Bobby (Babak) Salamat
37e77f148d Fix PDB preemption tests. 2018-05-16 17:18:46 -07:00
Da K. Ma
5257dfcd15 Cleanup Pods in TestNominatedNodeCleanUp.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-05-07 15:15:06 +08: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
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
Bobby (Babak) Salamat
a073dfdbd9 Fix scheduler Pod informers to receive events when pods are scheduled by other schedulers. 2018-04-23 11:07:53 -07:00
Harry Zhang
d36fc30233 Add integration test for disable preemption 2018-04-18 10:41:23 -07:00
Harry Zhang
4f0bd4121e Disable pod preemption by config 2018-04-12 21:11:51 -07:00
Manjunath A Kumatagi
1bb810e749 Use pause manifest image 2018-04-06 11:00:50 +05:30
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
Michelle Au
7167c47411 Add more test cases for volume binding in the scheduler 2018-02-23 15:28:34 -08:00
hangaoshuai
7d6b721044 remove unused function printIndentedJson and printAllPods in test/integration/scheduler 2018-02-11 11:42:31 +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
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
Kevin
f76ca1fb16 update clientset.Core() to clientset.CoreV1() in test 2017-08-14 16:53:55 +08:00
vikaschoudhary16
189129c71d Add inter-pod-affinity integration tests and remove corresponding e2e tests
Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2017-07-26 23:24:28 -04: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
238cb5bfc1 Converted a couple of e2e priority tests to integration tests. 2017-07-20 14:40:32 -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