Fix router health route not found if no HTTP triggers created (#1333)

Router readiness probe failed due to kubelet cannot find router healthz endpoint.
This is caused that the healthz endpoint is added only when there is any update request
send to the updateRouterRequestChannel, and makes router failed.

This PR sends an update request right before the router is started to avoid the problem.
This commit is contained in:
Ta-Ching Chen
2019-09-28 17:43:04 +08:00
committed by GitHub
parent 71b587b58e
commit e734fa3554
+2 -1
View File
@@ -71,7 +71,7 @@ func makeHTTPTriggerSet(logger *zap.Logger, fmap *functionServiceMap, frmap *fun
kubeClient: kubeClient,
executor: executor,
crdClient: crdClient,
updateRouterRequestChannel: make(chan struct{}),
updateRouterRequestChannel: make(chan struct{}, 10), // use buffer channel
tsRoundTripperParams: params,
isDebugEnv: isDebugEnv,
svcAddrUpdateThrottler: actionThrottler,
@@ -103,6 +103,7 @@ func (ts *HTTPTriggerSet) subscribeRouter(ctx context.Context, mr *mutableRouter
return
}
go ts.updateRouter()
go ts.syncTriggers()
go ts.runWatcher(ctx, ts.funcController)
go ts.runWatcher(ctx, ts.triggerController)
if ts.recorderSet.recController != nil {