Jan Chaloupka
c838614b6c
EvictPod: stop returning an error
...
When an error is returned a strategy either stops completely or starts
processing another node. Given the error can be a transient error or
only one of the limits can get exceeded it is fair to just skip a
pod that failed eviction and proceed to the next instead.
In order to optimize the processing and stop earlier, it is more
practical to implement a check which will say when a limit was
exceeded.
2022-06-17 10:12:57 +02:00
Jan Chaloupka
cc49f9fcc2
Drop node parameter from EvictPod
...
The method uses the node object to only get the node name.
The node name can be retrieved from the pod object.
Some strategies might try to evict a pod in Pending state which
does not have the .spec.nodeName field set. Thus, skipping
the test for the node limit.
2022-06-17 10:10:25 +02:00
Jan Chaloupka
d5ee855221
Pass the strategy name into evictor through context
2022-06-16 16:32:13 +02:00
Kubernetes Prow Robot
b2418ef481
Merge pull request #847 from ingvagabund/split-pod-evictor-and-evictor-filter
...
Split pod evictor and evictor filter
2022-06-16 07:22:49 -07:00
Kubernetes Prow Robot
1f1aad335a
Merge pull request #856 from a7i/pod-sort-age-random
...
remove random creation timestamp from pod sort by age test
2022-06-16 01:18:49 -07:00
Lucas Severo Alves
30c972e49e
change namespaceTopologySpreadConstraints from map to slice
2022-06-15 14:54:56 +02:00
Amir Alavi
a7cfb25e9b
remove random creation timestamp from pod sort by age test
2022-06-14 23:28:58 -04:00
Lucas Severo Alves
dad3db3187
Check existing constraints before assigning
2022-06-14 10:43:59 +02:00
Jan Chaloupka
d2130747d8
Split pod evictor and evictor filter
2022-06-13 18:48:05 +02:00
Amir Alavi
311d75223f
PodLifeTime: sort pods by creation timestamp
2022-06-06 21:49:24 -04:00
Amir Alavi
3cc0a68f13
lownodeutilization: clarify comments and variable naming for underutilized vs. overutilized
2022-06-01 11:39:38 -04:00
Amir Alavi
8e1d35cb3c
Revert "cleanup lownodeutilization code"
2022-06-01 11:28:09 -04:00
Kubernetes Prow Robot
59c4904ddc
Merge pull request #805 from xiaoanyunfei/cleanup/lownodeutilization
...
cleanup lownodeutilization code
2022-06-01 07:45:02 -07:00
Mike Dame
af45591c25
Fix version command to parse helm chart tags
2022-05-31 17:39:08 +00:00
sunxiaofei
5e3b825427
cleanup lownodeutilization code
2022-05-23 17:20:35 +08:00
Mike Dame
6e84d0a6ba
React to removal of offensive language
...
https://github.com/kubernetes/kubeadm/issues/2200 went into effect in 1.24, so
e2es broke without the update.
2022-05-12 15:35:07 +00:00
Mike Dame
fb1df468ad
golint fix
2022-05-12 14:21:34 +00:00
Jan Chaloupka
3eca2782d4
Addressing review comments
...
Both LowNode and HighNode utilization strategies evict only as many pods
as there's free resources on other nodes. Thus, the resource fit test
is always true by definition.
2022-04-28 18:54:54 +02:00
RyanDevlin
16eb9063b6
NodeFit parameter now considers pod requests
2022-04-28 10:16:52 +02:00
Kubernetes Prow Robot
406e3ed5b3
Merge pull request #771 from dineshbhor/fix-highnodeutilization-node-sorting
...
Sort nodes in ascending order for HighNodeUtilization
2022-03-29 02:58:47 -07:00
dineshbhor
7589aaf00b
Sort nodes in ascending order for HighNodeUtilization
2022-03-29 17:54:18 +09:00
Kubernetes Prow Robot
238eebeaca
Merge pull request #722 from Dentrax/feature/leaderelection
...
feat(leaderelection): impl leader election for HA Deployment
2022-03-28 09:39:23 -07:00
Kubernetes Prow Robot
cf59d08193
Merge pull request #751 from HelmutLety/redo_#473
...
feat: Add DeviationThreshold Paramter for LowNodeUtilization, (Previous attempt - #473 )
2022-03-28 03:53:24 -07:00
HelmutLety
2ea65e69dc
feat(LowNodeUtilization): useDeviationThresholds, redo of #473
...
[751]: normalize Percentage in nodeutilization and clean the tests
2022-03-28 12:35:01 +02:00
Jacob Henner
ac3362149b
Add RemovePodsViolatingNodeTaints taint exclusion
...
Add taint exclusion to RemovePodsViolatingNodeTaints. This permits node
taints to be ignored by allowing users to specify ignored taint keys or
ignored taint key=value pairs.
2022-03-27 13:48:40 -04:00
Furkan
0a52af9ab8
feat(leaderelection): impl leader election
...
Signed-off-by: Furkan <furkan.turkal@trendyol.com >
Signed-off-by: eminaktas <eminaktas34@gmail.com >
Co-authored-by: Emin <emin.aktas@trendyol.com >
Co-authored-by: Yasin <yasintaha.erol@trendyol.com >
2022-03-25 14:33:14 +03:00
Kubernetes Prow Robot
07bbdc61c4
Merge pull request #762 from ingvagabund/nodeutilization-refactor
...
Promote NodeUsage to NodeInfo, evaluate thresholds separately
2022-03-15 17:33:48 -07:00
Jan Chaloupka
285523f0d9
RemovePodsViolatingNodeTaints: optionally include PreferNoSchedule taint
2022-03-14 16:46:03 +01:00
Jan Chaloupka
52ff50f2d1
Promote NodeUsage to NodeInfo, evaluate thresholds separately
2022-03-11 13:52:37 +01:00
Jan Chaloupka
8ebf3fb323
nodeutilization: move node resource threshold value computation under a separate function
2022-03-11 12:46:11 +01:00
prune
448dc4784c
add conflicting taint to the logs
...
log when count mismatch
simplified logic to log blocking taints
2022-03-10 08:05:42 -05:00
Kubernetes Prow Robot
54c50c5390
Merge pull request #731 from jklaw90/fix-ctx-cron
...
Bugfix: Cronjob ctx cancel
2022-02-22 11:35:18 -08:00
Julian Lawrence
a2cbc25397
updated to handle cronjob flow
2022-02-22 08:52:06 -08:00
Julian Lawrence
224e2b078f
updated logs to help with debugging
2022-02-14 18:27:53 -08:00
Julian Lawrence
1a98a566b3
adding cancelation from sigint sigterm
2022-01-25 00:10:09 -08:00
Jan Chaloupka
203388ff1a
Evictor: report successful eviction independently of the dry-mode
...
Dry mode currently does not report metrics when the eviction succeeds
2022-01-20 21:23:19 +01:00
Jan Chaloupka
901a16ecbc
Do not collect the metrics when the metrics server is not enabled
2022-01-20 17:04:15 +01:00
Jan Chaloupka
e0f086ff85
Use a fake client when evicting pods by individual strategies to accumulate the evictions
...
Currently, when the descheduler is running with the --dry-run on, no strategy actually
evicts a pod so every strategy always starts with a complete list of
pods. E.g. when the PodLifeTime strategy evicts few pods, the RemoveDuplicatePods
strategy still takes into account even the pods eliminated by the PodLifeTime
strategy. Which does not correspond to the real case scenarios as the
same pod can be evicted multiple times. Instead, use a fake client and
evict/delete the pods from its cache so the strategies evict each pod
at most once as it would be normally done in a real cluster.
2022-01-20 17:04:05 +01:00
Kubernetes Prow Robot
551eced42a
Merge pull request #688 from babygoat/evict-failed-without-ownerrefs
...
feat: support eviction of failed bare pods
2022-01-11 12:31:15 -08:00
Julian Lawrence
77cb406052
updated until -> sliding until
2022-01-06 12:55:10 -08:00
babygoat
1529180d70
feat: support eviction of failed bare pods
...
This patch adds the policy(evictFailedBarePods) to allow the failed
pods without ownerReferences to be evicted. For backward compatibility,
disable the policy by default. Address #644 .
2022-01-06 01:07:41 +08:00
Jan Chaloupka
8462cf56d7
run ./hack/update-* scripts
2022-01-04 09:37:01 +01:00
Erik Jankovič
2020642b6f
chore: add pod.Status.Reason to the list of reasons
...
Signed-off-by: Erik Jankovič <erik.jankovic@gmail.com >
2021-12-17 18:37:53 +01:00
Kubernetes Prow Robot
1e5165ba9f
Merge pull request #670 from autumn0207/improve_pod_eviction_metrics
...
Add node name label to the counter metric for evicted pods
2021-12-16 01:49:18 -08:00
autumn0207
8e74f8bd77
improve pod eviction metrics
2021-12-16 17:06:22 +08:00
Kubernetes Prow Robot
2424928019
Merge pull request #667 from damemi/1.23-rc.0
...
bump: k8s to 1.23
2021-12-15 06:56:20 -08:00
Garrybest
cac3b9185b
reform all test files
...
Signed-off-by: Garrybest <garrybest@foxmail.com >
2021-12-11 19:43:16 +08:00
Mike Dame
4fa7bf978c
run hack/update-generated-deep-copies.sh
2021-12-10 10:02:39 -05:00
Garrybest
0ff8ecb41e
reform all strategies by using getPodsAssignedToNode
...
Signed-off-by: Garrybest <garrybest@foxmail.com >
2021-12-10 19:28:51 +08:00
Garrybest
08ed129a07
reform ListPodsOnANode by using pod informer and indexer
...
Signed-off-by: Garrybest <garrybest@foxmail.com >
2021-12-10 19:25:20 +08:00