Skip to content

Commit

Permalink
Expose Prometheus metrics in glbc controller
Browse files Browse the repository at this point in the history
  • Loading branch information
piosz committed Feb 25, 2017
1 parent 8f23451 commit fd7990d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/gce/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"k8s.io/kubernetes/pkg/util/wait"

"github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus/promhttp"
)

// Entrypoint of GLBC. Example invocation:
Expand Down Expand Up @@ -132,6 +133,7 @@ func registerHandlers(lbc *controller.LoadBalancerController) {
w.WriteHeader(200)
w.Write([]byte("ok"))
})
http.Handle("/metrics", promhttp.Handler())
http.HandleFunc("/delete-all-and-quit", func(w http.ResponseWriter, r *http.Request) {
// TODO: Retry failures during shutdown.
lbc.Stop(true)
Expand Down

0 comments on commit fd7990d

Please sign in to comment.