By this change, we add a preStop
command that prevents the cloud_sql_proxy
from terminating until the application is running.
This addresses the issue where when a pod stop is requested, the cloud proxy sidecar terminates immediately while the application implementing graceful shutdown takes longer and potentially still accepts requests that then fail because the proxy is down.