Skip to content

Commit

Permalink
fix allocator metrics endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentefb committed Jul 25, 2024
1 parent 205e87e commit 627b463
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/allocator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ func main() {
health, closer := setupMetricsRecorder(conf)
defer closer()

// http.DefaultServerMux is used for http connection, not for https
http.Handle("/", health)

kubeClient, agonesClient, err := getClients(conf)
if err != nil {
logger.WithError(err).Fatal("could not create clients")
Expand Down Expand Up @@ -306,6 +309,9 @@ func main() {
}
}

err = http.ListenAndServe(":8080", http.DefaultServeMux)
logger.WithError(err).Fatal("allocation service crashed")

// Finally listen on 8080 (http), used to serve /live and /ready handlers for Kubernetes probes.
healthserver := httpserver.Server{Logger: logger}
healthserver.Handle("/", health)
Expand Down

0 comments on commit 627b463

Please sign in to comment.