Commit Graph

56 Commits

Author SHA1 Message Date
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
Michael McCune 3169a1cd9b add field keys to cluster autoscaler unit test structs
A few of the unit test structures did not have field name keys when
using literal structs. This change adds the fields to make this code a
little more future-proof.
2021-05-25 12:53:21 -04: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
Yaroslava Serdiuk 8480c79ce0 change how DaemonSet utilization is calculated 2020-10-23 14:39:24 +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
Aleksandra Malinowska 9c5507eb95 pass list of destination names, not map 2020-03-09 14:15:16 +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
Jakub Tużnik 7a188ab50d Provide ScaleDownStatusProcessor with info about unremovable nodes 2020-02-11 15:27:33 +01:00
Łukasz Osipiuk 0dca11fa11 Remove InitializeClusterSnapshotNoError function 2020-02-04 20:52:02 +01:00
Łukasz Osipiuk d7770e3044 Use ClusterSnapshot in ScaleDown 2020-02-04 20:51:48 +01:00
Łukasz Osipiuk db85b1b6f1 Implement NewTestPredicateChecker 2020-02-04 20:51:20 +01:00
Łukasz Osipiuk 90a7e47123 Add GPU taint toleration for test pods requiring GPUs 2020-01-03 11:22:21 +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
Jiaxin Shan 83ae66cebc Consider GPU utilization in scaling down 2019-04-04 01:12:51 -07:00
Pengfei Ni 128729bae9 Move schedulercache to package nodeinfo 2019-02-21 12:41:08 +08:00
Alex Price 4ae7acbacc add flags to ignore daemonsets and mirror pods when calculating resource utilization of a node
Adds the flag --ignore-daemonsets-utilization and --ignore-mirror-pods-utilization
(defaults to false) and when enabled, factors DaemonSet and mirror pods out when
calculating the resource utilization of a node.
2018-11-23 15:24:25 +11:00
Jakub Tużnik 71111da20c Add a scale down status processor, refactor so that there's more scale down info available to it 2018-09-12 14:52:20 +02:00
Pengfei Ni be3dd85503 Update scheduler cache package 2018-06-11 13:54:12 +08:00
Marcin Wielgus 04bec08e84 Compilation fix 2018-03-20 20:11:36 +01:00
Aleksandra Malinowska 45356edf40 refactor FindNodesToRemove test 2017-09-06 14:39:42 +02:00
Aleksandra Malinowska ac0d8388bc use OwnerReferences instead of deprecated created by annotation 2017-08-29 17:26:38 +02:00
Maciej Pytel fa53e52ed9 Skip node in scale-down if it was recently found unremovable 2017-08-25 17:21:08 +02:00
Marcin Wielgus fc43808149 Godeps bump for CA 2017-07-03 22:05:11 +02:00
Maciej Pytel 6b2ea76973 Added UT for CA simulator 2017-04-19 19:12:30 +02:00
Marcin Wielgus 34eb4973f8 Fix imports in cluster autoscaler after migrating it from contrib 2017-04-18 15:42:04 +02:00
Marcin Wielgus b57ab3b48a Cluster-autoscaler: add NodeReadyPredicate and allow unready nodes in CA 2017-01-18 15:09:59 +01:00
Marcin Wielgus 7b63b6c1f1 Cluster-autoscaler: update code to compile with K8S 1.5 2016-12-13 17:22:57 +01:00
Marcin Wielgus 1cea91895d Cluster-autoscaler: delete empty nodes in bulk 2016-11-07 15:52:35 +01:00
Jan Chaloupka e028312170 Remove "All rights reserved" from all the headers 2016-09-08 13:02:39 +02:00
Marcin Wielgus 40b6e43dbe Cluster-autoscaler: shuffle nodes in scale down 2016-07-20 16:57:01 +02:00
Marcin Wielgus b29f771e0d Cluster-autoscaler: use node usage tracker for better utilization resets 2016-07-15 12:09:52 +02:00
Marcin Wielgus 6c74123879 Cluster-autoscaler: pod relocation hints 2016-07-14 11:45:03 +02:00
Filip Grzadkowski e7f1af7437 Rename reservation to utilization 2016-06-09 19:10:13 +02:00
Piotr Szczesniak bdb8987db6 Implemented unit test for FilterOutSchedulable function 2016-05-24 20:06:29 +02:00