Skip to content

Commit

Permalink
descheduler: allow annotated pod pass non-retrievable filter (#1994)
Browse files Browse the repository at this point in the history
Signed-off-by: wangjianyu.wjy <wangjianyu.wjy@alibaba-inc.com>
Co-authored-by: wangjianyu.wjy <wangjianyu.wjy@alibaba-inc.com>
  • Loading branch information
ZiMengSheng and wangjianyu.wjy committed Apr 12, 2024
1 parent 19c19e0 commit 2fb6fc4
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 2fb6fc4

Please sign in to comment.