Comments (4)
Got it, thank you for this info! The wait command is exactly what I was looking for.
from cloud-sql-proxy.
We recently added support for a wait
command #2041 and I think it is what you are looking for.
To help ensure the Proxy is up and ready, this commit adds a wait command with an optional
--max
flag to set the maximum time to wait.By default when invoking this command:
./cloud-sql-proxy wait
The Proxy will wait up to the maximum time for the /startup endpoint to respond. This command requires that the Proxy be started in another process with the HTTP health check enabled. If an alternate health check port or address is used, as in:
./cloud-sql-proxy <INSTANCE_CONNECTION_NAME> \ --http-address 0.0.0.0 \ --http-port 9191
Then the wait command must also be told to use the same custom values:
./cloud-sql-proxy wait \ --http-address 0.0.0.0 \ --http-port 9191
By default the wait command will wait 30 seconds. To alter this value, use:
./cloud-sql-proxy wait --max 10s
@chardch does that work for your use-case?
from cloud-sql-proxy.
This works in combination with a poststart hook. Context: https://medium.com/@marko.luksa/delaying-application-start-until-sidecar-is-ready-2ec2d21a7b74
from cloud-sql-proxy.
Going to close this. Feel free to reopen if you’re still stuck on this.
from cloud-sql-proxy.
Related Issues (20)
- security: cloudsql-docker/gce-proxy:alpine is vulnerable to CVE-2023-5363, CVE-2023-5678 HOT 1
- Run Snyk docker security scans nightly HOT 3
- Docker image labels are misplaced
- Align README and Proxy help message documentation
- Add support for Debian bookworm
- Cloud SQL Proxy have support GKE sidecar with replication or not? HOT 4
- Pinned vulnerable version of crypto library HOT 3
- v2/tests: TestMySQLAuthentication failed HOT 2
- Connection test occasionally causes TLS handshake failed errors HOT 15
- Wait command is missing CLI documentatation
- Readiness probe shouldn't depend on downstream services
- v2/tests: TestMySQLTCP failed HOT 1
- v2/tests: TestSQLServerImpersonation failed HOT 2
- v2/tests: TestSQLServerAuthentication failed HOT 3
- GKE - MySQL CloudSQL Conectivity Issue: ACCESS_TOKEN_SCOPE_INSUFFICIENT HOT 5
- Add FIPS (BoringCrypto) support HOT 1
- Add example for GitHub Actions + Proxy HOT 6
- Automate README version bumps HOT 1
- Replace zap with log/slog
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-sql-proxy.