SataQiu
47c58c3785
using structured logging in scheduler framework runtime
2020-09-24 21:54:31 +08:00
Kubernetes Prow Robot
965137a992
Merge pull request #94692 from alculquicondor/wrap_errors_min
...
Wrap errors from VolumeBinding and DefaultBinder plugins
2020-09-15 18:27:34 -07:00
Wei Huang
185ba08fcd
Move podPassesBasicChecks() to VolumeBinding plugin
2020-09-11 13:54:02 -07:00
Wei Huang
42cfda2f94
Remove pvcLister from genericScheduler
...
PVCLister can be fetched from sharedInformerFactory.
2020-09-11 13:54:01 -07:00
Aldo Culquicondor
a482d7ef8e
Wrap errors when running PreBind plugins
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
Change-Id: I31bf35d7e96b1cebb285cf03ffad310d83224d9c
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-09-10 16:22:12 -04:00
Wei Huang
eb3d2de543
Remove field disablePreemption from internal scheduler codebase
2020-09-10 13:06:42 -07:00
Wei Huang
d8def59871
Initialize scheduler's podInformer in sharedInformerFactory
...
Scheduler's specific podInfomer is now initialized inside the sahredInformerFactory.
2020-09-08 12:57:17 -07:00
Kubernetes Prow Robot
06eb495a0f
Merge pull request #93896 from alculquicondor/speed-up-volume-binding-test
...
Improve running time of TestSchedulerWithVolumeBinding
2020-08-26 19:41:10 -07:00
Kubernetes Prow Robot
3647766cbc
Merge pull request #93938 from alculquicondor/revert-node-delete
...
Keep track of remaining pods when a node is deleted
2020-08-13 13:25:41 -07:00
Aldo Culquicondor
16d7ecfa45
Remove direct accesses to cache's node map
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
Change-Id: Iebb22fc816926aaa1ddd1e4b2e52f335a275ffaa
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-08-13 14:22:06 -04:00
Kubernetes Prow Robot
4750523bac
Merge pull request #93893 from alculquicondor/fix-scheduler-test
...
Sync cache before starting scheduler test
2020-08-11 15:31:46 -07:00
Aldo Culquicondor
1978866474
Improve running time of TestSchedulerWithVolumeBinding
...
Only wait for finished binding or error, but not both
Signed-off-by: Aldo Culquicondor <acondor@google.com>
Change-Id: I13d16e6c7c45c6527591aa05cc79fc5e96d47a68
2020-08-11 17:31:29 -04:00
Aldo Culquicondor
24f817a487
Sync cache before starting scheduler test
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
Change-Id: I9629e1d6d510607b505b0302e23d67e0ae4a662e
2020-08-11 13:36:54 -04:00
Yecheng Fu
1176ef9c7d
forget the pod when the reserve plugins fail
...
and move the metrics function calls before all other functions
2020-08-11 21:28:33 +08:00
Chelsey Chen
ade2422883
Switch event recorder to use events.k8s.io/v1
2020-07-02 14:50:41 -04:00
Kubernetes Prow Robot
ad29e168dc
Merge pull request #92108 from Huang-Wei/postfilter-impl-4
...
[postfilter-impl-4] Move Preempt() to defaultpreemption package.
2020-06-27 09:02:15 -07:00
Wei Huang
058e3d4258
Move Preempt() and its related functions to defaultpreemption package
...
Refactor genericScheduler and signature of preemption funcs
- remove podNominator from genericScheduler
- simplify signature of preemption functions
Make Preempt() private
2020-06-25 12:33:51 -07:00
Adhityaa Chandrasekar
ec83143342
scheduler: merge Reserve and Unreserve plugins
...
Previously, separate interfaces were defined for Reserve and Unreserve
plugins. However, in nearly all cases, a plugin that allocates a
resource using Reserve will likely want to register itself for Unreserve
as well in order to free the allocated resource at the end of a failed
scheduling/binding cycle. Having separate plugins for Reserve and
Unreserve also adds unnecessary config toil. To that end, this patch
aims to merge the two plugins into a single interface called a
ReservePlugin that requires implementing both the Reserve and Unreserve
methods.
2020-06-24 21:10:35 +00:00
Yecheng Fu
4627b419b4
tests only
2020-06-23 22:18:33 +08:00
Aldo Culquicondor
eb9711dc1f
Add profile label to schedule_attempts_total metric
...
and e2e_scheduling_duration_seconds
Also adding result label to e2e_scheduling_duration_seconds. Previously, the metric was only updated for successful attempts
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-06-22 15:19:57 -04:00
Ali Farah
a22e115a0e
Split scheduler framework implementation into new runtime package
2020-06-22 00:23:43 +10:00
Wei Huang
196056d7fe
Introduce a defaultpreemption PostFilter plugin
...
- Add a defaultpreemption PostFilter plugin
- Make g.Preempt() stateless
- make g.Preempt() stateless
- make g.getLowerPriorityNominatedPods() stateless
- make g.processPreemptionWithExtenders() stateless
2020-06-19 09:13:55 -07:00
Wei Huang
36c8ecc98c
Refactor scheduler preempt interface
...
- replace error with NodeToStatusMap in Preempt() signature
- eliminate podPreemptor interface and expose its functions statelessly
- move logic in scheduler.go#preempt to generic_scheduler.go#Preempt()
2020-06-15 08:42:00 -07:00
Yecheng Fu
c4138361e4
Fail fast in PreFilter phase and return UnschedulableAndUnresolvable if immediate PVCs are not bound
2020-06-12 10:00:19 +08:00
Wei Huang
51a9dcce22
Revert "Fix an issue that a Pod's nominatedNodeName cannot be cleared when the nominated node is deleted"
...
This reverts commit 369a9001c6
.
2020-06-09 16:47:37 -07:00
Kubernetes Prow Robot
5248bef370
Merge pull request #91750 from Huang-Wei/clear-nnn
...
Fix an issue that a Pod's nominatedNodeName cannot be cleared upon node deletion
2020-06-08 21:43:58 -07:00
Wei Huang
369a9001c6
Fix an issue that a Pod's nominatedNodeName cannot be cleared when the nominated node is deleted
2020-06-03 17:45:06 -07:00
Yecheng Fu
1ff09c0934
Remove BindTimeoutSeconds from KubeSchedulerConfiguration
2020-06-03 09:54:06 +08:00
Abdullah Gharaibeh
27caa6e727
merge pod condition update with setting nominated node name in the scheduler
2020-05-28 20:11:16 -04:00
Kubernetes Prow Robot
73641d35c7
Merge pull request #91451 from gaurav1086/scheduler_test_fix_goroutine_leak
...
scheduler_test: fix goroutine leak
2020-05-26 21:09:03 -07:00
Gaurav Singh
a4e5629320
scheduler_test: fix goroutine leak
...
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Re-use errchan from setupTestSchedulerWithOnePodOnNode
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-05-26 17:33:10 -04:00
Wei Huang
59eff29d22
- Add Extenders() and PluginsRunner interface to PreemptHandle
...
- Make some private functions stateless
- make addNominatedPods() not dependent on genericScheduler
- make addNominatedPods() not dependent on genericScheduler
- make selectVictimsOnNode() not dependent on genericScheduler
- make selectNodesForPreemption() not dependent on genericScheduler
2020-05-26 10:00:45 -07:00
Wei Huang
1b30105dac
Fix scheduler cache inconsistency upon Pods with same name but different UIDs
...
Co-authored-by: Wei Huang <wei.huang1@ibm.com>
Co-authored-by: tianxia52 <871883758@qq.com>
2020-05-15 11:41:54 -07:00
Kubernetes Prow Robot
57b79e3fb4
Merge pull request #91037 from Huang-Wei/prefactor-PreemptExtender
...
Refactor preemption extender logic and move SchedulerExtender interface to framework pkg
2020-05-15 02:48:30 -07:00
Brian Pursley
9eb8e7a6d6
Changed scheduler to use patch when updating pod status to avoid potential conflicts
2020-05-14 15:17:53 -04:00
Wei Huang
eb17b7559c
move SchedulerExtender interface to pkg/scheduler/framework/v1alpha1
2020-05-13 13:09:13 -07:00
Wei Huang
e4f878ea3a
cleanup: use string instead of v1.Node as key of nodeToVictims
2020-05-13 13:08:20 -07:00
Yecheng Fu
c14b749521
scheduler/volumebinding: move all volume binding logic into VolumeBinding plugin
2020-05-12 10:13:05 +08:00
Wei Huang
e283e73994
Remove enableNonPreempting
field from scheduler codebase
2020-05-08 19:02:51 -07:00
Abdullah Gharaibeh
a151682887
Split scheduler's PodInfo into two types, PodInfo and PodQueueInfo
2020-04-21 21:45:20 -04:00
Aldo Culquicondor
ce05382b58
Use RawExtension and Object for external and internal scheduling plugin args, respectively
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-04-14 13:44:42 -04:00
Abdullah Gharaibeh
b8ddd00312
scheduler's NodeInfo tracks PodInfos instead of Pods
2020-04-08 17:53:20 -04:00
Abdullah Gharaibeh
a5d8172715
move nodeinfo type to framework pkg
2020-04-07 10:25:24 -04:00
Abdullah Gharaibeh
ed3fe054df
move scheduler nodeinfo to pkg/scheduler/types
2020-03-31 21:02:09 -04:00
louisgong
c6b94e4606
refactor volume binder
2020-02-29 12:03:39 +08:00
Patrick Ohly
6329b17d2f
volume scheduler: introduce special string type
...
This makes it possible to search for the special strings more easily
(https://github.com/kubernetes/kubernetes/pull/88230#discussion_r382367043 ).
2020-02-28 10:09:19 +01:00
Patrick Ohly
6eb0b034ac
volume scheduler: move reason strings into volume code
...
The scheduler doesn't really need to know in detail which reasons
rendered a node unusable for a node. All it needs from the volume
binder is a list of reasons that it then can present to the user.
This seems a bit cleaner. But the main reason for the change is that
it simplifies the checking of CSI inline volumes and perhaps later
capacity checking. Both will lead to new failure reasons, which then
can be added without changing the interface.
2020-02-28 10:09:18 +01:00
Aldo Culquicondor
07c4982245
Add unit and integration tests for multiple profiles support
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-26 10:14:03 -05:00
Aldo Culquicondor
c048858471
Support multiple scheduling profiles in a single scheduler
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-25 11:31:20 -05:00
notpad
89066cceb9
Add RegisterPluginAsExtensionsWithWeight
2020-02-11 23:11:53 +08:00
notpad
a7057f8df0
Cleanup "slow-path" logic in scheduler Filters
2020-02-10 22:48:49 +08:00
Aldo Culquicondor
4a5ab84dcc
Move default binding to a plugin
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-22 14:13:33 -05:00
Kubernetes Prow Robot
8cd0c42845
Merge pull request #87407 from haosdent/remove-registry-args
...
Deprecate scheduler's framework.plugins.RegistryArgs
2020-01-21 16:26:57 -08:00
Haosdent Huang
50d511d4b8
Deprecate scheduler's framework.plugins.RegistryArgs
2020-01-21 23:50:58 +08:00
zouyee
d6b449b5c7
Move scheduler's SchedulerExtender interface to core/extenders.go
...
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2020-01-21 20:20:20 +08:00
Aldo Culquicondor
eb265bc7db
Remove GetBinder member and replace it with a method.
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-20 14:10:02 -05:00
Aldo Culquicondor
7a39e1396a
Remove unnecessary slow binding test
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-20 11:49:45 -05:00
Aldo Culquicondor
f53d7e55df
Move Snapshot from nodeinfo/snapshot to internal/cache
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-17 13:29:41 -05:00
Wei Huang
c712230ac1
Implement default queue sort logic as a scheduler plugin
2020-01-16 19:10:43 -08:00
Abdullah Gharaibeh
fb66e807cd
Remove scheduler framework dependency on predicates package
2020-01-13 13:02:31 -05:00
draveness
2c3c6721ce
refactor(scheduling): remove priorities package
2020-01-10 09:05:39 +08:00
Wei Huang
64d7b224d9
Cleanup unused parameter of NewGenericScheduler
2020-01-03 11:42:39 -08:00
Kubernetes Prow Robot
26b52e84a4
Merge pull request #86230 from hex108/skip_schedule
...
Scheduler handles pod annotation updates during scheduling more gracefully
2019-12-31 17:03:40 -08:00
Jun Gong
706e90a033
Skip scheduling the pod if it has been assumed and the pod updates could be skipped.
2019-12-31 14:21:41 +08:00
Abdullah Gharaibeh
2b3df3587e
Deprecate scheduler predicate and priority factory registration
2019-12-25 20:33:08 -05:00
Abdullah Gharaibeh
fe7de96ebe
cleanup scheduler's in-tree plugins registry naming
2019-12-24 15:56:36 -05:00
Kubernetes Prow Robot
06fb3eb582
Merge pull request #86496 from ahg-g/ahg1-check
...
Support AlwaysCheckAllPredicates in the scheduler framework.
2019-12-23 09:53:33 -08:00
Kubernetes Prow Robot
ff975e865d
Merge pull request #86498 from Huang-Wei/deprecate-failedPredicateMap
...
Cleanup failedPredicateMap from generic_scheduler.go
2019-12-21 08:41:33 -08:00
Abdullah Gharaibeh
eeb8a5b728
Added back the flag to trigger examining all Filters in the scheduler.
2019-12-21 05:17:23 -05:00
Wei Huang
3e65b3793f
Cleanup failedPredicateMap from generic_scheduler.go
2019-12-20 15:18:15 -08:00
Wei Huang
1f78a936d4
Deprecate AlwaysCheckAllPredicates in scheduler Policy API
2019-12-20 11:41:33 -08:00
Abdullah Gharaibeh
770e51cd10
Deprecate PredicateMetadata
2019-12-17 08:02:59 -05:00
Wei Huang
468aebc17f
Move EvenPodsSpread metadata computation logic as a PreFilter Plugin
2019-12-13 16:33:21 -08:00
Kubernetes Prow Robot
c34d140241
Merge pull request #86129 from damemi/remove-priority-code
...
Remove priority execution path from prioritizeNodes in generic_scheduler
2019-12-13 01:41:04 -08:00
Mike Dame
255ab6d2c3
Remove priority execution paths in favor of score plugins
...
Mainly affects core/generic_scheduler.go (and related tests). Removes the "prioritizers" field and related functions.
2019-12-12 19:30:44 -05:00
Abdullah Gharaibeh
9f334a4d08
Add an interface to return scheduler framework instance
2019-12-12 10:47:32 -05:00
Wei Huang
dc3d1bd238
Eliminate running paths of Predicates in scheduler
...
- eliminate running paths of Predicates in scheduler; use Filter Plugins instead.
- refactor all unit tests
- adjust the TestPreemptWithPermitPlugin integration test
2019-12-10 19:14:13 -08:00
Kubernetes Prow Robot
f4caa62593
Merge pull request #85590 from yuzhiquan/master
...
handle registry merge error
2019-12-04 08:50:57 -08:00
Dc.Hannibal
9a9db00451
handle registry merge error
...
Handle registry merge error.
Add test case
Add a test case in TestSchedulerCreation
Add test case comment
Add test case comment, and modify error msg.
gofmt
gofmt import order
replace NewDefaultRegistry with a fake registry
update comment
rename framework plugins nodeaffinity import
remove nodeaffinity plugin import, get fake registry name from default registry randomly
Add a space
Add a space after //
update comment, trans FrameWork to Framework
2019-12-04 09:21:18 +08:00
Abdullah Gharaibeh
f388534082
make scheduling queue start before the scheduler starts and stops after the scheduler stops
2019-12-02 14:35:09 -05:00
Abdullah Gharaibeh
5ea43f20cb
optimize scheduler's UpdateNodeInfoSnapshot
2019-11-29 15:06:13 -05:00
Abdullah Gharaibeh
2e0bad569d
export scheduler.Snapshot function, needed for cluster autoscaler integration
2019-11-27 12:35:56 -05:00
Igor Zibarev
6350095d3c
scheduler: make algorithm source an option
...
Changes scheduler.New so that algorithm source is moved from the
parameter to an option. The default algorithm source is source with the
DefaultProvider.
2019-11-13 10:22:29 +03:00
Aldo Culquicondor
6a98c93f3c
Add MetadataProducerFactory for predicates
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-11-11 11:27:44 -05:00
draveness
3bb88356f4
feat(scheduler): remove deprecated pattern in scheduler priority
2019-11-07 22:43:07 +08:00
Abdullah Gharaibeh
6b4bd87ba3
Remove Framework dependency on nodeinfo snapshot
2019-11-06 08:37:57 -05:00
Mike Dame
9e2591f867
Change scheduler ComponentConfig fields to nilable
...
As part of graduating the scheduler's component config to beta, we require configurable fields to be nilable pointers (see https://github.com/kubernetes/kubernetes/issues/78109 ). This enables the ability to distinguish between default and unset values. We are only applying this change to external types, and reacting in our defaulting logic. This also reverts existing internal component config fields which were pointers to be non-pointers, for consistency.
2019-11-05 17:06:06 -05:00
Abdullah Gharaibeh
f8ae5cdaf8
expose PredicateMetadataProducer in generic scheduler
2019-11-05 05:17:47 -05:00
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
Abdullah Gharaibeh
c6baa263a3
Update priorities to use SharedLister instead of using the snapshot directly
2019-10-29 16:22:00 -04:00
draveness
76a42fb29b
feat: remove WaitForCacheSync from scheduler factory
2019-10-24 10:19:35 +08: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
Ahmad Diaa
6bbc607d72
move PodPreemptor to scheduler
2019-10-11 22:57:39 +02:00
draveness
ee4dec65b5
feat(scheduler): expose SharedInformerFactory to the framework handle
2019-10-11 10:23:21 +08:00
Cong Liu
085852160a
Add per-pod metrics for scheduler.
2019-10-10 16:58:21 -04:00
draveness
9646afb1f5
feat: add pod initial/max backoff duration to config API
2019-10-09 19:48:28 +08:00
draveness
c73ff9749b
feat(scheduler): rename PluginContext to CycleState
2019-10-04 17:30:36 +08:00
Kubernetes Prow Robot
0a17315e18
Merge pull request #83418 from ahg-g/ahg-first-priority
...
Refactor scheduler.New so that all framework-related parameters are options
2019-10-03 10:00:11 -07: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