@@ -183,6 +183,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) {
183
183
runningServices += ", prometheus"
184
184
}
185
185
rtr .GET ("/healtz" , requestHandler )
186
+ rtr .GET ("/healthz" , requestHandler )
186
187
// all others will be 404
187
188
go func () {
188
189
server := fasthttp.Server {
@@ -206,6 +207,7 @@ func addControllerMetricData(builder *Builder, chShutdown chan struct{}) {
206
207
func addLocalDefaultService (builder * Builder , chShutdown chan struct {}) {
207
208
rtr := router .New ()
208
209
rtr .GET ("/healtz" , requestHandler )
210
+ rtr .GET ("/healthz" , requestHandler )
209
211
// all others will be 404
210
212
go func () {
211
213
server := fasthttp.Server {
@@ -228,5 +230,11 @@ func addLocalDefaultService(builder *Builder, chShutdown chan struct{}) {
228
230
229
231
func requestHandler (ctx * fasthttp.RequestCtx ) {
230
232
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
+ }
232
240
}
0 commit comments