Skip to content

[v2] prometheus and health checks listen on localhost instead of anyhost #1359

@daquinoaldo

Description

@daquinoaldo

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

  1. Run the Pod with --health-check
  2. 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.

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions