From eacbae72fd5707c624a920d2c0f9d18a9e732cc2 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Wed, 20 May 2020 10:40:56 +0200 Subject: [PATCH] Mention pod eviction is in dry mode when set Indicate whether a pod is only virtually evicted so there's no confusion with the real eviction. --- pkg/descheduler/evictions/evictions.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/descheduler/evictions/evictions.go b/pkg/descheduler/evictions/evictions.go index 131ed602c..e387590db 100644 --- a/pkg/descheduler/evictions/evictions.go +++ b/pkg/descheduler/evictions/evictions.go @@ -96,7 +96,11 @@ func (pe *PodEvictor) EvictPod(ctx context.Context, pod *v1.Pod, node *v1.Node) } pe.nodepodCount[node]++ - klog.V(1).Infof("Evicted pod: %#v in namespace %#v", pod.Name, pod.Namespace) + if pe.dryRun { + klog.V(1).Infof("Evicted pod in dry run mode: %#v in namespace %#v", pod.Name, pod.Namespace) + } else { + klog.V(1).Infof("Evicted pod: %#v in namespace %#v", pod.Name, pod.Namespace) + } return true, nil }