layer1: fix managed watcher config wiring
This commit is contained in:
@@ -71,12 +71,6 @@ import (
|
||||
"github.com/fission/fission/pkg/utils"
|
||||
"github.com/fission/fission/pkg/utils/manager"
|
||||
)
|
||||
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, kubernetesClient, mgr, utils.ManagedNamespaceWatcherConfig{
|
||||
Component: "multitenant.NSWatcher",
|
||||
Namespaces: utils.DefaultNSResolver().Snapshot(),
|
||||
RemovalStrategy: utils.NamespaceRemovalStrategyTrackOnly,
|
||||
Subscriber: NewNamespaceSubscriber(logger, kubernetesClient, executorTypes, mgr),
|
||||
})
|
||||
// StartNSWatcher registers a Kubernetes Namespace Informer that reacts immediately
|
||||
// when a Namespace with label fission.io/managed=true is created or relabeled.
|
||||
//
|
||||
@@ -92,7 +86,12 @@ func StartNSWatcher(
|
||||
executorTypes map[fv1.ExecutorType]executortype.ExecutorType,
|
||||
mgr manager.Interface,
|
||||
) {
|
||||
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, "multitenant.NSWatcher", kubernetesClient, mgr, utils.DefaultNSResolver().Snapshot(), utils.NamespaceRemovalStrategyTrackOnly, NewNamespaceSubscriber(logger, kubernetesClient, executorTypes, mgr))
|
||||
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, kubernetesClient, mgr, utils.ManagedNamespaceWatcherConfig{
|
||||
Component: "multitenant.NSWatcher",
|
||||
Namespaces: utils.DefaultNSResolver().Snapshot(),
|
||||
RemovalStrategy: utils.NamespaceRemovalStrategyTrackOnly,
|
||||
Subscriber: NewNamespaceSubscriber(logger, kubernetesClient, executorTypes, mgr),
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("multitenant.NSWatcher: BootstrapAndDispatch failed", zap.Error(err))
|
||||
}
|
||||
|
||||
@@ -14,12 +14,6 @@ import (
|
||||
"github.com/fission/fission/pkg/utils"
|
||||
"github.com/fission/fission/pkg/utils/manager"
|
||||
)
|
||||
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, kubeClient, mgr, utils.ManagedNamespaceWatcherConfig{
|
||||
Component: "router.NSWatcher",
|
||||
Namespaces: utils.DefaultNSResolver().Snapshot(),
|
||||
RemovalStrategy: utils.NamespaceRemovalStrategyTrackOnly,
|
||||
Subscriber: NewNamespaceSubscriber(ts, mgr),
|
||||
})
|
||||
// StartNSWatcher registers a Kubernetes Namespace Informer for the router.
|
||||
// Whenever a Namespace with label fission.io/managed=true appears (or is relabeled),
|
||||
// the router immediately subscribes to HTTPTriggers and Functions in that namespace.
|
||||
@@ -30,7 +24,12 @@ func StartNSWatcher(
|
||||
ts *HTTPTriggerSet,
|
||||
mgr manager.Interface,
|
||||
) {
|
||||
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, "router.NSWatcher", kubeClient, mgr, utils.DefaultNSResolver().Snapshot(), utils.NamespaceRemovalStrategyTrackOnly, NewNamespaceSubscriber(ts, mgr))
|
||||
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, kubeClient, mgr, utils.ManagedNamespaceWatcherConfig{
|
||||
Component: "router.NSWatcher",
|
||||
Namespaces: utils.DefaultNSResolver().Snapshot(),
|
||||
RemovalStrategy: utils.NamespaceRemovalStrategyTrackOnly,
|
||||
Subscriber: NewNamespaceSubscriber(ts, mgr),
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("router.NSWatcher: BootstrapAndDispatch failed", zap.Error(err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user