Add a SharedIndexInformer for services and deployments to NewDeploy executor (#2061)
* Add a SharedIndexInformer for services and deployments to NewDeploy executor. This brings the NewDeploy executor behaviour into sync with GenericPoolManager behaviour by caching Kubernetes services and deployments used in per-request function validation. * Create informers in executer by executor label Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: James Sinclair <irgeek@btc.com.au>
This commit is contained in:
co-authored by
James Sinclair
parent
f5dc6ab994
commit
4038f0384b
@@ -257,15 +257,21 @@ func StartExecutor(logger *zap.Logger, functionNamespace string, envBuilderNames
|
||||
|
||||
logger.Info("Starting executor", zap.String("instanceID", executorInstanceID))
|
||||
|
||||
gpm := poolmgr.MakeGenericPoolManager(
|
||||
gpm, err := poolmgr.MakeGenericPoolManager(
|
||||
logger,
|
||||
fissionClient, kubernetesClient, metricsClient,
|
||||
functionNamespace, fetcherConfig, executorInstanceID)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "pool manager creation faied")
|
||||
}
|
||||
|
||||
ndm := newdeploy.MakeNewDeploy(
|
||||
ndm, err := newdeploy.MakeNewDeploy(
|
||||
logger,
|
||||
fissionClient, kubernetesClient, fissionClient.CoreV1().RESTClient(),
|
||||
functionNamespace, fetcherConfig, executorInstanceID)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "new deploy manager creation faied")
|
||||
}
|
||||
|
||||
executorTypes := make(map[fv1.ExecutorType]executortype.ExecutorType)
|
||||
executorTypes[gpm.GetTypeName()] = gpm
|
||||
|
||||
Reference in New Issue
Block a user