k3s/pkg/scheduler
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
..
algorithm Merge pull request #67642 from tizhou86/newUnitTest7 2018-08-27 06:14:14 -07:00
algorithmprovider Move image locality to default priority functions 2018-08-31 00:58:09 -07:00
api Add a scheduler config argument to set the percentage of nodes to score 2018-08-17 11:18:51 -07:00
apis/config auto-generated 2018-08-24 10:58:09 +08:00
cache Fix cloning image states from node info 2018-08-31 00:58:29 -07:00
core Merge pull request #67760 from houjun41544/20180823 2018-08-26 19:39:06 -07:00
factory Fix golint error under scheduler/factory. 2018-08-23 17:24:32 +08:00
metrics Add metrics to equivalence cache. 2018-08-15 15:51:13 -07:00
testing Add NodeTree to the scheduler cache 2018-08-17 09:56:51 -07:00
util Add unit test cases for scheduler/util. 2018-08-23 15:26:27 +08:00
volumebinder Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
BUILD auto-generated 2018-08-24 10:58:09 +08:00
OWNERS Update OWNERS labels for cluster-lifecycle and scheduling 2018-04-05 16:25:04 -05:00
scheduler.go Wait for Scheduler cache empty. 2018-08-31 19:42:10 +08:00
scheduler_test.go Add a scheduler config argument to set the percentage of nodes to score 2018-08-17 11:18:51 -07:00
testutil.go Delete dead code in pkg/scheduler. 2018-08-15 17:14:38 -07:00