junxu
5deb5f4913
Rename func name according TODO
2018-01-15 00:08:59 -05:00
Kubernetes Submit Queue
5911f87dad
Merge pull request #56926 from wgliang/master
...
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>.
-Add scheduler optimization options, short circuit all predicates if …
…one predicate fails
Signed-off-by: Wang Guoliang <iamwgliang@gmail.com>
**What this PR does / why we need it**:
Short circuit all predicates if one predicate fails.
I think we can add a switch to control it, maybe some scenes do not need to know all the causes of failure, but also can get a great performance improvement; if you need to fully understand the reasons for the failure, and accept the current performance requirements, can maintain the current logic. It should expose this switch to the user.
**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 #56889 and #48186
**Special notes for your reviewer**:
@davidopp
**Release note**:
```
Allow scheduler set AlwaysCheckAllPredicates, short circuit all predicates if one predicate fails can greatly improve the scheduling performance.
```
2018-01-14 04:53:05 -08:00
Kubernetes Submit Queue
f6ee0f7331
Merge pull request #58192 from ravisantoshgudimetla/premeptions-metrics-additions
...
Automatic merge from submit-queue (batch tested with PRs 58192, 58231). 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>.
Added metrics for preemption
**What this PR does / why we need it**:
Metrics for preemption duration in scheduler.
**Special notes for your reviewer**:
xref: https://github.com/kubernetes/kubernetes/issues/57471
**Release note**:
```release-note
NONE
```
cc @bsalamat
2018-01-13 05:36:46 -08:00
Wang Guoliang
b8526cd077
-Add scheduler optimization options, short circuit all predicates if one predicate fails
2018-01-13 18:18:55 +08:00
Kubernetes Submit Queue
50e04f59e7
Merge pull request #58061 from ravisantoshgudimetla/fix-57152
...
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>.
Improved readability for messages being logged
**What this PR does / why we need it**:
This improves the readability for messages seen by end-user. /cc @jwforres @bsalamat - For UX
**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 #57152
**Release note**:
```release-note
NONE
```
2018-01-12 23:50:37 -08:00
ravisantoshgudimetla
8aebf3554c
Added metrics for preemption victims, pods preempted and duration of preemption
2018-01-13 12:27:11 +05:30
Kubernetes Submit Queue
98f81e3661
Merge pull request #46245 from ravisantoshgudimetla/metrics_additions
...
Automatic merge from submit-queue (batch tested with PRs 57266, 58187, 58186, 46245, 56509). 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>.
Added metrics for predicate and priority evaluation
**What this PR does / why we need it**:
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #45972
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
2018-01-12 20:34:53 -08:00
ravisantoshgudimetla
16ff0c2dda
Improved readability for messages being logged
2018-01-13 09:43:11 +05:30
ravisantoshgudimetla
b3c57a880c
Build files generated
2018-01-12 09:55:11 +05:30
ravisantoshgudimetla
252ff1e5a6
Metrics for predicate and priority evaluation
2018-01-12 09:55:07 +05:30
Yongkun Anfernee Gui
68c2c79362
Refactor HostIP predicate algorithm
...
- Remove string decode logic. It's not really helping to find the
conflict ports, and it's expensive to do encoding/decoding
- Not to parse the container ports information in predicate meta, use
straight []*v1.ContainerPort
- Use better data structure to search port conflict based on ip
addresses
- Collect scattered source code into common place
2018-01-08 17:10:21 -08:00
Jonathan Basseri
85c5862552
Fix scheduler refs in BUILD files.
...
Update references to moved scheduler code.
2018-01-05 15:05:01 -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
Shawn Smith
02d136173a
Fix unused fmt.Errorf result
2015-05-10 13:17:00 +09: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
594f514843
Changing a few remaining instances of passing pods around by value. I
...
avoided changing api.PodList.Items to []*api.Pod.
2015-04-20 15:26:45 -07: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
Victor HU
7eac8563d4
Update priorities.go
...
minor change in log message and log level
2015-04-17 16:02:55 +08:00
Justin Santa Barbara
933cf60af7
Style: volumeId -> volumeID
2015-04-10 13:25:44 -07:00
Justin Santa Barbara
9711e771c5
Rename AWSPersistentDisk -> AWSElasticBlockStore, aws-pd -> aws-ebs
...
Per comments from @markturansky - thanks!
2015-04-10 13:25:43 -07:00
Justin Santa Barbara
95b68ae0b0
Rename pdName -> volumeId for AWS persistent volumes
2015-04-10 13:25:43 -07:00
Justin Santa Barbara
edf0292d4a
Add initial support for Volumes to AWS
2015-04-10 13:25:42 -07:00
dingh
71b2af1e0c
Implement BRA algorithm as a new priority function in scheduler
...
Balanced Resource Allocation policy can now be enabled to so that
host(s) with balanced resource usage would be preferred. The score
given by BRA also scales from 0 to 10 with 10 representing that the
resource usage is well balanced.
2015-04-10 10:53:52 +08:00
Piotr Szczesniak
5c6439d449
Removed PodStatus.Host
...
Fixes #6165
2015-04-02 16:38:45 +02:00
Kris Rousey
6904c4d585
Fixing a lot of string formatting issues with regards to:
...
* Improper format specifier (e.g. %s for bools or %s for ints)
* More or less parameters than format specifiers
* Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
2015-03-31 16:47:10 -07:00
gmarek
5a11748018
Move Capacity from NodeSpec to NodeStatus
2015-03-26 15:28:48 +01:00
Jerzy Szczepkowski
34a8a3a844
Running node selector predicate on kubelet.
...
Added checking on kubelet if scheduled pods have matching node selector. This is the last step to fix #5207 .
2015-03-23 08:21:58 +01:00
Jerzy Szczepkowski
5845f6ad48
Running resource predicate on kubelet.
...
Added checking on kubelet if scheduled pods do not exceed resources. Related to #5207 .
2015-03-19 10:40:10 +01:00
gmarek
cbf57ee324
Merge pull request #5588 from hurf/master
...
Fix comments on caculating scores.
2015-03-19 07:44:11 +01:00
Daniel Smith
992d78a32e
Add a system modeler to scheduler
...
So it can try to predict the effect its bindings will have.
2015-03-13 17:48:16 -07:00
Abhishek Gupta
baa61fa157
Adding test cases for namespace checks
2015-03-06 16:31:15 -08:00
Abhishek Gupta
5ce4558955
Using only pods within the namespace for spreading logic
2015-03-06 16:31:15 -08:00
Brendan Burns
fb90b56bf6
Embed VolumeSource in v1beta3 and internal.
2015-03-04 02:25:40 -08:00
David Oppenheimer
32523f8a52
Merge pull request #4674 from abhgupta/abhgupta-dev
...
Configuring scheduler via json configuration file
2015-03-02 14:43:25 -08:00
Abhishek Gupta
a04e600f16
Added test cases
2015-03-02 10:00:20 -08: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
Brendan Burns
33f6576f61
Log a better error with useful info on scheduling failures.
2015-02-23 20:36:22 -08:00
Daniel Smith
650f6cb826
Revert "Multi-port Endpoints"
2015-02-23 13:53:21 -08:00
Tim Hockin
eed36455a7
Merge pull request #4653 from thockin/secret_fixups
...
Secrets fixups
2015-02-23 13:49:19 -08:00
Tim Hockin
607b736a3f
Rename volume source types to be consistent.
2015-02-23 12:39:57 -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
Vishnu Kannan
d0524d4778
Rename ResourceRequirementSpec to ResourceRequirements.
2015-02-09 23:19:38 +00:00
Vishnu Kannan
5e36f63f8b
Adding ResourceRequirementSpec to v1beta1, v1beta2, and v1beta3 APIs. The old resource
...
quantities 'CPU' and 'Memory' will be preserved until support for v1beta1 and v1beta2 APIs are
dropped.
Improved resource validation in the process.
2015-02-01 02:19:55 +00:00
Tim Hockin
819803b79f
Make VolumeSource not be a pointer
...
There's no reason for it to be a pointer.
2015-01-20 17:54:04 -08:00
davidopp
2675cfa16b
Merge pull request #2906 from abhgupta/abhgupta-dev
...
Enhancements to scheduler priority functions
2015-01-14 21:47:28 -08:00
Daniel Smith
2e394d41cd
fix log message
2015-01-14 15:08:53 -08:00
Abhishek Gupta
dbac18a909
Rebasing onto latest code and fixing issues
2015-01-13 10:09:33 -08:00
Abhishek Gupta
c20d062d16
Added comments and minor changes based on PR feedback
2015-01-13 09:41:28 -08:00
Abhishek Gupta
40df5f6db8
Added a more formal comment for the service affinity predicate
2015-01-13 09:41:28 -08:00
Abhishek Gupta
6fd0b181e3
Rebased onto the latest changes to the scheduler code
2015-01-13 09:41:25 -08:00
Abhishek Gupta
9e75a05df0
Implementing PR feedback
2015-01-13 09:34:45 -08:00
Abhishek Gupta
3f722a3d8e
Adding service affinity predicate
2015-01-13 09:34:45 -08:00
Abhishek Gupta
9dd7d2a0a1
Adding label checker predicates and test cases
2015-01-13 09:34:45 -08:00
Abhishek Gupta
04db076e5f
Enhancements to scheduler priority functions
...
- Modified the existing spreading priority to consider service pods explicitly
- Added a new priority function to spread pods across zones
2015-01-13 09:34:42 -08:00
Victor HU
05c63bb201
Fix comments by formula given in priorities.go
2015-01-12 21:24:57 +00:00
Eric Tune
00c05053b7
Rename ListPods methods to List.
...
For greater similarity to pkg/client.
Does not cover registry's ListPods.
Fix an example in a comment.
2015-01-09 23:46:02 -08:00
Daniel Smith
2050131b9a
ParseOrDie -> MustParse; stop returning pointer
2015-01-07 15:21:35 -08:00
Daniel Smith
7f49ba0dcf
Put quantity into packages
...
kubelet, GCE, validation, client
2015-01-07 15:21:34 -08:00
Brendan Burns
2e17193161
Add Host to PodSpec and add a predicate to make the scheduler work.
2014-12-18 20:12:29 -08:00
Clayton Coleman
d1d7505272
Rename client Minions->Nodes, select the correct path for v1beta3
...
Replaces the client public interface but leaves old references to "minions"
for a later refactor. Selects the path "nodes" for v1beta3 and "minions"
for older versions.
2014-12-10 12:08:19 -05:00
Clayton Coleman
19379b5a38
Internal rename api.Minion -> api.Node
2014-12-10 12:08:18 -05:00
Abhishek Gupta
d17cebcd2a
Implementing PR feedback and adding test cases
2014-12-08 14:47:05 -08:00
Abhishek Gupta
5fa1dbc07b
Implementing PR feedback
...
- Making ConfigFactory struct public
- Added comments for predicate/priority functions and new methods
2014-12-08 14:47:05 -08:00
Abhishek Gupta
13831856c9
Combining scheduler priority functions using weighted averages
2014-12-08 14:47:05 -08:00
Abhishek Gupta
7f374030c1
Fixing gofmt errors
2014-12-08 14:47:05 -08:00
Abhishek Gupta
1eb28b0aa3
Scheduler changes to allow multiple priority functions
2014-12-08 14:47:05 -08:00
Abhishek Gupta
6b712cc700
Scheduler changes for extensibility
2014-12-08 14:47:05 -08:00
Clayton Coleman
156000ef6d
Move the internal minion representation to match v1beta3
...
Moves to 'Spec' and 'Status' internally and removes duplicate
fields. Moves Capacity into Spec and drops use of NodeResources
2014-11-20 20:53:08 -05:00
markturansky
8af4ccb111
v1beta3 Pod refactor
2014-11-18 09:25:42 -05:00
Claire Li
4bee622865
Add check for empty priority list and refactor tests.
2014-11-06 21:38:41 -08:00
Claire Li
18fa043b1b
Add a test for selectHost of generic_scheduler
2014-11-05 21:48:42 -08:00
Claire Li
415ac3bf8a
Refactor selectHost in generic_scheduler
2014-11-05 21:26:25 -08:00
Daniel Smith
3260d300e5
Merge pull request #2166 from claire921/refactor_sched
...
Refactor PodFitsPorts
2014-11-05 10:30:00 -08:00
Daniel Smith
6e55514a47
Merge pull request #2167 from claire921/clean
...
Cleanup generic_scheduler
2014-11-05 10:22:24 -08:00
Claire Li
076f1638b8
Refactore calculateOccupancy in pkg/scheduler
2014-11-04 21:44:44 -08:00
Claire Li
0e989afa66
Cleanup generic_scheduler
2014-11-04 21:39:10 -08:00
Claire Li
8d859f4260
Refactor PodFitsPorts
2014-11-04 21:21:26 -08:00
Brendan Burns
5d4d60783d
Add requirements based scheduling.
2014-10-25 22:08:00 -07:00
derekwaynecarr
580cb5ea4f
Rework client.Interface
2014-10-24 11:47:30 -04:00
Clayton Coleman
644eb70085
Refactor tests to split ObjectMeta from TypeMeta
2014-10-24 11:22:21 -04:00
Clayton Coleman
bb77a5d15f
Rename ID -> Name
2014-10-22 15:00:26 -04:00
Daniel Smith
1dcb25e26e
Merge pull request #1754 from brendandburns/valid
...
Add a predicate for persistent disk scheduling.
2014-10-15 12:03:05 -07:00
Brendan Burns
47c4b8fc98
Add a predicate for persistent disk scheduling.
2014-10-13 15:38:25 -07:00
Deyuan Deng
19c62d719c
Use DesiredState.Host in scheduler predicate
2014-10-12 17:03:23 -04:00
Dawn Chen
135d187942
Merge pull request #1736 from brendandburns/scheduler
...
Switch away from the static node info
2014-10-10 15:01:09 -07:00
Brendan Burns
e6fa568ad4
Switch away from the static node info
2014-10-10 14:08:09 -07:00
Tim Hockin
d84816aaec
Merge pull request #1709 from erictune/move_line
...
Fix format specifiers in Printf-type functions.
2014-10-09 20:40:35 -07:00
Eric Tune
800284164a
Fix format specifiers in Printf-type functions.
2014-10-09 17:06:32 -07:00
Brendan Burns
b5ec8a747b
Switch on the resource requested prioritization.
2014-10-09 11:29:45 -07:00
Brendan Burns
4230a8ca61
Add a least-requested priority function
2014-10-08 15:31:38 -07:00
Clayton Coleman
d3e51a0f24
Rename JSONBase -> TypeMeta in preparation for v1beta3
...
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Brendan Burns
1551b48347
Add a resource fit scheduler predicate. Set sensible defaults.
2014-10-03 15:09:59 -07:00
Brendan Burns
39d03948e7
Add resource fit predicates.
2014-10-01 12:38:09 -07:00
Brendan Burns
1bb962961c
Refactor schedulers, remove schedulers, use generic scheduler.
2014-09-26 10:26:25 -07:00
Brendan Burns
44703efe2e
Simplify schedulers.
2014-09-25 11:36:22 -07:00
Brendan Burns
0cf8f28112
Refactor the code to make it more readable.
2014-09-25 10:49:36 -07:00
Brendan Burns
9ed8486fd7
Add a generic scheduler.
2014-09-24 15:38:52 -07:00
Brendan Burns
25b4939ffa
Initial cut of a spreading scheduler.
2014-09-24 15:38:52 -07:00
Brendan Burns
d900fbf6fc
Generalize the fit scheduler.
...
Extract the "fit predicate" from random fit to make it extensible/plugable
2014-09-24 13:56:40 -07:00
Vojtech Vitek (V-Teq)
59f58cd043
Unify Godoc formatting, fix various typos
...
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Clayton Coleman
1c68247954
Merge pull request #909 from lavalamp/scheduler3
...
Scheduler plugin v1
2014-08-21 19:04:51 -04: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
dddad888b5
Begin scheduler plugin
2014-08-20 15:32:49 -07:00
Dawn Chen
5a2365b323
Fix #926
...
Make HostPort a real option without being set to ContainerPort if absent.
2014-08-19 15:44:50 -07:00
Yuki Yugui Sonoda
41febcee5e
Merge branch 'master' into fix/golint
...
Conflicts:
pkg/master/master.go
pkg/master/pod_cache.go
pkg/proxy/config/file.go
pkg/proxy/proxier.go
pkg/proxy/roundrobbin.go
pkg/scheduler/randomfit.go
pkg/scheduler/randomfit_test.go
2014-07-15 20:57:47 +09:00
Kouhei Ueno
c875a6d3ba
rename FirstFitScheduler to RandomFitScheduler
2014-07-12 23:23:53 +09:00
Kouhei Ueno
070b4ffe9f
make firstfit.go threadsafe and fix its comments
2014-07-12 23:23:53 +09:00
Kouhei Ueno
2a03a4d502
make random.go threadsafe
2014-07-12 23:23:52 +09:00
Kouhei Ueno
bf137c38e7
remove comments on Make.+()
2014-07-12 13:16:16 +09:00
Kouhei Ueno
e268e4bb7a
Add comments to pkg/scheduler/ to pass golint
2014-07-11 22:01:12 +09:00
Burcu Dogan
6a2703627b
scheduler: use New rather than Make for construction helpers.
2014-07-10 22:56:14 -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