{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/issues/128","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/issues/128/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/issues/128/events","html_url":"https://github.com/GoogleCloudPlatform/cloudsql-proxy/issues/128","id":266229996,"node_id":"MDU6SXNzdWUyNjYyMjk5OTY=","number":128,"title":"Feature Request: Perform a graceful shutdown upon SIGTERM","user":{"login":"thrnio","id":97464,"node_id":"MDQ6VXNlcjk3NDY0","avatar_url":"https://avatars2.githubusercontent.com/u/97464?v=4","gravatar_id":"","url":"https://api.github.com/users/thrnio","html_url":"https://github.com/thrnio","followers_url":"https://api.github.com/users/thrnio/followers","following_url":"https://api.github.com/users/thrnio/following{/other_user}","gists_url":"https://api.github.com/users/thrnio/gists{/gist_id}","starred_url":"https://api.github.com/users/thrnio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thrnio/subscriptions","organizations_url":"https://api.github.com/users/thrnio/orgs","repos_url":"https://api.github.com/users/thrnio/repos","events_url":"https://api.github.com/users/thrnio/events{/privacy}","received_events_url":"https://api.github.com/users/thrnio/received_events","type":"User","site_admin":false},"labels":[{"id":995389349,"node_id":"MDU6TGFiZWw5OTUzODkzNDk=","url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/labels/Status:%20In%20Progress","name":"Status: In Progress","color":"cccccc","default":false},{"id":995390412,"node_id":"MDU6TGFiZWw5OTUzOTA0MTI=","url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/labels/Type:%20Enhancement","name":"Type: Enhancement","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"AthenaShi","id":1258476,"node_id":"MDQ6VXNlcjEyNTg0NzY=","avatar_url":"https://avatars3.githubusercontent.com/u/1258476?v=4","gravatar_id":"","url":"https://api.github.com/users/AthenaShi","html_url":"https://github.com/AthenaShi","followers_url":"https://api.github.com/users/AthenaShi/followers","following_url":"https://api.github.com/users/AthenaShi/following{/other_user}","gists_url":"https://api.github.com/users/AthenaShi/gists{/gist_id}","starred_url":"https://api.github.com/users/AthenaShi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AthenaShi/subscriptions","organizations_url":"https://api.github.com/users/AthenaShi/orgs","repos_url":"https://api.github.com/users/AthenaShi/repos","events_url":"https://api.github.com/users/AthenaShi/events{/privacy}","received_events_url":"https://api.github.com/users/AthenaShi/received_events","type":"User","site_admin":false},"assignees":[{"login":"AthenaShi","id":1258476,"node_id":"MDQ6VXNlcjEyNTg0NzY=","avatar_url":"https://avatars3.githubusercontent.com/u/1258476?v=4","gravatar_id":"","url":"https://api.github.com/users/AthenaShi","html_url":"https://github.com/AthenaShi","followers_url":"https://api.github.com/users/AthenaShi/followers","following_url":"https://api.github.com/users/AthenaShi/following{/other_user}","gists_url":"https://api.github.com/users/AthenaShi/gists{/gist_id}","starred_url":"https://api.github.com/users/AthenaShi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AthenaShi/subscriptions","organizations_url":"https://api.github.com/users/AthenaShi/orgs","repos_url":"https://api.github.com/users/AthenaShi/repos","events_url":"https://api.github.com/users/AthenaShi/events{/privacy}","received_events_url":"https://api.github.com/users/AthenaShi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2017-10-17T18:25:07Z","updated_at":"2018-07-24T04:55:05Z","closed_at":null,"author_association":"NONE","body":"The method documented in [Connecting from Google Container Engine](https://cloud.google.com/sql/docs/mysql/connect-container-engine) for using Cloud SQL Proxy from GKE is to run the proxy as a sidecar container in your pod alongside your application. For normal use, this works well, but as [this StackOverflow question describes](https://stackoverflow.com/questions/41679364/kubernetes-stop-cloudsql-proxy-sidecar-container-in-multi-container-pod-job), there are problems when trying to do the same in a Kubernetes Job.\r\n\r\nThe main issue is that for a Job to finish, all the containers in its Pod need to finish and return 0, so when using Cloud SQL Proxy as a sidecar container, even after the application container finishes, the proxy container stays around and Kubernetes believes the Job is not finished. \r\n\r\nWhat would be helpful is for there to be some way to tell Cloud SQL Proxy to shut itself down cleanly after the application has finished. Perhaps something like a configurable timeout where the proxy shuts down after having no active connections for a period of time, or even some way for the application to explicitly tell the proxy it has finished before the application itself shuts down."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/issues/comments/407280938","html_url":"https://github.com/GoogleCloudPlatform/cloudsql-proxy/issues/128#issuecomment-407280938","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/cloudsql-proxy/issues/128","id":407280938,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzI4MDkzOA==","user":{"login":"hfwang","id":5191,"node_id":"MDQ6VXNlcjUxOTE=","avatar_url":"https://avatars1.githubusercontent.com/u/5191?v=4","gravatar_id":"","url":"https://api.github.com/users/hfwang","html_url":"https://github.com/hfwang","followers_url":"https://api.github.com/users/hfwang/followers","following_url":"https://api.github.com/users/hfwang/following{/other_user}","gists_url":"https://api.github.com/users/hfwang/gists{/gist_id}","starred_url":"https://api.github.com/users/hfwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hfwang/subscriptions","organizations_url":"https://api.github.com/users/hfwang/orgs","repos_url":"https://api.github.com/users/hfwang/repos","events_url":"https://api.github.com/users/hfwang/events{/privacy}","received_events_url":"https://api.github.com/users/hfwang/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T04:55:05Z","updated_at":"2018-07-24T04:55:05Z","author_association":"MEMBER","body":"#178 adds a configurable wait after receiving SIGTERM, however it's not incredibly clever, it will wait the full configured wait since it doesn't know if there are any open connections, and it doesn't start rejecting new connections either."}}
{"actor":{"display_login":"hfwang"}}