layer1: add default watcher config helper

This commit is contained in:
Naeel
2026-04-26 11:03:39 +03:00
parent d24605a8b8
commit 6e037a506d
6 changed files with 54 additions and 18 deletions
+1 -6
View File
@@ -24,12 +24,7 @@ func StartNSWatcher(
ts *HTTPTriggerSet,
mgr manager.Interface,
) {
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, kubeClient, mgr, utils.ManagedNamespaceWatcherConfig{
Component: "router.NSWatcher",
Namespaces: utils.DefaultNSResolver().Snapshot(),
RemovalStrategy: utils.NamespaceRemovalStrategyTrackOnly,
Subscriber: NewNamespaceSubscriber(ts, mgr),
})
_, err := utils.RunManagedNamespaceWatcher(ctx, logger, kubeClient, mgr, utils.NewDefaultManagedNamespaceWatcherConfig("router.NSWatcher", NewNamespaceSubscriber(ts, mgr)))
if err != nil {
logger.Error("router.NSWatcher: BootstrapAndDispatch failed", zap.Error(err))
}