Commit Graph

100 Commits

Author SHA1 Message Date
Jan Chaloupka
b95b30bbd7 Scheduler: introduce CheckNodeMemoryPressurePredicate, don't schedule pods for nodes that reports memory pressury.
Introduce unit-test for CheckNodeMemoryPressurePredicate

Following work done in #14943
2016-05-22 00:40:28 +02:00
Kevin
52fb89ff73 implement taints and tolerations 2016-05-18 15:06:23 +00:00
Clayton Coleman
1b6591312d
Update the scheduler to handle init containers 2016-05-17 00:29:54 -04:00
Rudi Chiarito
362c763fca WIP v0 NVIDIA GPU support
Implements part of #24071

I am not familiar with the scheduler enough to know what to do with the scores. Punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and user docs
2016-05-09 19:20:05 -04:00
Wojciech Tyczynski
a51f266ebf Remove nodeName from predicate signature. 2016-05-06 11:23:37 +02:00
Kevin
82ba4f077e implement inter pod topological affinity and anti-affinity 2016-05-06 06:46:23 +00:00
Clayton Coleman
fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Wojciech Tyczynski
1835c8528d Store node information in NodeInfo 2016-04-25 10:08:05 +02:00
gmarek
e0712f7e57 Fix MaxPods feature in scheduler 2016-04-22 22:49:50 +02:00
Wojciech Tyczynski
a4b3f47347 Add RC and container pors to scheduler benchmark 2016-04-20 15:10:57 +02:00
HaiyangDING
a5efb009c5 change predicate error format. 2016-04-17 08:48:03 +08:00
HaiyangDING
41ed85479a move predicates into library (address #12744)
DONE:
1. refactor all predicates: predicates return fitOrNot(bool) and error(Error) in which the latter is of type
	PredicateFailureError or InsufficientResourceError. (For violation of either MaxEBSVolumeCount or
        MaxGCEPDVolumeCount, returns one same error type as ErrMaxVolumeCountExceeded)
2. GeneralPredicates() is a predicate function, which includes serveral other predicate functions (PodFitsResource,
        PodFitsHost, PodFitsHostPort). It is registered as one of the predicates in DefaultAlgorithmProvider, and
        is also called in canAdmitPod() in Kubelet and should be called by other components (like rescheduler, etc)
        if necessary. See discussion in issue #12744
3. remove podNumber check from GeneralPredicates
4. HostName is now verified in Kubelet's canAdminPod(). add TestHostNameConflicts in kubelet_test.go
5. add getNodeAnyWay() method in Kubelet to get node information in standaloneMode

TODO:
1. determine which predicates should be included in GeneralPredicates()
2. separate GeneralPredicates() into:
	a. GeneralPredicatesEvictPod() and
	b. GeneralPredicatesNotEvictPod()
3. DaemonSet should use GeneralPredicates()
2016-04-11 00:57:03 +08:00
Wojciech Tyczynski
ebcc8f737c Parallelize computing selector spreading priority in scheduler. 2016-03-22 14:09:58 +01:00
Hongchao Deng
ae88f08af0 Scheduler: replace system modeler with scheduler cache 2016-03-14 09:03:41 -07:00
Mike Metral
2da0dbd6fd fix typo 2016-03-12 14:06:41 +00:00
Marek Grabowski
eb2f5153b3 Revert "Scheduler: replace system modeler with scheduler cache and do O(1) lookup for resource req" 2016-03-02 15:38:56 +01:00
k8s-merge-robot
e7d0f06c4a Merge pull request #21736 from resouer/check-register
Auto commit by PR queue bot
2016-03-01 02:21:56 -08:00
Hongchao Deng
f29a1d6c5c scheduler: Scheduler: replace system modeler with scheduler cache
We're using the scheduler cache to do O(1) lookup for resource request
2016-02-26 09:22:29 -08:00
Harry Zhang
636e982ecd Implement checking in predicates 2016-02-25 21:25:36 +08:00
harry
b90550de25 Implement check for priority 2016-02-23 11:59:32 +08:00
Vishnu kannan
2623fdde17 Improve the naming of fields in ContainerImage struct used in NodeStatus.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-16 15:45:22 -08:00
k8s-merge-robot
8a815b919d Merge pull request #21074 from mqliang/scheduler-ReplicaSet
Auto commit by PR queue bot
2016-02-16 01:48:33 -08:00
mqliang
0aab44a00d add ReplicaSet support in scheduler 2016-02-16 14:34:46 +08:00
derekwaynecarr
a03361bd84 Make default format right for nil values 2016-02-15 13:55:33 -05:00
David Oppenheimer
66368efad5 Comment out NodeAffinity.RequiredDuringSchedulingRequiredDuringExecution
because it is not yet implemented.
2016-02-14 17:46:13 -08:00
Hongchao Deng
1cf4540b5d priorities: move getNonzeroRequests() into util/ package 2016-02-10 08:35:00 -08:00
Hongchao Deng
9236e4a0b4 scheduler: change fit predicates and priority func as needed for optimization 2016-02-09 09:38:28 -08:00
k8s-merge-robot
8e56494ec5 Merge pull request #20140 from resouer/scheduler
Auto commit by PR queue bot
2016-02-05 20:08:31 -08:00
k8s-merge-robot
175d0c57f2 Merge pull request #19880 from DirectXMan12/feature/limit-ebs-scheduler-predicate
Auto commit by PR queue bot
2016-02-05 09:26:42 -08:00
Kevin
c8c82c1d8f implement Node affinity and NodeSelector 2016-02-04 01:53:14 +00:00
harry
233a601130 Caculate priorities based on image locality
Add test for image score

Update generated docs
2016-02-03 21:01:26 +08:00
Solly Ross
2d436ff080 Scheduler predicate for capping node volume count
For certain volume types (e.g. AWS EBS or GCE PD), a limitted
number of such volumes can be attached to a given node.  This commit
introduces a predicate with allows cluster admins to cap
the maximum number of volumes matching a particular type attached to a
given node.

The volume type is configurable by passing a pair of filter functions,
and the maximum number of such volumes is configurable to allow node
admins to reserve a certain number of volumes for system use.

By default, the predicate is exposed as MaxEBSVolumeCount and
MaxGCEPDVolumeCount (for AWS ElasticBlocKStore and GCE PersistentDisk
volumes, respectively), each of which can be configured using the
`KUBE_MAX_PD_VOLS` environment variable.

Fixes #7835
2016-02-02 16:21:42 -05:00
k8s-merge-robot
feb4b4857c Merge pull request #19890 from vishh/0-nodes
Auto commit by PR queue bot
2016-02-01 14:09:06 -08:00
Hongchao Deng
8e1bfad490 insufficient resource error: details of failure in failedPredicateMap 2016-01-21 21:49:00 -08:00
Alex Mohr
76f02d562a Merge pull request #19083 from resouer/allocatable
Use Allocatable to replace Capacity
2016-01-21 16:05:05 -08:00
Alex Mohr
fd9310fa6e Merge pull request #18452 from xiang90/refactor_nodiskconflicts
scheduler: clean up NoDiskConflict code in predicates.go
2016-01-21 10:58:41 -08:00
Vishnu kannan
21748701f1 Avoid nodes that have 0 cpu and memory capacity.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-01-20 15:34:58 -08:00
Harry Zhang
0202a206b8 Integration test to verify alloc works
Add integration test to verify allocatable can works
2016-01-20 15:36:19 +08:00
harry
e64fe82245 Use Allocatable to replace Capacity
Use allocate instead in priorities
2016-01-18 15:26:40 +08:00
k8s-merge-robot
98b190acf4 Merge pull request #19527 from hongchaodeng/pred
Auto commit by PR queue bot
2016-01-17 03:52:16 -08:00
Hongchao Deng
111b603c95 Remove FailedResourceType and return custom error 2016-01-12 08:41:30 -08:00
Saad Ali
9b415f0300 Revert "Remove FailedResourceType and return custom error" 2016-01-11 11:27:50 -08:00
Hongchao Deng
91fa5f8c88 PodFitsHostPorts: small refactor and speedup 2016-01-09 20:03:52 -08:00
Hongchao Deng
40e5e688cc Remove FailedResourceType and return custom error 2016-01-07 13:47:23 -08:00
Justin Santa Barbara
f9a6ac077e Ubernetes Lite: Volumes can dictate zone scheduling
For AWS EBS, a volume can only be attached to a node in the same AZ.
The scheduler must therefore detect if a volume is being attached to a
pod, and ensure that the pod is scheduled on a node in the same AZ as
the volume.

So that the scheduler need not query the cloud provider every time, and
to support decoupled operation (e.g. bare metal) we tag the volume with
our placement labels.  This is done automatically by means of an
admission controller on AWS when a PersistentVolume is created backed by
an EBS volume.

Support for tagging GCE PVs will follow.

Pods that specify a volume directly (i.e. without using a
PersistentVolumeClaim) will not currently be scheduled correctly (i.e.
they will be scheduled without zone-awareness).
2015-12-31 12:27:01 -05:00
Xiang Li
a0e6d68026 scheduler: fast check when there is no conflicts 2015-12-22 15:39:17 -08:00
mqliang
e58eae313e move filter logic to list&watch client 2015-12-22 19:32:18 +08:00
David Oppenheimer
7851d24d04 Merge pull request #18466 from xiang90/pod_fits
scheduler: clean up PodFitsResources
2015-12-18 22:11:05 -08:00
Brendan Burns
0ee0e16bcd Don't recreate the same map 3 times 2015-12-16 20:39:28 -08:00
Justin Santa Barbara
cd433c974f Zone-scheduler: Fixes per code-review 2015-12-13 20:34:01 -05:00