diff --git a/pkg/controller/builder.go b/pkg/controller/builder.go index 55f32063..64f8dae1 100644 --- a/pkg/controller/builder.go +++ b/pkg/controller/builder.go @@ -202,6 +202,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) { runningServices += ", prometheus" } rtr.GET("/healtz", requestHandler) + rtr.GET("/healthz", requestHandler) // all others will be 404 go func() { server := fasthttp.Server{ @@ -225,6 +226,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) { func addLocalDefaultService(builder *Builder, chShutdown chan struct{}) { rtr := router.New() rtr.GET("/healtz", requestHandler) + rtr.GET("/healthz", requestHandler) // all others will be 404 go func() { server := fasthttp.Server{ @@ -247,5 +249,11 @@ func addLocalDefaultService(builder *Builder, chShutdown chan struct{}) { func requestHandler(ctx *fasthttp.RequestCtx) { ctx.SetStatusCode(fasthttp.StatusOK) - ctx.Response.Header.Set("X-HAProxy-Ingress-Controller", "healtz") + + switch string(ctx.Path()) { + case "/healthz": + ctx.Response.Header.Set("X-HAProxy-Ingress-Controller", "healthz") + default: + ctx.Response.Header.Set("X-HAProxy-Ingress-Controller", "healtz") + } }