Add support for graceful shutdown of OPA server
There is a new CLI option to configure the grace period: `--shutdown-grace-period` The option defaults to 10 seconds. When a SIGINT or SIGTERM is sent the runtime will catch them and attempt to gracefully shutdown the http servers. If the timeout is reached it will log an error and continue with exiting (in a less graceful way). Unit testing is a little bit light on this. Its touching some parts of the code that aren't super easy to mock out. We can probably refactor things in the future to make it easier. Fixes: #1291 Signed-off-by: Patrick East <east.patrick@gmail.com>
P
Patrick East committed
b96f8c34923a5c6a70c1287fa8537d745259da90
Parent: f42fb7e
Committed by Torin Sandall <torinsandall@gmail.com>
on 4/10/2019, 2:54:03 PM