@@ -183,6 +183,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) {
183183 runningServices += ", prometheus"
184184 }
185185 rtr .GET ("/healtz" , requestHandler )
186+ rtr .GET ("/healthz" , requestHandler )
186187 // all others will be 404
187188 go func () {
188189 server := fasthttp.Server {
@@ -206,6 +207,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) {
206207func addLocalDefaultService (builder * Builder , chShutdown chan struct {}) {
207208 rtr := router .New ()
208209 rtr .GET ("/healtz" , requestHandler )
210+ rtr .GET ("/healthz" , requestHandler )
209211 // all others will be 404
210212 go func () {
211213 server := fasthttp.Server {
@@ -228,5 +230,11 @@ func addLocalDefaultService(builder *Builder, chShutdown chan struct{}) {
228230
229231func requestHandler (ctx * fasthttp.RequestCtx ) {
230232 ctx .SetStatusCode (fasthttp .StatusOK )
231- ctx .Response .Header .Set ("X-HAProxy-Ingress-Controller" , "healtz" )
233+
234+ switch string (ctx .Path ()) {
235+ case "/healthz" :
236+ ctx .Response .Header .Set ("X-HAProxy-Ingress-Controller" , "healthz" )
237+ default :
238+ ctx .Response .Header .Set ("X-HAProxy-Ingress-Controller" , "healtz" )
239+ }
232240}
0 commit comments