Commit Graph

12 Commits

Author SHA1 Message Date
Kuba Tużnik 879c6a84a4 DRA: migrate all of CA to use the new internal NodeInfo/PodInfo
The new wrapper types should behave like the direct schedulerframework
types for most purposes, so most of the migration is just changing
the imported package.

Constructors look a bit different, so they have to be adapted -
mostly in test code. Accesses to the Pods field have to be changed
to a method call.

After this, the schedulerframework types are only used in the new
wrappers, and in the parts of simulator/ that directly interact with
the scheduler framework. The rest of CA codebase operates on the new
wrapper types.
2024-11-05 16:43:43 +01:00
Bartłomiej Wróblewski 9604756004 Sanitize taints before scheduling DSs on template node infos 2023-04-19 14:23:42 +00:00
Bartłomiej Wróblewski b8d40fdd3c Add status taints option to template creation 2023-04-19 13:55:38 +00:00
Benjamin Pineau 8485cf2052 Move GetNodeInfosForGroups to it's own processor
Supports providing different NodeInfos sources (either upstream or in
local forks, eg. to properly implement variants like in #4000).

This also moves a large and specialized code chunk out of core, and removes
the need to maintain and pass the GetNodeInfosForGroups() cache from the side,
as processors can hold their states themselves.

No functional changes to GetNodeInfosForGroups(), outside mechanical changes
due to the move: remotely call a few utils functions in core/utils package,
pick context attributes (the processor takes the context as arg rather than
ListerRegistry + PredicateChecker + CloudProvider), and use the builtin cache
rather than receiving it from arguments.
2021-08-16 19:43:10 +02:00
Brett Elliott 5cf64a2b3c Update vendor to v1.22.0-alpha.1 2021-05-20 22:02:41 +02:00
Bartłomiej Wróblewski 0fb897b839 Update imports after scheduler scheduler/framework/v1alpha1 removal 2020-11-30 10:48:52 +00:00
Jakub Tużnik 73a5cdf928 Address recent breaking changes in scheduler
The following things changed in scheduler and needed to be fixed:
* NodeInfo was moved to schedulerframework
* Some fields on NodeInfo are now exposed directly instead of via getters
* NodeInfo.Pods is now a list of *schedulerframework.PodInfo, not *apiv1.Pod
* SharedLister and NodeInfoLister were moved to schedulerframework
* PodLister was removed
2020-04-24 17:54:47 +02:00
Julien Balestra 628128f65e cluster-autoscaler/taints: refactor current taint logics in the same package
Signed-off-by: Julien Balestra <julien.balestra@datadoghq.com>
2020-02-25 13:57:23 +01:00
Łukasz Osipiuk db85b1b6f1 Implement NewTestPredicateChecker 2020-02-04 20:51:20 +01:00
Łukasz Osipiuk b01f2fca8f Drop ConfigurePredicateCheckerForLoop 2020-02-04 20:51:14 +01:00
Maciej Pytel a7fd937112 Remove taints with specific prefix from template node
This is the same functionality as what you get with --ignore-taint
flag, but it doesn't require updating CA config to add a new taint
to ignore.
2020-01-14 13:21:17 +01:00
Łukasz Osipiuk 7f083d2393 Move core/utils.go to separate package and split into multiple files 2019-10-22 14:23:40 +02:00