Reputation: 141
I am making graceful shutdown feature using go lang when kebernetes doing rolling-update on google container engine. Does anyone know what process signal is sent to the running pods when kubectl rolling-update starts?
I've listened to os.Kill, os.Interrupt, syscall.SIGTERM, syscall.SIGKILL, syscall.SIGSTOP signals to be handled, none of those signals was raised while kubectl rolling-update.
I would really appreciate for your answers.
Upvotes: 0
Views: 1061
Reputation: 141
I got a solution! I used shell script file as an ENTRYPOINT and executed go binary in that script file. So process ID of executed go binary was not 1.(shell script process's ID was 1 instead) And docker sent SIGTERM only to PID 1(which is not propagated to it's child processes). So, I had to change my ENTRYPOINT direct to executing go binary, and I got SIGTERM in my go code now. Refer to this link
Upvotes: 2