Skip to content

Commit

Permalink
descheduler: allow annotated pod pass non-retrievable filter (koordin…
Browse files Browse the repository at this point in the history
…ator-sh#1994)

Signed-off-by: wangjianyu.wjy <wangjianyu.wjy@alibaba-inc.com>
Co-authored-by: wangjianyu.wjy <wangjianyu.wjy@alibaba-inc.com>
Signed-off-by: george <xiangzhihua@gmail.com>
  • Loading branch information
2 people authored and georgexiang committed Apr 15, 2024
1 parent cec2fe0 commit 7d0d17a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/descheduler/controllers/migration/arbitrator/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ func (f *filter) initFilters(args *deschedulerconfig.MigrationControllerArgs, ha
f.retryablePodFilter = func(pod *corev1.Pod) bool {
return evictionsutil.HaveEvictAnnotation(pod) || retriablePodFilters(pod)
}
f.nonRetryablePodFilter = podFilter
f.nonRetryablePodFilter = func(pod *corev1.Pod) bool {
// any annotated as evictable pod pass non-retryable filter
return evictionsutil.HaveEvictAnnotation(pod) || podFilter(pod)
}
f.defaultFilterPlugin = defaultEvictor.(framework.FilterPlugin)
return nil
}
Expand Down

0 comments on commit 7d0d17a

Please sign in to comment.