This is an automated email from the ASF dual-hosted git repository.

ccondit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git


The following commit(s) were added to refs/heads/master by this push:
     new c740b34e [YUNIKORN-2817] Pods should be deleted according to podspec 
(#896)
c740b34e is described below

commit c740b34ee4a295faf7874ed994e0dd171b21b79c
Author: qzhu <q...@cloudera.com>
AuthorDate: Mon Aug 19 17:41:42 2024 -0500

    [YUNIKORN-2817] Pods should be deleted according to podspec (#896)
    
    Remove the hardcoded 3s grace period on pod deletions.
    
    Closes: #896
    
    Signed-off-by: Craig Condit <ccon...@apache.org>
---
 pkg/client/kubeclient.go | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pkg/client/kubeclient.go b/pkg/client/kubeclient.go
index ef8393ae..6132ab75 100644
--- a/pkg/client/kubeclient.go
+++ b/pkg/client/kubeclient.go
@@ -138,10 +138,7 @@ func (nc SchedulerKubeClient) Create(pod *v1.Pod) 
(*v1.Pod, error) {
 }
 
 func (nc SchedulerKubeClient) Delete(pod *v1.Pod) error {
-       gracefulSeconds := int64(3)
-       if err := 
nc.clientSet.CoreV1().Pods(pod.Namespace).Delete(context.Background(), 
pod.Name, apis.DeleteOptions{
-               GracePeriodSeconds: &gracefulSeconds,
-       }); err != nil {
+       if err := 
nc.clientSet.CoreV1().Pods(pod.Namespace).Delete(context.Background(), 
pod.Name, apis.DeleteOptions{}); err != nil {
                log.Log(log.ShimClient).Warn("failed to delete pod",
                        zap.String("namespace", pod.Namespace),
                        zap.String("podName", pod.Name),


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org
For additional commands, e-mail: issues-h...@yunikorn.apache.org

Reply via email to