@@ -202,6 +202,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) {
202
202
runningServices += ", prometheus"
203
203
}
204
204
rtr .GET ("/healtz" , requestHandler )
205
+ rtr .GET ("/healthz" , requestHandler )
205
206
// all others will be 404
206
207
go func () {
207
208
server := fasthttp.Server {
@@ -225,6 +226,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) {
225
226
func addLocalDefaultService (builder * Builder , chShutdown chan struct {}) {
226
227
rtr := router .New ()
227
228
rtr .GET ("/healtz" , requestHandler )
229
+ rtr .GET ("/healthz" , requestHandler )
228
230
// all others will be 404
229
231
go func () {
230
232
server := fasthttp.Server {
@@ -247,5 +249,11 @@ func addLocalDefaultService(builder *Builder, chShutdown chan struct{}) {
247
249
248
250
func requestHandler (ctx * fasthttp.RequestCtx ) {
249
251
ctx .SetStatusCode (fasthttp .StatusOK )
250
- ctx .Response .Header .Set ("X-HAProxy-Ingress-Controller" , "healtz" )
252
+
253
+ switch string (ctx .Path ()) {
254
+ case "/healthz" :
255
+ ctx .Response .Header .Set ("X-HAProxy-Ingress-Controller" , "healthz" )
256
+ default :
257
+ ctx .Response .Header .Set ("X-HAProxy-Ingress-Controller" , "healtz" )
258
+ }
251
259
}
0 commit comments