1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00
Commit Graph

17 Commits

Author SHA1 Message Date
googs1025
257bd55909 standardize protectionEnabled param 2025-08-19 17:52:54 +08:00
googs1025
9c7e01de67 feature: add PodsWithResourceClaims parameter in DefaultEvictorArgs PodProtections
Signed-off-by: googs1025 <googs1025@gmail.com>
2025-08-13 20:35:36 +08:00
googs1025
d9697591d5 add EvictionProtection filed for DefaultEvictorArgs
Signed-off-by: googs1025 <googs1025@gmail.com>
2025-08-04 19:34:16 +08:00
Jan Chaloupka
7380aa6e0a DefaultEvictor: introduce no-eviction policy
NoEvictionPolicy dictates whether a no-eviction policy is prefered or mandatory.
Needs to be used with caution as this will give users ability to protect their pods
from eviction. Which might work against enfored policies. E.g. plugins evicting pods
violating security policies.
2025-07-24 15:47:05 +02:00
Jan Chaloupka
6e9d8891c5 defaultevictor_test.go: replace descheduler.alpha.kubernetes.io/evict literal with evictPodAnnotationKey const 2025-07-24 12:48:00 +02:00
Jan Chaloupka
5cc9e68127 Drop assignment if default test values 2025-07-24 12:04:07 +02:00
Jan Chaloupka
1974c12e0f Extend plugin's New with a context.Context
The new context.Context can be later used for passing a contextualized
logger. Or, other initialization steps that require the context.
2025-05-19 12:23:44 +02:00
googs1025
3440abfa41 chore: add ignorePvcPods flag in default evictor filter unit test 2025-01-07 15:27:28 +08:00
Simon Scharf
ef0c2c1c47 add ignorePodsWithoutPDB option (#1529)
* add ignoreNonPDBPods option

* take2

* add test

* poddisruptionbudgets are now used by defaultevictor plugin

* add poddisruptionbudgets to rbac

* review comments

* don't use GetPodPodDisruptionBudgets

* review comment, don't hide error
2024-10-15 21:21:04 +01:00
Victor Gonzalez
55a0812ae6 skip eviction when pod creation time is below minPodAge threshold setting (#1475)
* skip eviction when pod creation time is below minPodAge threshold setting

In the default initialization phase of the descheduler, add a new
constraint to not evict pods that creation time is below minPodAge
threshold.

Added value:

- Avoid crazy pod movement when the autoscaler scales up and down.

- Avoid evicting pods when they are warming up.

- Decreases the overall cost of eviction as no pod will be evicted
  before doing significant amount of work.

- Guard against scheduling. Descheduling loops in situations where
  the descheduler has a different node fit logic from scheduler,
  like not considering topology spread constraints.

* Use *time.Duration instead of uint for MinPodAge type

* Remove '(in minutes)' from default evictor configuration table

* make fmt

* Add explicit name for Duration field

* Use Duration.String()
2024-07-26 05:59:21 -07:00
Amir Alavi
7ab36daaec fix: indexer cache error when default evictor is re-initialized
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2024-06-28 00:34:55 -04:00
Amir Alavi
37df42df7c skip eviction when replica count is below evictor minReplicas threshold setting
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2024-03-13 09:29:27 -04:00
Jan Chaloupka
757661110a Move framework types under framework/types 2023-03-23 19:00:55 +01:00
Furkan
99868a41de run: gofumpt -w -extra .
Enable gofumpt in golangci

Signed-off-by: Furkan <furkan.turkal@trendyol.com>
2022-11-07 09:11:27 +03:00
sunxiaofei
c10e6d6c12 fix sharedInformerFactory register 2022-09-22 16:02:13 +08:00
Lucas Severo Alves
edec8fe010 add PreEvictionFilter extension to DefaultEvictor Plugin 2022-09-20 17:29:41 +02:00
Lucas Severo Alves
f47c2c4407 add new preevectionfilter plugin with args 2022-09-12 16:56:21 +02:00