layer1: add managed watcher config

This commit is contained in:
Naeel
2026-04-26 11:02:09 +03:00
parent b9236698f3
commit d2ff55f9e0
7 changed files with 89 additions and 12 deletions
+6 -1
View File
@@ -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.