Envoy sending TERM signal and closing my application before the process completion. Increasing Drain Duration preventing the pod from going down after the completion.(its waiting for the grace duration to be over and not allowing any new requests.
Expectation:
- After getting Envoy Sigterm, istio should wait terminationDrainDuration seconds for my process in user container is completed. if the process not completed in the grace duration, It should terminate(kill) all the remaining process.
- If my process in user container got completed before the grace period is over, istio should not wait for that and immediately send kill signal.
Is there any way to check the completion of process in user container and send kill signal if there is no process alive?
Process running in user container is Gunicorn process.