mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-28 04:10:09 +00:00
The current /exit method is not sufficient to test graceful shutdown behaviors within Kube that allow services to remain available during rolling restarts. Add support for `wait=DURATION` and `timeout=DURATION` to the exit handler and wire that to the Go http server's graceful termination. With these methods netexec can be used in a pod to simulate graceful shutdown by adding a preStop handler that hits the exit endpoint with a timeout and wait period.