From 305421fb805170909016b347087b6d4b777a29dd Mon Sep 17 00:00:00 2001 From: wuzhuoquan Date: Tue, 13 Aug 2024 16:37:37 +0800 Subject: [PATCH] sleep before shutdown --- cmd/waitshutdown/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/waitshutdown/main.go b/cmd/waitshutdown/main.go index 7bc50d9cb..f5162e909 100644 --- a/cmd/waitshutdown/main.go +++ b/cmd/waitshutdown/main.go @@ -26,7 +26,7 @@ import ( ) func main() { - err := exec.Command("bash", "-c", "pkill -SIGTERM -f nginx-ingress-controller").Run() + err := exec.Command("bash", "-c", "sleep 5 && pkill -SIGTERM -f nginx-ingress-controller").Run() if err != nil { klog.ErrorS(err, "terminating ingress controller") os.Exit(1)