ISSUE-4244 comply with --health-check-path (#4619)

This commit is contained in:
Andrea Spacca 2019-09-29 19:37:57 +02:00 committed by Manuel Alejandro de Brito Fontes
parent d5d2b4037c
commit 203a3ed455
2 changed files with 89 additions and 75 deletions

View file

@ -135,7 +135,7 @@ func main() {
go registerProfiler()
}
registerHealthz(ngx, mux)
registerHealthz(nginx.HealthPath, ngx, mux)
registerMetrics(reg, mux)
registerHandlers(mux)
@ -247,9 +247,10 @@ func registerHandlers(mux *http.ServeMux) {
})
}
func registerHealthz(ic *controller.NGINXController, mux *http.ServeMux) {
func registerHealthz(healthPath string, ic *controller.NGINXController, mux *http.ServeMux) {
// expose health check endpoint (/healthz)
healthz.InstallHandler(mux,
healthz.InstallPathHandler(mux,
healthPath,
healthz.PingHealthz,
ic,
)