From f799518af578c80f39ddadcbbca50af76b7db44d Mon Sep 17 00:00:00 2001 From: Avesh Agarwal Date: Tue, 29 Aug 2017 17:33:40 -0400 Subject: [PATCH] Add check for critical pods in lownodeutilization to avoid eviction. --- pkg/rescheduler/strategies/lownodeutilization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rescheduler/strategies/lownodeutilization.go b/pkg/rescheduler/strategies/lownodeutilization.go index 3d3b43479..d597ea6bc 100644 --- a/pkg/rescheduler/strategies/lownodeutilization.go +++ b/pkg/rescheduler/strategies/lownodeutilization.go @@ -224,7 +224,7 @@ func NodeUtilization(node *v1.Node, pods []*v1.Pod) (api.ResourceThresholds, []* sr = nil } - if podutil.IsMirrorPod(pod) || podutil.IsPodWithLocalStorage(pod) || sr == nil || podutil.IsDaemonsetPod(sr) { + if podutil.IsMirrorPod(pod) || podutil.IsPodWithLocalStorage(pod) || sr == nil || podutil.IsDaemonsetPod(sr) || podutil.IsCriticalPod(pod) { nonRemovablePods = append(nonRemovablePods, pod) if podutil.IsBestEffortPod(pod) { continue