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

190 Commits

Author SHA1 Message Date
Amir Alavi
4750dc19e6 [v0.33.0] update docs and manifests
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2025-05-01 22:06:04 -04:00
dongjiang
a249c9baf0 update k8s to v1.33
Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-04-30 22:07:02 +08:00
Jan Chaloupka
c2ed7eb575 TestLowNodeUtilizationKubernetesMetrics: set the right -cpu value for the cpu stressor 2025-04-07 10:49:04 +02:00
Jan Chaloupka
e14b86eb8c [nodeutilization]: allow to set a metrics source as a string so it can be later extended for exclusive configuration 2025-03-13 18:00:27 +01:00
googs1025
6100c914b4 fix: rollback gracePeriod for evict pod in e2e test 2025-01-09 22:29:05 +08:00
googs1025
e6d0caa1bc feature(descheduler): add grace_period_seconds for DeschedulerPolicy 2025-01-07 10:16:47 +08:00
Amir Alavi
da65808f77 [release v0.32] update kubernetes kind version to 1.32
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2024-12-27 12:07:32 -06:00
Sean Malloy
b66b5d35f0 Bump kind to v0.26.0
The new kind version defaults to k8s v1.32.0 version when creating
new clusters.
2024-12-16 22:28:54 -06:00
Sean Malloy
697ecc79e4 Bump kind version to v0.25.0 2024-12-05 22:32:46 -06:00
Jan Chaloupka
6567f01e86 [nodeutilization]: actual usage client through kubernetes metrics 2024-11-20 14:30:46 +01:00
Jan Chaloupka
3a1a3ff9d8 Introduce RequestEviction feature for evicting pods in background
When the feature is enabled each pod with descheduler.alpha.kubernetes.io/request-evict-only
annotation will have the eviction API error examined for a specific
error code/reason and message. If matched eviction of such a pod will be interpreted
as initiation of an eviction in background.
2024-11-19 15:28:37 +01: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
Jan Chaloupka
3e6166666b test: construct e2e deployments through buildTestDeployment 2024-10-01 15:23:44 +02:00
Kubernetes Prow Robot
e1e537de95 Merge pull request #1522 from fanhaouu/e2e-leaderelection
[LeaderElection] e2e: build a descheduler image and run the descheduler as a pod
2024-10-01 08:23:53 +01:00
Kubernetes Prow Robot
8e762d2585 Merge pull request #1523 from fanhaouu/e2e-topologyspreadconstraint
[TopologySpreadConstraint] e2e: build a descheduler image and run the descheduler as a pod
2024-09-30 20:37:32 +01:00
Kubernetes Prow Robot
042fef7c91 Merge pull request #1521 from fanhaouu/e2e-failedpods
[FailedPods] e2e: build a descheduler image and run the descheduler as a pod
2024-09-30 20:37:24 +01:00
Hao Fan
e0a8c77d0e e2e: DuplicatePods: build a descheduler image and run the descheduler as a pod 2024-09-23 19:37:56 +08:00
Hao Fan
05ce561a06 e2e: FailedPods: build a descheduler image and run the descheduler as a pod 2024-09-23 19:36:53 +08:00
Hao Fan
8b6a67535f remove policy_leaderelection yaml file 2024-09-23 19:36:01 +08:00
Hao Fan
0ac05f6ea3 e2e: LeaderElection: build a descheduler image and run the descheduler as a pod 2024-09-23 19:35:33 +08:00
Hao Fan
af495e65f7 e2e: TopologySpreadConstraint: build a descheduler image and run the descheduler as a pod 2024-09-23 19:33:59 +08:00
Hao Fan
d25cba08a9 [e2e] abstract common methods 2024-09-19 21:51:11 +08:00
Kubernetes Prow Robot
b35e93ec7a Merge pull request #1510 from Juneezee/chore/yaml
chore: replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml`
2024-09-09 10:08:27 +01:00
Eng Zer Jun
33868c44df chore: replace github.com/ghodss/yaml with sigs.k8s.io/yaml
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-09-08 23:48:16 +08:00
Hao Fan
ab6a3ca2d6 avoid e2e test timeout 2024-09-04 01:26:30 +08:00
Hao Fan
fdd69106a3 modify IMAGE_TAG to fix the version parsing issue 2024-09-04 01:26:20 +08:00
Amir Alavi
0cf1fc906e descheduler v0.31: update e2e test versions
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2024-08-28 23:04:59 -04:00
Kubernetes Prow Robot
c0c26e762b Merge pull request #1483 from ingvagabund/dedup-framework-init
tests: de-duplicate framework handle initialization
2024-08-14 01:20:26 -07:00
Jan Chaloupka
cbade38d23 [tests] de-duplicate framework handle initialization 2024-08-12 17:05:30 +02:00
Jan Chaloupka
1e0b1a9840 Remove descheduler/v1alpha1 type 2024-08-09 09:49:59 +02:00
Kubernetes Prow Robot
2189fe4479 Merge pull request #1474 from ingvagabund/e2e-build-and-run-descheduler-image
[TestTooManyRestarts] e2e: build a descheduler image and run the descheduler as a pod
2024-08-04 11:58:38 -07:00
Jan Chaloupka
e4c361d902 e2e: build a descheduler image and run the descheduler as a pod 2024-08-04 12:06:01 +02:00
Kubernetes Prow Robot
601f213b4f Merge pull request #1469 from ingvagabund/e2e-fix-leaderelection
e2e: TestLeaderElection: delete the lease and increase the retry period
2024-07-29 20:01:28 -07:00
Jan Chaloupka
d2bd573cdb e2e: TestLeaderElection: delete the lease and increase the retry period
In some random cases none of the deschedulers acquires a lease.
Making the test fail.
2024-07-22 17:24:56 +02:00
Kubernetes Prow Robot
95ef2bbec3 Merge pull request #1471 from ingvagabund/e2e-duplicates
e2e: TestRemoveDuplicates: limit the tested namespace
2024-07-21 08:55:18 -07:00
Jan Chaloupka
ab467a5dd2 e2e: TestTooManyRestarts: run descheduler as a whole instead of a single plugin 2024-07-19 11:10:19 +02:00
Jan Chaloupka
f66efaf8db e2e: TestRemoveDuplicates: limit the tested namespace
RemoveDuplicates is namespaced scope. Limiting the namespace will avoid
unexpected evictions from other namespaces.
2024-07-19 09:25:20 +02:00
Emin Aktas
f8e128d862 refactor: replace k8s.io/utils/pointer with k8s.io/utils/ptr
Signed-off-by: Emin Aktas <eminaktas34@gmail.com>
2024-07-11 11:36:34 +03:00
Amir Alavi
e26f6429a2 feat: pod evictor options 2024-07-05 21:40:55 -04:00
Jan Chaloupka
287d1b1573 test: generate uid when building a pod
UID is an integral part of every pod.
Even though we don't test for UID in any of the existing test cases,
future test cases might rely on it.
2024-07-02 14:30:42 +02:00
Jan Chaloupka
0901cb18bf NewPodEvictor: drop nodes parameter 2024-06-22 15:08:00 +02:00
googs1025
9fea59821f refactor e2e test 2024-06-18 22:48:53 +08:00
Amir Alavi
fca4a0970f [release 1.30] upgrade kubernetes version and docs
Signed-off-by: Amir Alavi <amir.alavi@zendesk.com>
2024-05-14 14:17:34 -04:00
Gabriel Tiossi
82559025b1 Allow eviction of DaemonSet pods (#1342)
* feat: evictDaemonSetPods flag for evictors

* test: evictDaemonSetPods unit and e2e

* docs: evictDaemonSetPods
2024-04-09 07:47:34 -07: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
Niki Manoledaki
749e81c51c Check whether pod matches the inter-pod anti-affinity of another Pod in a given Node in NodeFit() (#1356)
* Check if Pod matches inter-pod anti-affinity of other pod on node as part of NodeFit()

* Add unit tests for checking inter-pod anti-affinity match in NodeFit()
* Export setPodAntiAffinity() helper func to test utils

* Add docs for inter-pod anti-affinity in README

* Refactor logic for inter-pod anti-affinity to use in multiple pkgs
* Move logic for finding match between pods with antiaffinity out of framework to reuse in other pkgs
* Move interpod antiaffinity funcs to pkg/utils/predicates.go

* Add unit tests for inter-pod anti-affinity check
* Test logic in GroupByNodeName
* Test NodeFit() case where pods matches inter-pod anti-affinity
* Test for inter-pod anti-affinity pods  match terms, have label selector

* NodeFit inter-pod anti-affinity check returns early if affinity spec not set
2024-03-12 19:50:03 -07:00
Amir Alavi
e5e931d333 kubernetes 1.29: update deps and go-version
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2023-12-20 23:15:07 -05:00
Amir Alavi
bf2bd73f64 topologyspreadconstraint: refactor to match scheduler's struct and initialization
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2023-10-30 09:16:14 -04:00
Amir Alavi
704a82bcf4 topologyspreadconstraint: support matchLabelKeys
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2023-10-30 09:16:14 -04:00
Amir Alavi
99246cd254 topologySpreadConstraints: handle nodeTaintsPolicy and nodeAffinityPolicy constraints (#1218)
* Add handling for node eligibility

* Make tests buildable

* Update topologyspreadconstraint.go

* Updated test cases failing

* squashed changes for test case addition

corrected function name

refactored duplicate TopoContraint check logic

Added more test cases for testing node eligibility scenario

Added 5 test cases for testing scenarios related to node eligibility

* topologySpreadConstraints e2e: `nodeTaintsPolicy` and `nodeAffinityPolicy` constraints

---------

Co-authored-by: Marc Power <marcpow@microsoft.com>
Co-authored-by: nitindagar0 <81955199+nitindagar0@users.noreply.github.com>
2023-08-24 08:32:21 -07:00