From 1135d9e0415a175672709424111f116e3bb2b18e Mon Sep 17 00:00:00 2001 From: Jun Gong Date: Thu, 21 Mar 2019 09:47:58 +0800 Subject: [PATCH] Do graceful eviction using default policy --- pkg/scheduler/cache/cache.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/scheduler/cache/cache.go b/pkg/scheduler/cache/cache.go index 9758caf3b..2e6f22f3a 100644 --- a/pkg/scheduler/cache/cache.go +++ b/pkg/scheduler/cache/cache.go @@ -127,14 +127,9 @@ type defaultEvictor struct { } func (de *defaultEvictor) Evict(p *v1.Pod) error { - // TODO (k82cn): makes grace period configurable. - threeSecs := int64(3) - glog.V(3).Infof("Evicting pod %v/%v", p.Namespace, p.Name) - if err := de.kubeclient.CoreV1().Pods(p.Namespace).Delete(p.Name, &metav1.DeleteOptions{ - GracePeriodSeconds: &threeSecs, - }); err != nil { + if err := de.kubeclient.CoreV1().Pods(p.Namespace).Delete(p.Name, nil); err != nil { glog.Errorf("Failed to evict pod <%v/%v>: %#v", p.Namespace, p.Name, err) return err }