Capture os signals to gracefully shutdown fission components (#2261)
- Currently, fission components don't handle shutdown signals. So we don't get any to do the required cleanup before the fission process exits. Adding signal capture process with cancelling context so that all dependent processes stop working when the process gets term signal. - Set log level to error in otel shutdown function Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -322,11 +322,10 @@ func (pkgw *packageWatcher) packageInformerHandler() k8sCache.ResourceEventHandl
|
||||
}
|
||||
}
|
||||
|
||||
func (pkgw *packageWatcher) Run() {
|
||||
context := context.Background()
|
||||
go (*pkgw.podInformer).Run(context.Done())
|
||||
func (pkgw *packageWatcher) Run(ctx context.Context) {
|
||||
go (*pkgw.podInformer).Run(ctx.Done())
|
||||
(*pkgw.pkgInformer).AddEventHandler(pkgw.packageInformerHandler())
|
||||
(*pkgw.pkgInformer).Run(context.Done())
|
||||
(*pkgw.pkgInformer).Run(ctx.Done())
|
||||
}
|
||||
|
||||
// setInitialBuildStatus sets initial build status to a package if it is empty.
|
||||
|
||||
Reference in New Issue
Block a user