Commit Graph

206 Commits

Author SHA1 Message Date
Patrick Ohly
bde9b64cdf DRA: remove "source" indirection from v1 Pod API
This makes the API nicer:

    resourceClaims:
    - name: with-template
      resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      resourceClaimName: test-shared-claim

Previously, this was:

    resourceClaims:
    - name: with-template
      source:
        resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      source:
        resourceClaimName: test-shared-claim

A more long-term benefit is that other, future alternatives
might not make sense under the "source" umbrella.

This is a breaking change. It's justified because DRA is still
alpha and will have several other API breaks in 1.31.
2024-06-27 17:53:24 +02:00
Kubernetes Prow Robot
68091805a5
Merge pull request #124785 from kerthcet/cleanup/deprecate-wait-pull
Avoid to use deprecated wait.Poll in scheduler tests
2024-05-22 01:17:30 -07:00
AxeZhan
b5f25c41ce add an integration test when nodeAffinity specifies a non-existent node. 2024-05-18 05:00:59 +08:00
kerthcet
f5b6f79410 Avoid to use deprecated wait.Poll in scheduler tests
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-05-10 14:17:09 +08:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
Kubernetes Prow Robot
441d4b54ae
Merge pull request #120397 from ty-dc/StaticCheck
cleanup: omit comparison with bool constants
2023-10-24 05:25:52 +02:00
Patrick Ohly
7cac1dcf67 dra scheduler: fall back to SSA for PodSchedulingContext updates
During scheduler_perf testing, roughly 10% of the PodSchedulingContext update
operations failed with a conflict error. Using SSA would avoid that, but
performance measurements showed that this causes a considerable
slowdown (primarily because of the slower encoding with JSON instead of
protobuf, but also because server-side processing is more expensive).

Therefore a normal update is tried first and SSA only gets used when there has
been a conflict. Using SSA in that case instead of giving up outright is better
because it avoids another scheduling attempt.
2023-09-15 15:05:38 +02:00
tao.yang
b35357b6c0 cleanup: omit comparison with bool constants
Signed-off-by: tao.yang <tao.yang@daocloud.io>
2023-09-05 10:24:38 +08:00
SataQiu
ef7d404702 using wait.PollUntilContextTimeout instead of deprecated wait.Poll for pkg/scheduler
using wait.PollUntilContextTimeout instead of deprecated wait.Poll for test/integration/scheduler

using wait.PollUntilContextTimeout instead of deprecated wait.Poll for test/e2e/scheduling

using wait.ConditionWithContextFunc for PodScheduled/PodIsGettingEvicted/PodScheduledIn/PodUnschedulable/PodSchedulingError
2023-08-17 17:25:09 +08:00
kerthcet
47ef977ddd Direct reference to the packages
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-07-08 12:03:46 +08:00
Kante Yin
859359ad6a Fix strict linting
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:25:10 +08:00
Kante Yin
2d866ec2fc Teardown only scheduler in integration tests
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:09:24 +08:00
Kante Yin
666605498a Replace deprecated pointer function
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2022-12-26 22:06:44 +08:00
kerthcet
26ad401b7a Remove unuseful multi scheduler testcases
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-10-20 15:15:49 +08: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
Wojciech Tyczyński
8a959396b8 Clean shutdown of volumescheduling integration tests 2022-05-28 21:14:09 +02:00
Antonio Ojea
3bb965b651 merge test integration scheduler util 2022-05-06 11:27:11 +02:00
Abdullah Gharaibeh
6d499ee9ea Correct event registration for multiple scheduler plugins. 2022-04-12 18:32:24 -04: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
283b176102 [test]: modify integration tests to use v1beta3 2021-10-07 10:58:07 -04:00
Wei Huang
a689ad4cda
sched: start dynamicInformerFactory along with regular informerFactory (#105016)
* sched: start dynamicInformerFactory along with regular informerFactory

* fixup: start all informers and then wait for their syncs
2021-09-16 19:33:00 -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
52f5ba3a58 Remove SchedulerAlgorithmSource from scheduler's internal CC API 2021-06-09 19:14:54 -04:00
Mengjiao Liu
387154f1a9 Part3: master to controlplane in test/integration
Rename RunAMaster to RunAControlPlane
2021-06-03 11:06:19 +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
185093bd4e
Set 0 sync period in scheduler integration test 2020-11-11 12:56:13 -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
Wei Huang
a146cb0aa0
Replace calls to cs.CoreV1().Nodes().Create() with createNode() 2020-11-03 15:25:44 -08:00
Wei Huang
f054765762
Add a function to ensure created nodes are present in scheduler cache 2020-11-03 15:25:44 -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
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
Chelsey Chen
ade2422883 Switch event recorder to use events.k8s.io/v1 2020-07-02 14:50:41 -04:00
Andrea Nodari
2e1042f959 Use NodeWrapper to directly initialize node with labels
Using NodeWrapper in the integration tests gives more flexibility when
creating nodes. For instance, tests can create nodes with labels or
with a specific sets of resources.

Also, NodeWrapper initialises a node with a capacity of 32 pods, which
can be overridden by the caller. This makes sure that a node is usable
as soon as it is created.
2020-06-30 17:18:15 +02: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
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
Amim Knabben
5e679cf51f Scheduler integration tests standarization 2020-06-07 09:47:11 -04:00
Kubernetes Prow Robot
4e3dea81c1
Merge pull request #91580 from cofyc/fix90958
Remove KubeSchedulerConfiguration.BindTimeoutSeconds
2020-06-05 08:45:45 -07:00
Wei Huang
7f178b2831
Adjust weight of PodTopologySpread to 2 in legacy Policy API 2020-06-04 07:35:25 -07:00
Yecheng Fu
1ff09c0934 Remove BindTimeoutSeconds from KubeSchedulerConfiguration 2020-06-03 09:54:06 +08:00
Kubernetes Prow Robot
6cf4ab3c8c
Merge pull request #91071 from alculquicondor/integration_new_node
Add test case for a pod becoming schedulable when a node is added
2020-05-19 15:22:33 -07:00
Kubernetes Prow Robot
5bda0c1b3b
Merge pull request #83726 from cofyc/fix56180
scheduler: Move all volume binding code into VolumeBinding plugin
2020-05-14 10:08:23 -07:00
Aldo Culquicondor
35b9ab1227 Remove unnecessary clientset arg from initPausePod
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-05-14 11:47:12 -04:00
Jan Chaloupka
65e9826f79 integration: start informer and scheduler outside of InitTestScheduler
In case two or more controllers share the informers created through InitTestScheduler,
it's not safe to start the informers until all controllers set their informer
indexers. Otherwise, some controller might fail to register their indexers
in time. Thus, it's responsibility of each consumer to make sure all informers
are started after all controllers had time to get initiliazed.
2020-05-13 18:19:43 +02:00
Yecheng Fu
c14b749521 scheduler/volumebinding: move all volume binding logic into VolumeBinding plugin 2020-05-12 10:13:05 +08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
fengzixu
b67a033de2 Refactor: move generic functions of integration test to util directory 2020-02-29 14:56:39 +09: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