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

add quitquitquit for cloudsql-proxy #502

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

Muni10
Copy link
Contributor

@Muni10 Muni10 commented Feb 6, 2024

No description provided.

@Muni10 Muni10 requested a review from a team as a code owner February 6, 2024 21:12
@Starefossen
Copy link
Member

The Proxy includes support for an admin server on localhost. By default, the the admin server is not enabled. To enable the server, pass the --debug or --quitquitquit flag. This will start the server on localhost at port 9091. To change the port, use the --admin-port flag.

When --quitquitquit is set, the admin server adds an endpoint at /quitquitquit. The admin server exits gracefully when it receives a POST request at /quitquitquit.

https://github.com/GoogleCloudPlatform/cloud-sql-proxy?tab=readme-ov-file#localhost-admin-server

@Starefossen
Copy link
Member

Kaller vi /quitquitquit fra noe sted når dette er slått på?

@Kyrremann
Copy link
Contributor

Kaller vi /quitquitquit fra noe sted når dette er slått på?

Tipper Hahaha skal kalle det endepunktet.

@Muni10
Copy link
Contributor Author

Muni10 commented Feb 7, 2024

Det stemmer @Kyrremann, hahaha skal kalle dette endepunktet. Etter oppgradering til cloudsql-proxy@v2 så fungerer ikke lenger sigint som vi har brukt fra hahaha, da får vi en feilmelding.i pod'en som kjører og jobber tror de har feilet og restarter i de tilfellene restartPolicy er satt. For å unngå dette legger vi inn quitquitquit endepunktet og kaller dette fra hahaha. Det negative er at det startes en localhost admin server på 9091. Alternativet er et flagg --exit-zero-on-sigterm, som overstyrer det docker gir (143 eller 130) og exiter containeren med 0 ved alle TERM signaler. Jeg synes det virker litt skummelt i tilfelle containeren får TERM fra andre kilder, som vi kanskje vil undersøke hvis vi oppdager det. Da tenker jeg det er bedre å be den avslutte pent via quitquitquit.

@Muni10 Muni10 merged commit 6cd8b88 into master Feb 7, 2024
2 checks passed
@Muni10 Muni10 deleted the add_quit_endpoint_cloudsqlproxy branch February 7, 2024 10:42
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.

4 participants