layer1: add managed watcher config
This commit is contained in:
@@ -14,7 +14,12 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user