Added option to indicate which address to listen - #2
Closed
jasonjei wants to merge 1 commit into
Closed
Conversation
In addition to being able to use ./cloud_sql_proxy -dir=/cloudsql -instances=PROJECT:REGION:INSTANCE=tcp:PORT functionality, I think it is important to be able to indicate which ADDRESS to listen with a -instances=PROJECT:REGION:INSTANCE=tcp:PORT:ADDRESS option. The main use case is using with Docker and GKE. I'd like to be able to use the TCP to simplify Docker Google Container Engine deployments and simply have my existing services look for the proxy service.
Contributor
|
Thanks for the pull request! I've actually implemented something similar in my pull request [0]. I don't have time to go through it right now, but hopefully the request will be merged by the end of the week. [0] #1 |
This was referenced Mar 17, 2016
Contributor
|
I've merged the other pull request that does the same thing, so I'll close this one. Thanks again for the contribution! If you have any other features/bugfixes/anything I'd be happy to accept them. |
Author
|
No problem, thanks for making this utility and making the source available before the update was pushed. Sure beats managing ACLs! |
elsbrock
referenced
this pull request
in elsbrock/cloudsql-proxy
Sep 13, 2021
Add startup probe to health check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In addition to being able to use
./cloud_sql_proxy -dir=/cloudsql -instances=PROJECT:REGION:INSTANCE=tcp:PORTfunctionality, I think it is important to be able to indicate which ADDRESS to listen with a-instances=PROJECT:REGION:INSTANCE=tcp:PORT:ADDRESSoption.The main use case is using with Docker and GKE. I'd like to be able to use TCP to simplify Docker Google Container Engine deployments and simply have my existing services look for the cloud SQL proxy service.
So now, I can advertise a proxy service with the port 3306 open in my Kubernetes setup. The proxy uses 127.0.0.1, which I think is a good default, but for having a proxy available for use by other Kubernetes services, I'd need to advertise 0.0.0.0.
The alternative options are not good. To use CloudSQL today with Google Container Engine, I would have to have my existing Docker containers to run an additional process (which is against the Docker philosophy of one container one process). Alternatively, one GKE user has proposed using a Docker container called
cloudsqlipwhich polls running GKE nodes every few seconds and adds new entries into the ACL via IP, which I also think is undesirable.I'd really prefer not to modify my existing Docker containers running on Google Container Engine to include the cloud_sql_proxy binary, so running an additional Docker container to access CloudSQL seems like a decent option. Isn't that the Docker way of doing things?
Let me know what you think.