Commit Graph

110 Commits

Author SHA1 Message Date
Yaroslava Serdiuk d1a89cf5ed Put risky NodeToRemove in the end of needDrain list 2022-12-06 15:11:16 +00:00
Yaroslava Serdiuk 94f1920265 Use PdbRemainingDisruptions in Planner 2022-12-06 15:11:08 +00:00
Bartłomiej Wróblewski 10d3f25996 Use scheduling package in filterOutSchedulable processor 2022-11-23 12:32:59 +00:00
Yaroslava Serdiuk 92bba5c93f Allow forking snapshot more than 1 time 2022-11-16 14:19:30 +00:00
Kubernetes Prow Robot a703c3f6cf
Merge pull request #5230 from x13n/scaledown6
Base parallel scale down implementation
2022-10-25 03:18:35 -07:00
Daniel Kłobuszewski accf58f36c Base parallel scale down implementation 2022-10-24 20:14:48 +02:00
Daniel Kłobuszewski 585ad02c04 Remove dead code for handling simulation errors 2022-10-20 14:20:35 +02:00
Daniel Kłobuszewski 92f5b8673e Extract scheduling hints to a dedicated object
This removes the need for passing maps back and forth when doing
scheduling simulations.
2022-10-20 11:44:15 +02:00
Daniel Kłobuszewski 18f2e67c4f Split out code from simulator package 2022-10-18 11:51:44 +02:00
Alexandru Matei 0ee2a359e7 Add option to wait for a period of time after node tainting/cordoning
Node state is refreshed and checked again before deleting the node
It gives kube-scheduler time to acknowledge that nodes state has
changed and to stop scheduling pods on them
2022-10-13 10:37:56 +03:00
Daniel Kłobuszewski 28548705f8 Allow simulator to persist changes in cluster snapshot 2022-09-15 16:18:57 +02:00
mikelo c127763a45 switched policy for PodDisruptionBudget from v1beta1 to v1 in time for 1.25 2022-06-24 19:13:03 +02:00
Daniel Kłobuszewski 07a8d38933 Allow checking specific nodes removal in simulator
Wraps simulator functions into an object, so that there's no need to
pass around parametrs that are not changing between CA loop iterations.
2022-05-06 15:49:34 +02:00
Daniel Kłobuszewski 358f3a9218 Extract utilization info to a separate package 2022-04-26 08:48:45 +02:00
Daniel Gutowski 8064d6d1fd Introduce the scale down processor that picks the final scale down candidates. 2022-01-03 16:05:36 +00:00
david.benque 2529b667c5 ignoring terminated pods in scaledown 2020-12-21 16:22:50 +01:00
Kubernetes Prow Robot 9835d59e28
Merge pull request #3749 from yaroslava-serdiuk/DS_utilization
subtract mirror pod utilization with ds utilization from node allocatable
2020-12-16 05:36:22 -08:00
Yaroslava Serdiuk 8a94cec938 substract mirror pod utilization with daemonset utilization from node allocatable + modify tests 2020-12-16 10:49:41 +00:00
Kubernetes Prow Robot aa9367f56f
Merge pull request #3701 from yaroslava-serdiuk/DS_evict
add daemonset eviction for non-empty nodes
2020-11-30 05:02:49 -08:00
Yaroslava Serdiuk dcf0970208 add daemonset eviction for non-empty nodes 2020-11-30 11:53:16 +00: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 d945ca7eed
Merge pull request #3641 from yaroslava-serdiuk/DS2
change how DaemonSet utilization is calculated
2020-10-29 10:52:06 -07:00
Yaroslava Serdiuk 8480c79ce0 change how DaemonSet utilization is calculated 2020-10-23 14:39:24 +00:00
Vivek Bagade 1f95298899 Ensure CA simulator takes existing nodes into account in findPlaceFor method 2020-10-16 15:14:26 +02:00
Maciek Pytel 2ae13f561b Use FitsAny in drain simulation
This is the scale-down equivalent of #3429 and it speeds-up
findUnneeded by 5x+ in very large clusters (by reducing the
number of expensive PreFilter calls #nodes times).

A side effect of this change is removing
"Simulating scheduling of <pod> to <node> return error <error>"
logs. Using FitsAny we no longer have per-node scheduler errors
that we could log. I think that's actually a good thing - even
with klogx this log was incredibly spammy in cluster with >100
nodes and its practical value was questionable.
2020-09-02 14:26:02 +02:00
Maciek Pytel 9fb6cdc079 Fix go fmt errors 2020-06-08 13:52:24 +02:00
Maciek Pytel 2160e6d49e Rewrite glogx to work with klogv2 (+rename klogx) 2020-06-05 17:22:26 +02:00
Maciek Pytel 655b4081f4 Migrate to klog v2 2020-06-05 17:22:26 +02: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
Aleksandra Malinowska 14c5ca44a8 fix typo in snapshot var name 2020-03-10 11:36:57 +01:00
Aleksandra Malinowska 9c5507eb95 pass list of destination names, not map 2020-03-09 14:15:16 +01:00
Aleksandra Malinowska 4691f1ccea skip node if node info not found 2020-03-09 13:45:11 +01:00
Aleksandra Malinowska 38a920c423 pass names of destinations to find nodes to remove 2020-03-05 16:09:51 +01:00
Aleksandra Malinowska d53cd35818 pass node names instead of node infos to find nodes to remove 2020-03-05 12:07:36 +01:00
Aleksandra Malinowska 0b7c45e88a stop passing scheduled pods around 2020-03-03 16:23:49 +01:00
Aleksandra Malinowska d11b39603d pass node infos to simulator 2020-03-03 16:23:49 +01:00
Aleksandra Malinowska 5d44b202bc Forget FakeNodeInfoForNodeName ever existed 2020-02-21 15:36:21 +01:00
Kubernetes Prow Robot af1dd84305
Merge pull request #2799 from aleksandra-malinowska/delta-snapshot-4
Add delta snapshot implementation
2020-02-14 09:20:17 -08:00
Jakub Tużnik 7a188ab50d Provide ScaleDownStatusProcessor with info about unremovable nodes 2020-02-11 15:27:33 +01:00
Aleksandra Malinowska de631034c0 Pass node name when removing pod from snapshot 2020-02-10 17:28:06 +01:00
Łukasz Osipiuk 7b67d3f582 klog.Fatalf on error from ClusterSnapshot.Revert() 2020-02-04 20:52:07 +01:00
Łukasz Osipiuk d7770e3044 Use ClusterSnapshot in ScaleDown 2020-02-04 20:51:48 +01:00
Łukasz Osipiuk 6b2287af4f Pass ClusterSnaphost explicitly to PredicateChecker 2020-02-04 20:51:24 +01:00
Łukasz Osipiuk 373c558303 Extract PredicateChecker interface 2020-02-04 20:51:18 +01:00
Łukasz Osipiuk b0c6d25182 Cleanup simulator.PredicateError 2020-02-04 20:51:11 +01:00
Łukasz Osipiuk 4a2b8c7dfc Remove use of PredicateMetadata 2020-02-04 20:51:05 +01:00
Taylor Barrella b0f05c6542 Uniformize node shuffling when finding nodes to remove
Previously, the shuffling was biased
2020-01-31 23:28:32 -08:00
Łukasz Osipiuk 3470a9f1c0 Migrate scheduler creation to scheduler.New() 2019-11-22 14:07:29 +01:00
cedric lamoriniere f0fbf7a87a [cluster-autoscaler] Allow “custom” DaemonSet pods
* Create `utils/pod` package: pod kind detection functions.
* Update DaemonSet Pod detection logic: introduce the annotation
  `cluster-autoscaler.kubernetes.io/daemonset-pod` to declare a Pod as a
  DaemonSet Pod.
* Update `simulator` package to use the new `utils/pod` package function.
* Cleanup `getRequiredPodsForNode()` function.

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2019-11-06 11:23:23 +01:00
Vivek Bagade dc64d0aab2 Adding ScaleDownNodeProcessor 2019-08-12 20:19:55 +02:00