layer1: fix buildermgr namespace dedup step 4
This commit is contained in:
@@ -333,9 +333,9 @@ func setInitialBuildStatus(ctx context.Context, fissionClient versioned.Interfac
|
||||
}
|
||||
|
||||
// AddNamespace dynamically registers a new namespace in packageWatcher.
|
||||
// Creates per-NS Package and Pod informers. Safe to call repeatedly.
|
||||
// Creates per-NS Package and Pod informers. Safe to call repeatedly — deduplicates via local informer maps.
|
||||
func (pkgw *packageWatcher) AddNamespace(ctx context.Context, ns string, mgr manager.Interface) {
|
||||
if !pkgw.nsResolver.AddNamespace(ns) {
|
||||
if _, exists := pkgw.pkgInformer[ns]; exists {
|
||||
return // already registered
|
||||
}
|
||||
pkgw.logger.Info("buildermgr.pkgWatcher.AddNamespace: setting up informers", zap.String("namespace", ns))
|
||||
|
||||
Reference in New Issue
Block a user