Skip to content

Commit

Permalink
Don't report localhost addresses on GKE. (d'oh)
Browse files Browse the repository at this point in the history
This fixes the endpoint health-checks currently performed by the
assigner.
  • Loading branch information
spetrovic77 committed Jul 28, 2023
1 parent 9594d9a commit a33973a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion internal/gke/babysitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ func RunBabysitter(ctx context.Context) error {
TLSConfig: mtls.ClientTLSConfig(meta.Project, caCert, getSelfCert, "manager"),
}
mux := http.NewServeMux()
lis, err := net.Listen("tcp", "localhost:0")
host, err := os.Hostname()
if err != nil {
return err
}
lis, err := net.Listen("tcp", fmt.Sprintf("%s:0", host))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ const (
// weaver-gke module version (Major.Minor.Patch).
Major = 0
Minor = 18
Patch = 0
Patch = 2
)

0 comments on commit a33973a

Please sign in to comment.