Commit Graph

79 Commits

Author SHA1 Message Date
Klaus Ma
aea7b1faab Improve code coverage for algorithm/predicates. 2017-01-18 23:23:26 +08:00
Clayton Coleman
bcde05753b
Correct import statements 2017-01-17 16:18:18 -05:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Kubernetes Submit Queue
b1506004cc Merge pull request #39601 from mqliang/upstream-tolerates-taints-bugfix
Automatic merge from submit-queue (batch tested with PRs 39945, 39601)

bugfix for PodToleratesNodeTaints

`PodToleratesNodeTaints`predicate func should return true if pod has no toleration annotations and node's taint effect is `PreferNoSchedule`
2017-01-17 04:08:47 -08:00
Klaus Ma
c184fef6e6 Fixed pod anti-affinity bugs. 2017-01-17 13:28:54 +08:00
Robert Rati
6a3ad93d6c [scheduling] Moved pod affinity and anti-affinity from annotations to api
fields. #25319
2017-01-12 14:54:29 -05:00
mqliang
d473646855 bugfix for PodToleratesNodeTaints 2017-01-09 18:16:43 +08:00
Joe Finney
b4c87a94a8 Remove two zany unit tests. 2016-12-16 14:49:05 -08:00
Robert Rati
91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Humble Chirammal
28088159c3 Make iscsi pv claim aware of nodiskconflict feature.
Being ISCSI a RWO/ROX volumes it should inherit nodiskconflict feature.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-13 10:07:09 +05:30
Chao Xu
f782aba56e plugin/scheduler 2016-11-23 15:53:09 -08:00
Kubernetes Submit Queue
5dd346ab75 Merge pull request #34693 from yarntime/add_pod_affinity_test_cases
Automatic merge from submit-queue

add podAntiAffinity test cases

add podAntiAffinity test cases.
2016-11-07 01:37:22 -08:00
David Ashpole
9aca40dee6 revert #33218. dont need #36180. We only use diskpressure 2016-11-04 08:29:27 -07:00
Connor Doyle
c93646e8da Support opaque integer resource accounting.
- Prevents kubelet from overwriting capacity during sync.
- Handles opaque integer resources in the scheduler.
  - Adds scheduler predicate tests for opaque resources.
- Validates opaque int resources:
  - Ensures supplied opaque int quantities in node capacity,
    node allocatable, pod request and pod limit are integers.
  - Adds tests for new validation logic (node update and pod spec).
- Added e2e tests for opaque integer resources.
2016-10-28 10:15:13 -07:00
jayunit100
08cff0157d PredicateMetadata factory and optimization, Cleaned up some comments,
Comments addressed, Make emptyMetadataProducer a func to avoid casting,
FakeSvcLister: remove error return for len(svc)=0.  New test for
predicatePrecomp to make method semantics explictly enforced when meta
is missing. Precompute wrapper.
2016-10-20 08:27:11 -04:00
Kubernetes Submit Queue
bcbdcd17f3 Merge pull request #34685 from resouer/eclass-2
Automatic merge from submit-queue

Refactor scheduler to enable switch on equivalence cache

Part 2 of #30844 

Refactoring to enable easier switch on of equivalence cache.
2016-10-18 04:21:33 -07:00
Harry Zhang
50eaeaa7bd Update ecache and add scheduler method 2016-10-17 11:42:16 -04:00
yarntime
f21ff43368 add podAntiAffinity test cases 2016-10-13 17:01:58 +08:00
David Oppenheimer
cd4e08e7ec Revert "Add kubelet awareness to taint tolerant match caculator." 2016-10-07 12:10:55 -07:00
Kubernetes Submit Queue
21188cadeb Merge pull request #26501 from resouer/scheduler
Automatic merge from submit-queue

Add kubelet awareness to taint tolerant match caculator.

Add kubelet awareness to taint tolerant match caculator.

Ref: #25320

This is required by `TaintEffectNoScheduleNoAdmit` & `TaintEffectNoScheduleNoAdmitNoExecute `, so that node will know if it should expect the taint&tolerant
2016-10-07 12:05:35 -07:00
Jedrzej Nowak
d2161c21d7 Fix typos and englishify plugin/pkg 2016-10-04 17:51:14 +02:00
David Ashpole
0c8a664e50 addressed comments 2016-10-03 11:42:56 -07:00
David Ashpole
fed3f37eef Split NodeDiskPressure into NodeInodePressure and NodeDiskPressure 2016-10-03 11:42:56 -07:00
Harry Zhang
c2cf5bbaf6 Setup e2e test for no admit 2016-10-01 01:07:18 -04:00
Kubernetes Submit Queue
b2aed32578 Merge pull request #33269 from deads2k/client-15-svc-lister
Automatic merge from submit-queue

simplify svc lister

trying to track down what killed the e2e tests.
2016-09-23 03:10:57 -07:00
Daniel Smith
db3e549bd1 more usages of go2idl 2016-09-22 13:42:46 -07:00
Harry Zhang
c735921b6f Add no admit on node side
Update generated code

Refactored predicates & restore helper
2016-09-22 10:12:44 -04:00
deads2k
483af28944 fix up service lister 2016-09-22 09:12:37 -04:00
Antoine Pelisse
938872582e Revert "simplify RC and SVC listers" 2016-09-21 15:49:38 -07:00
deads2k
16fbb47189 fix up service lister 2016-09-20 08:24:33 -04:00
Harry Zhang
608e7ce0d4 Fix minor nits in test cases 2016-09-01 05:21:17 -04:00
mksalawa
2749ec7555 Create PredicateFailureReason, modify scheduler predicate interface. 2016-08-09 14:01:46 +02:00
Wojciech Tyczynski
4bc410e47a Speedup pod affintiy predicate function 2016-08-02 08:01:04 +02:00
k8s-merge-robot
821ff657f9 Merge pull request #27199 from derekwaynecarr/disk_eviction
Automatic merge from submit-queue

Initial support for pod eviction based on disk

This PR adds the following:

1. node reports disk pressure condition based on configured thresholds
1. scheduler does not place pods on nodes reporting disk pressure
1. kubelet will not admit any pod when it reports disk pressure
1. kubelet ranks pods for eviction when low on disk
1. kubelet evicts greediest pod

Follow-on PRs will need to handle:

1. integrate with new image gc PR (https://github.com/kubernetes/kubernetes/pull/27199)
1. container gc policy should always run (will not be launched from eviction, tbd who does that)
  1. this means kill pod is fine for all eviction code paths since container gc will remove dead container
1. min reclaim support will just poll summary provider (derek will do follow-on)
1. need to know if imagefs is same device as rootfs from summary (derek follow-on)

/cc @vishh @kubernetes/sig-node
2016-07-28 20:18:54 -07:00
derekwaynecarr
0de1e62b30 modify fsStats to fsStatsType to avoid confusion with cadvisor types 2016-07-28 16:01:38 -04:00
derekwaynecarr
9604b47c13 Scheduler does not place pods on nodes that have disk pressure 2016-07-28 16:01:38 -04:00
Wojciech Tyczynski
898a6444e3 Return pointer for Affinity in api helper 2016-07-28 16:57:28 +02:00
Wojciech Tyczynski
dcb5a6d1a6 Reuse existing Resource struct instead of new resourceRequest 2016-07-19 12:21:09 +02:00
Łukasz Oleś
528bf7af3a Make Daemonset use GeneralPredicates
fixes #21454, fixes #22205
2016-07-13 14:50:29 +02:00
kevin-wangzefeng
ff6280fa5b update inter-pod affinity predicates, check PodAntiAffinity even when pod has no AntiAffinity constraints 2016-07-13 03:55:01 +00:00
k8s-merge-robot
9b5827691a Merge pull request #28669 from lixiaobing10051267/masterTestPodFitsResources
Automatic merge from submit-queue

Add test case to TestPodFitsResources() of scheduler algorithm

File "plugin\pkg\scheduler\algorithm\predicates", function "TestPodFitsResources()", line 199, only provide test case "one resource cpu fits but memory not", it should add test case "one resource memory fits but cpu not".
2016-07-11 22:46:09 -07:00
Wojciech Tyczynski
e8e8e2d086 Remove unneeded factories 2016-07-11 15:41:26 +02:00
Wojciech Tyczynski
b1d53895a4 Check only predicate functions in test 2016-07-08 13:01:41 +02:00
Wojciech Tyczynski
6890868823 Add meta field to predicates signature 2016-07-08 12:25:48 +02:00
lixiaobing10051267
b4c106426e Add test case to TestPodFitsResources() 2016-07-08 15:43:03 +08:00
Hongchao Deng
7127915a66 selector: make sure value of GT and LT is integer 2016-07-04 20:18:17 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Abhishek Gupta
20ce8b71ab Improving error messages and naming to be clear 2016-06-13 15:23:17 -07:00
Abhishek Gupta
07bc06ba50 Counting pod volume towards PV limit even if PV/PVC is missing 2016-06-13 15:17:42 -07:00
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