layer1: bootstrap executor namespace manager
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# 2026-04-26 — NamespaceManager rewrite, step 32
|
||||
|
||||
## Цель шага
|
||||
|
||||
Закрыть startup gap в `executor/multitenant`: manager должен отражать стартовые namespace-ы и прогонять их через тот же subscriber path.
|
||||
|
||||
## Что меняем
|
||||
|
||||
1. `StartNSWatcher()` создаёт пустой `NamespaceManager`.
|
||||
2. После `Subscribe()` выполняется `BootstrapAndDispatch()` по snapshot resolver-а.
|
||||
|
||||
## Что НЕ меняем
|
||||
|
||||
- не меняем `registerNamespace()`;
|
||||
- не добавляем remove path.
|
||||
@@ -93,8 +93,11 @@ func StartNSWatcher(
|
||||
executorTypes map[fv1.ExecutorType]executortype.ExecutorType,
|
||||
mgr manager.Interface,
|
||||
) {
|
||||
nsManager := utils.NewBootstrappedNamespaceManager(utils.DefaultNSResolver(), utils.NamespaceSourceEnv, time.Now().UTC())
|
||||
nsManager := utils.NewNamespaceManager()
|
||||
nsManager.Subscribe(NewNamespaceSubscriber(logger, kubernetesClient, executorTypes, mgr))
|
||||
if _, err := nsManager.BootstrapAndDispatch(ctx, utils.DefaultNSResolver().Snapshot(), utils.NamespaceSourceEnv, time.Now().UTC()); err != nil {
|
||||
logger.Error("multitenant.NSWatcher: BootstrapAndDispatch failed", zap.Error(err))
|
||||
}
|
||||
|
||||
// Use a label-filtered informer so only Namespaces with our label are delivered.
|
||||
// The resync period of 30m is standard for Fission informers — it re-lists to recover
|
||||
|
||||
Reference in New Issue
Block a user