Without trapping SIGTERM, the signal will be ignored, and the pod will continue to run in Terminating state for 30 seconds.
Trapping SIGTERM is not enough; when sleeping 10 seconds, busybox sh will wait until the sleep command completes before handling the signal. We can avoid this delay by running sleep in the background and waiting for it.
Without trapping SIGTERM, the signal will be ignored, and the pod will continue to run in Terminating state for 30 seconds.
Trapping SIGTERM is not enough; when sleeping 10 seconds, busybox sh will wait until the sleep command completes before handling the signal. We can avoid this delay by running sleep in the background and waiting for it.
Same fix applied to Reman test example here: https://github.com/RamenDR/ramen/pull/667