1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

Redefine IsEvictable to be customizable for a particular strategy

Use WithXXX methods to extend the list of constraints to also
provide a reasonable error message.
This commit is contained in:
Jan Chaloupka
2020-08-12 16:34:00 +02:00
parent f5d8a02f79
commit d8251b9086
12 changed files with 125 additions and 74 deletions

View File

@@ -109,9 +109,15 @@ func IsCriticalPod(pod *v1.Pod) bool {
if IsStaticPod(pod) {
return true
}
if IsMirrorPod(pod) {
return true
}
if pod.Spec.Priority != nil && *pod.Spec.Priority >= SystemCriticalPriority {
return true
}
return false
}