Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for exit zero on sigterm #1870

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

htigran
Copy link
Contributor

@htigran htigran commented Jul 11, 2023

This PR is to add a new argument exit-zero-on-sigterm to exit with 0 exit code when SIGTERM is received.

This is needed because since v2 cloud-sql-proxy started returning 143 code which is causing problems with Airflow KPO and other applications on k8s.
When cloud-sql-proxy runs in the same pod with other containers and when the main container exits successfully k8s sends SIGTERM to cloud-sql-proxy. Then cloud-sql-proxy is returning 143 in this scenario, and airflow KPO thinks that there was an error and marks the job as failed.

Fixes #1803.

@htigran htigran requested a review from a team as a code owner July 11, 2023 19:59
@google-cla
Copy link

google-cla bot commented Jul 11, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@enocom
Copy link
Member

enocom commented Jul 11, 2023

If you'll sign the CLA, we can get this merged.

@enocom enocom changed the title Exit zero on sigterm feat: add support for exit zero on sigterm Jul 11, 2023
@htigran
Copy link
Contributor Author

htigran commented Jul 14, 2023

Hi @enocom, just to let you know that I have signed the CLA. Thanks

@enocom enocom added the tests: run Label to trigger Github Action tests. label Jul 14, 2023
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Jul 14, 2023
Copy link
Member

@enocom enocom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIGTERM with no active connections should result in 0 exit code
2 participants