-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Labels
Description
There appears to be an issue with graceful shutdowns. This occurs when Kubernetes sends a SIGTERM to our function's Pod.
We have two processes:
- of-watchdog
- Go handler / HTTP server
The of-watchdog catches the signal and waits for wait_timeout
env-var, but the child process appears to die immediately
We need to copy the code / approach of the of-watchdog into the Go handler for all templates and test.
Task
- Show the issue by adding a SIGTERM handler and echo message in the entry point for one of the templates
- Deploy in a container
- Scale to --replicas=0
- Look at the logs
Now fix the code and repeat
You should see that both processes wait at least wait_timeout
before exiting.