Allow namespace configuration for different CRD resources in Fission (#2539)

* Allow multiple namespaces for builder manager
* Enable multiple namespaces for executor informers
* Added missing context
* helm chart support for multiple namespaces
* Directly consume map type from GetInformerForNamespaces fn
* Optimize function resolver by choosing namespace-specific informer
* helm chart support for multiple namespaces
* consider default namespace and move duplicate code to helm template
* Improve documentation for fission namespace values

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: shubham bansal <shubhambansaliimtgn@gmail.com>
This commit is contained in:
Sanket Sudake
2022-10-19 15:48:47 +05:30
committed by GitHub
co-authored by shubham bansal
parent facd14de90
commit 827baea974
27 changed files with 430 additions and 219 deletions
+2 -4
View File
@@ -29,7 +29,6 @@ import (
"github.com/fission/fission/pkg/crd"
"github.com/fission/fission/pkg/executor/util"
fetcherConfig "github.com/fission/fission/pkg/fetcher/config"
genInformer "github.com/fission/fission/pkg/generated/informers/externalversions"
"github.com/fission/fission/pkg/utils"
)
@@ -67,11 +66,10 @@ func Start(ctx context.Context, logger *zap.Logger, storageSvcUrl string, envBui
go envWatcher.watchEnvironments(ctx)
k8sInformerFactory := k8sInformers.NewSharedInformerFactory(kubernetesClient, time.Minute*30)
informerFactory := genInformer.NewSharedInformerFactory(fissionClient, time.Minute*30)
podInformer := k8sInformerFactory.Core().V1().Pods().Informer()
pkgInformer := informerFactory.Core().V1().Packages().Informer()
pkgWatcher := makePackageWatcher(bmLogger, fissionClient,
kubernetesClient, envBuilderNamespace, storageSvcUrl, &podInformer, &pkgInformer)
kubernetesClient, envBuilderNamespace, storageSvcUrl, podInformer,
utils.GetInformersForNamespaces(fissionClient, time.Minute*30, fv1.PackagesResource))
pkgWatcher.Run(ctx)
return nil
}