Commit Graph

44 Commits

Author SHA1 Message Date
tangwz
be080584c6
scheduler(NodeResourcesFit & NodeResourcesBalancedAllocation): calculatePodResourceRequest in PreScore phase (#115655)
* scheduler(NodeResourcesFit): calculatePodResourceRequest in PreScore phase

* scheduler(NodeResourcesFit and NodeResourcesBalancedAllocation): calculatePodResourceRequest in PreScore phase

* modify the comments and tests.

* revert the tests.

* don't need consider nodes.

* use list instead of map.

* add comment for podRequests.

* avoid using negative wording in variable names.
2023-03-10 07:44:53 -08:00
Wei Huang
72863f65d6
Graduate PodSchedulingReadiness to beta 2023-02-17 18:45:20 -08:00
Wei Huang
0b27f25252
PreEnqueue implementation
- Add PreEnqueuePlugin to Scheduler Framework
- Implement PreEnqueuePlugin in scheduler queue
- Implementation of SchedulingGates plugin
- Metrics
2022-11-07 14:02:58 -08:00
Wei Huang
761d06d91a
cleanup scheduler server_test.go 2022-10-20 18:09:05 -07:00
Claudiu Belu
d192029e6a unittests: Fixes cmd unit tests for Windows
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- filepath.IsAbs does not consider "/" or "\" as absolute paths, even
  though files can be addressed as such.
- paths not properly joined (filepath.Join should be used).
- files not closed, which means that they cannot be removed / renamed.
- some assertions fail due to slashes / backslashes not matching.
- backslashes need to be escaped in yaml files, or put between ''
instead of "".
2022-08-26 16:03:13 +03:00
kerthcet
02f77a1b84 Feat: ga component config in kube-scheduler
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-07-29 08:47:48 +08:00
Wei Huang
d330f4dcb4
Fix a bug that out-of-tree plugin is misplaced when using scheduler v1beta3 config 2022-03-21 10:46:26 -07:00
kerthcet
4439fc3590 feat: graduate DefaultPodTopologySpread to GA
Co-authored-by: drfish <drfish.me@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-02-23 19:45:27 +08:00
ahrtr
972dc46a1f replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
Mike Dame
420c5308bb Add MultiPoint scheduler plugin config field 2021-11-16 14:56:33 -05:00
Wei Huang
98b22db672
Add unit tests to cover scheduler's setup 2021-11-02 21:19:25 -07:00
Wei Huang
e30f9648cc
sched: ensure feature gate is honored when instantiating scheduler (#105915)
* sched: ensure feature gate is honored when instantiating scheduler

* fixup: address comments
2021-11-02 14:28:06 -07:00
Wei Huang
7505701044
Revert "sched: ensure --leader-elect* CLI args are honored"
This reverts commit 3c230af59c.
2021-10-26 15:18:13 -07:00
Wei Huang
3c230af59c
sched: ensure --leader-elect* CLI args are honored 2021-10-19 13:56:08 -07:00
kerthcet
a6f695581b remove legacy scheduler policy config, as well as associated flags policy-config-file, policy-configmap, policy-configmap-namespace and use-legacy-policy-config
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-10-08 23:57:49 +08:00
ravisantoshgudimetla
5c7f602f48 Make v1beta3 default 2021-10-07 10:58:06 -04:00
kerthcet
75a255d2ed remove scheduler component config v1beta1
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-09-28 13:13:17 +08:00
Jan Chaloupka
07af6697e9 refactor: disable insecure serving in kube-scheduler 2021-09-14 07:52:16 +02:00
Wei Huang
4c9c761bbb
instantiates scheduler ComponentConfig after parsing feature gates 2021-07-06 10:39:12 -07:00
Abdullah Gharaibeh
265ef1741f Move scheduler plugin set and configuration defaulting to component config 2021-06-16 10:15:29 -04:00
Abdullah Gharaibeh
c13c3ebc79 Remove deprecated scheduler CLI flags hard-pod-affinity-symmetric-weight and scheduler-name 2021-06-11 10:01:42 -04:00
Haleygo
2769e99dba remove scheduler deprecated algorithm-provider flag and clean up algorithmprovider pkg 2021-05-26 13:19:44 +08:00
Mengxue Zhang
4fb8e343c0 parse pod's node affinity once in preFilter 2021-02-25 00:21:32 +00:00
SataQiu
2b38078de1 scheduler: parse Pod's Node affinity once in PreScore phase
Signed-off-by: SataQiu <1527062125@qq.com>
2020-11-26 11:19:52 +08:00
Wei Huang
47a7c374c6
Fix a bug that DefaultPreemption plugin is disabled when using scheduler policy 2020-11-10 17:48:32 -08:00
Aldo Culquicondor
87c8349bdc Graduate DefaultPodTopologySpread to beta
And set to enabled by default

Change-Id: Ie4cc4758c52492924cb0663450f2747908cb5882
2020-10-19 16:58:09 -04:00
He Jie Xu
6e55b88725 Reorder default Filter plugins to have UnschedulableAndUnresolvable first 2020-10-14 09:40:51 +00:00
Jordan Liggitt
6125e6b65a Deflake TestSetup 2020-09-04 11:50:56 -04:00
RAKESH REDDY BANDI
d44a20f9ca Rename DefaultPodTopologySpread plugin #91994 2020-06-27 13:46:31 -04: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
Wei Huang
d99cc01646
Register and enable defaultpreemption plugin
- Enable defaultpreemption as a PostFilter plugin
- Remote legacy hard-coded preemption logic
2020-06-22 17:22:27 -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
Aldo Culquicondor
170f81cff3 Use PodTopologySpread for default spreading
Under the feature gate DefaultPodTopologySpread, which will disable the legacy DefaultPodTopologySpread plugin from the default algorithm providers.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-06-09 14:59:42 -04:00
Wei Huang
133dde6358
Remove EvenPodsSpread featuregate and related logic 2020-06-02 11:24:12 -07:00
Kubernetes Prow Robot
774c9a6db6
Merge pull request #91349 from neolit123/1.19-fail-on-unrecognized-args
cmd/*: fail on unrecognized flags/arguments for component CLI
2020-05-30 00:27:53 -07:00
Monis Khan
fc4f91f10b cmd/*: fail on unrecognized flags/arguments for component CLI
In case a malformed flag is passed to k8s components
such as "–foo", where "–" is not an ASCII dash character,
the components currently silently ignore the flag
and treat it as a positional argument.

Make k8s components/commands exit with an error if a positional argument
that is not empty is found. Include a custom error message for all
components except kubeadm, as cobra.NoArgs is used in a lot of
places already (can be fixed in a followup).

The kubelet already handles this properly - e.g.:
'unknown command: "–foo"'

This change affects:
- cloud-controller-manager
- kube-apiserver
- kube-controller-manager
- kube-proxy
- kubeadm {alpha|config|token|version}
- kubemark

Signed-off-by: Monis Khan <mok@vmware.com>
Signed-off-by: Lubomir I. Ivanov <lubomirivanov@vmware.com>
2020-05-28 22:06:01 +03:00
Rafal Wicha
852442c0ff Promote kubescheduler.config.k8s.io to v1betav1 2020-05-25 22:25:57 +01:00
Aldo Culquicondor
9819b25a44 Set weight of PodTopologySpread Score to 2
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-05-19 12:08:38 -04:00
Yecheng Fu
c14b749521 scheduler/volumebinding: move all volume binding logic into VolumeBinding plugin 2020-05-12 10:13:05 +08:00
Kubernetes Prow Robot
dd35908c7f
Merge pull request #89298 from gavinfish/scheuler-config-alph1
Remove kubescheduler.config.k8s.io/v1alpha1
2020-04-02 21:39:59 -07:00
notpad
52ad3d95f7 Add test for algorithm provider and policy config file 2020-03-24 23:18:32 +08:00
gavinfish
1865a104a9 Remove kubescheduler.config.k8s.io/v1alpha1 2020-03-21 15:11:48 +08:00
notpad
16015a691c Add test for kube-scheduler command setup 2020-03-20 07:36:47 +08:00