Handle TERM signal to reduce pod terminating time.

This commit is contained in:
Yecheng Fu
2018-05-18 16:55:00 +08:00
parent 09c9ecd3fd
commit 55bc8d74a2
3 changed files with 4 additions and 4 deletions

View File

@@ -3472,7 +3472,7 @@ func newExecPodSpec(ns, generateName string) *v1.Pod {
{
Name: "exec",
Image: BusyBoxImage,
Command: []string{"sh", "-c", "while true; do sleep 5; done"},
Command: []string{"sh", "-c", "trap exit TERM; while true; do sleep 5; done"},
},
},
},