Kubernetes Prow Robot
9d16c28f43
Merge pull request #1456 from ingvagabund/limit-exceeded-to-error
...
PodEvictor: turn an exceeded limit into an error
2024-07-08 06:25:06 -07:00
googs1025
db0df6c6ca
fix: add info for error return
2024-07-07 21:16:52 +08:00
Jan Chaloupka
18d0e4a540
PodEvictor: turn an exceeded limit into an error
...
When checking for node limit getting exceeded the pod eviction
never fails. Thus, ignoring the metric reporting when a pod fails
to be evicted due to node limit constrains.
The error also allows plugin to react on other limits getting
exceeded. E.g. the limit on the number of pods evicted per namespace.
2024-07-06 20:14:43 +02:00
Kubernetes Prow Robot
7657345079
Merge pull request #1452 from a7i/defaultevictor-reinit
...
fix: indexer cache error when default evictor is re-initialized
2024-07-06 04:30:53 -07:00
Amir Alavi
e26f6429a2
feat: pod evictor options
2024-07-05 21:40:55 -04: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
Kubernetes Prow Robot
f2be3fd414
Merge pull request #1436 from fanhaouu/feat-return-node-fit-error
...
return node fit error in advance
2024-06-27 10:54:41 -07:00
googs1025
cfa6845a19
refactor: PodMatchNodeSelector method
2024-06-27 22:10:41 +08:00
Hao Fan
8a2b2eb37c
return node fit error in advance
2024-06-26 17:18:32 +08:00
Kubernetes Prow Robot
972d28108a
Merge pull request #1447 from ingvagabund/refactorings
...
PodEvictor: refactoring and preparation for eviction requests
2024-06-25 01:08:44 -07:00
Kubernetes Prow Robot
f294d953a3
Merge pull request #1445 from zhifei92/fix-unit-test
...
Unit-test: add necessary ownerRef to the pod.
2024-06-25 00:15:40 -07:00
Jan Chaloupka
fadef326ff
TestPodEvictorReset: check the dry mode evicts duplicated pods
2024-06-23 20:30:36 +02:00
Jan Chaloupka
f5060adcd1
Move fake client from the cachedClient function
...
Remove the fakeClient from cachedClient function so a different
fakeClient can be injected for testing purposes
2024-06-23 19:59:46 +02:00
Jan Chaloupka
75880226c0
Set up the pod evictor only once
...
Currently, the pod evictor is created during each descheduling cycle
to reset the internal counters and the fake client (in case a dry run is
configured). Instead, create the pod evictor once and reset only what's
needed. So later on the pod evictor can be extended with e.g. a cache
keeping the track of eviction requests that are still in progress and
required more than a single descheduling cycle to complete.
2024-06-23 19:24:27 +02:00
Jan Chaloupka
0901cb18bf
NewPodEvictor: drop nodes parameter
2024-06-22 15:08:00 +02:00
googs1025
6fdee47cbc
fix: return the unmatched cases first, then perform the eviction
2024-06-22 18:16:40 +08:00
zhifei92
ae15fed7e7
fix(unit-test): add necessary ownerRef to the pod.
2024-06-21 19:12:40 +08:00
Kubernetes Prow Robot
cdbd101eae
Merge pull request #1438 from googs1025/clean_up_nodelister
...
chore: cleanup duplicated code
2024-06-20 07:07:16 -07:00
googs1025
0e2478ac41
add validation ut
2024-06-13 11:56:33 +08:00
googs1025
ec33490314
chore: cleanup duplicated code
2024-06-12 08:56:13 +08:00
Hao Fan
fd7fcbddfe
return pod qos in advance
2024-06-10 00:22:17 +08:00
Mike Dame
d699454d5e
Bump otel semconv to 1.24
2024-06-06 13:05:55 +00:00
Hao Fan
c80556fc91
fix the issue that the pod anti-filtering rules are not taking effect
2024-06-02 18:58:57 +08:00
Yuan Chen
25b9edae3c
Add an extra parameter ExitCode to RemoveFailedPod
...
Update README.md
Fix README and test files
Update README
Address a7i's comments
Update README
2024-05-02 17:11:50 -07: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
Kubernetes Prow Robot
970b35d737
Merge pull request #1369 from fanhaouu/feat-avoid-defaultEvictorArgs-conversion-twice
...
avoid redundant type conversion of DefaultEvictorArgs parameter in DefaultEvictor
2024-04-03 18:58:17 -07:00
Kubernetes Prow Robot
364f467421
Merge pull request #1365 from ls-2018/master
...
`RemoveDuplicates`: reduce cycle times identifying duplicates
2024-04-03 18:58:10 -07:00
Hao Fan
7f20b5c891
fix: avoid redundant type conversion of DefaultEvictorArgs parameters in DefaultEvictor
...
Signed-off-by: Hao Fan <hao.fan@shopee.com >
2024-03-28 15:25:42 +08:00
Kubernetes Prow Robot
e63e159c04
Merge pull request #1360 from etoster/remove-only-pods-violating-included-node-taints
...
Add argument to remove only pods violating allowlisted taints
2024-03-25 07:39:12 -07:00
etoster
b7697869f2
add argument to remove only pods violating specific node taints
2024-03-25 15:21:21 +01:00
acejilam
19ced3d630
reduce cycle times
...
Signed-off-by: acejilam <acejilam@gmail.com >
2024-03-14 22:43:20 +08: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
Jack Francis
d7c12c5f00
Disambiguate node fit log messages
...
Signed-off-by: Jack Francis <jackfrancis@gmail.com >
2024-03-06 13:59:14 -08:00
Gabriel Tiossi
52d226321b
fix(plugins): node taint wrong option
2024-03-03 03:28:18 +00:00
Gabriel Tiossi
bb5930eb21
Improve PodEvictor observability through EvictOptions ( #1349 )
...
* feat: profile name for pods_evicted metric
Support new label "profile" for "pods_evicted" metric to allow
understand which profiles are evicting more pods, allowing better
observability
* refactor: evictoptions improved observability
Send profile and strategy names for EvictOptions, allowing Evictors to
access observability information
* cleanup: remove unnecessary evictoption reference
* feat: evictoptions for nodeutilzation
Explicit usage of options when invoking evictPods from the helper
function from nodeutilization for both highnodeutilization and
lownodeutilization
2024-03-02 12:06:05 -08:00
Kubernetes Prow Robot
6c865fdf32
Merge pull request #1348 from a7i/amir/toomanyrestarts-initcontainer
...
fix: `RemovePodsHavingTooManyRestarts` to include `InitContainerStatuses`
2024-02-07 05:36:34 -08:00
Amir Alavi
97c0044a74
fix: RemovePodsHavingTooManyRestarts to include InitContainerStatuses
...
Signed-off-by: Amir Alavi <amir.alavi@zendesk.com >
2024-02-06 14:21:42 -05:00
Amir Alavi
c7f8670b11
trim managedFields in shared informer factory
...
Signed-off-by: Amir Alavi <amiralavi7@gmail.com >
2024-02-01 09:58:44 -05:00
Kubernetes Prow Robot
0d096edbee
Merge pull request #1337 from a7i/v1alpha1-deprecate-notice
...
v1alpha1: log deprecation notice
2024-01-08 16:45:26 +01:00
dongjiang
e7980442ef
PodLifeTime: update support pods with container status and pods reason (#1330 )
...
* update support podlifetime status
Signed-off-by: dongjiang1989 <dongjiang1989@126.com >
* update verify gen
Signed-off-by: dongjiang1989 <dongjiang1989@126.com >
---------
Signed-off-by: dongjiang1989 <dongjiang1989@126.com >
2024-01-06 17:50:32 +01:00
Kubernetes Prow Robot
c2cf78a760
Merge pull request #1334 from xujihui1985/fix/correct-failed-unittest
...
fix(podlifetime): fix failed unittest
2024-01-05 20:17:55 +01:00
xujihui1985
5092595384
fix: filter pod with age greater than MaxPodLifeTimeSeconds
...
when the pod createtimestamp is greater than the current time (which is
not make sense in real life, but when doing test with such case,
it is possible), it will convert to a large number if we convert it
to uint, and though it can pass the test, but doesn't make sense.
2024-01-03 20:13:26 +08:00
Amir Alavi
d513c5d9d7
v1alpha1: log deprecation notice
...
Signed-off-by: Amir Alavi <amiralavi7@gmail.com >
2024-01-02 20:41:21 -05:00
dongjiang1989
1715f4ff81
update verify gen
...
Signed-off-by: dongjiang1989 <dongjiang1989@126.com >
2024-01-02 16:11:36 +08:00
xujihui1985
ae7467fb27
fix(podlifetime): fix failed unittest
...
1. correct desired pod creation time
2023-12-28 20:54:25 +08:00
Amir Alavi
8a06ed32e2
PodLifeTime: consider pods with container status ImagePullBackOff
...
Signed-off-by: Amir Alavi <amiralavi7@gmail.com >
2023-12-18 13:41:06 -05:00
SataQiu
f598b8909a
fix a bug where the structured log is not displayed correctly
2023-12-12 16:45:50 +08:00
PeterSzegedi
c8d4658277
Make the logged nodeutilization percentages human-readable ( #1294 )
...
* Make percentages human-readable
* Rename the rounding function
* bump easycla
2023-11-27 11:04:19 +01:00
Amir Alavi
783304f248
fix: json logging
...
Signed-off-by: Amir Alavi <amiralavi7@gmail.com >
2023-11-24 10:07:42 -05:00