From bde2324eb98fbb18b39056344895196818d68c88 Mon Sep 17 00:00:00 2001 From: MrHohn Date: Thu, 1 Sep 2016 12:54:33 -0700 Subject: [PATCH] Support graceful termination in kube-dns --- cmd/kube-dns/app/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kube-dns/app/server.go b/cmd/kube-dns/app/server.go index 1d9ed4bbb23..4862eb268bd 100644 --- a/cmd/kube-dns/app/server.go +++ b/cmd/kube-dns/app/server.go @@ -125,12 +125,12 @@ func (server *KubeDNSServer) setupHealthzHandlers() { } // setupSignalHandlers runs a goroutine that waits on SIGINT or SIGTERM and logs it -// before exiting. +// program will be terminated by SIGKILL when grace period ends. func setupSignalHandlers() { sigChan := make(chan os.Signal) signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM) go func() { - glog.Fatalf("Received signal: %s", <-sigChan) + glog.Infof("Received signal: %s, will exit when the grace period ends", <-sigChan) }() }