Commit Graph

18 Commits

Author SHA1 Message Date
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
Bartłomiej Wróblewski 1e4cb1eafe Move UpdateDeprecatedTemplateLabels function
This is a useful function, we will benefit from
having it more accessible then it is currently.
2021-08-04 14:32:39 +00:00
Alexander Block 8f11490c0c Introduce UpdateDeprecatedTemplateLabels to set beta/deprecated labels
And at the same time only set stable labels in all buildGenericLabels
implementations.

This fixes issues when a node group has 0 nodes yet and node labels are
built using buildGenericLabels and the node-template labels.

Issues include (anti-)affinity and nodeSelectors for the given labels,
giving false-negative results for candidate nodes, which leads to ASGs
never scaling up.
2021-07-29 16:45:08 +02:00
Brett Elliott 5cf64a2b3c Update vendor to v1.22.0-alpha.1 2021-05-20 22:02:41 +02:00
Vivek Bagade 8c592f0c04 Fix bug where a node that becomes ready after 2 mins can be
treated as unready. Deprecated LongNotStarted

 In cases where node n1 would:
 1) Be created at t=0min
 2) Ready condition is true at t=2.5min
 3) Not ready taint is removed at t=3min
 the ready node is counted as unready

 Tested cases after fix:
 1) Case described above
 2) Nodes not starting even after 15mins still
 treated as unready
 3) Nodes created long ago that suddenly become unready are
 counted as unready.
2021-03-11 18:32:51 +01:00
Bartłomiej Wróblewski 0fb897b839 Update imports after scheduler scheduler/framework/v1alpha1 removal 2020-11-30 10:48:52 +00:00
Kubernetes Prow Robot 736c624181
Merge pull request #3152 from knight42/fix/exclude-virtual-kubelet
Exclude the virtual node from nodes not created by auto scaling group
2020-10-22 04:55:35 -07:00
Maciek Pytel 655b4081f4 Migrate to klog v2 2020-06-05 17:22:26 +02:00
knight42 056ffe2268
fix: exclude the virtual node 2020-05-25 01:05:50 +08: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
Julien Balestra af270b05f6 cluster-autoscaler/taints: ignore taints on existing nodes
Signed-off-by: Julien Balestra <julien.balestra@datadoghq.com>
2020-02-25 13:55:17 +01:00
Łukasz Osipiuk 57615ba0b0 Use ClusterSnapshot in GetDaemonSetPodsForNode 2020-02-04 20:51:46 +01:00
Łukasz Osipiuk 373c558303 Extract PredicateChecker interface 2020-02-04 20:51:18 +01:00
Łukasz Osipiuk b01f2fca8f Drop ConfigurePredicateCheckerForLoop 2020-02-04 20:51:14 +01:00
Aleksandra Malinowska d6849e82b6 Simplify equivalence group usage 2020-01-15 19:40:45 +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