Bug Description
When started with "--prometheus and --health-check, the HTTP server listens for requests on localhost, but it should listen on anyhost. Otherwise, it cannon be accessed using the Pod IP (from Prometheus, kubelet, and Istio).
How to reproduce
- Run the Pod with
--health-check
- Create an ephemeral container with
debug and run curl localhost:9090/readiness and curl <pod IP>:9090/readiness. The latter won't work.
Environment
- GKE 1.23 with COS containerd nodes
- Cloud SQL Proxy version: docker container built from the v2.0.0.preview.0 tag, targeting Linux amd64
EDIT: I can open a pull request if you want. I tested it, and it worked by replacing localhost with 0.0.0.0 in the HTTP server.
Bug Description
When started with
"--prometheusand--health-check, the HTTP server listens for requests on localhost, but it should listen on anyhost. Otherwise, it cannon be accessed using the Pod IP (from Prometheus, kubelet, and Istio).How to reproduce
--health-checkdebugand runcurl localhost:9090/readinessandcurl <pod IP>:9090/readiness. The latter won't work.Environment
EDIT: I can open a pull request if you want. I tested it, and it worked by replacing
localhostwith0.0.0.0in the HTTP server.