executor: update gpm.podLister in AddNamespace to fix IsValid nil panic

This commit is contained in:
Naeel
2026-04-27 14:43:10 +03:00
parent 775845b55c
commit 0cae275dbd
+5
View File
@@ -833,6 +833,11 @@ func (gpm *GenericPoolManager) AddNamespace(ctx context.Context, ns string, mgr
return fmt.Errorf("AddNamespace %s: register informers: %w", ns, err)
}
// Also update gpm.podLister so IsValid can resolve pods in this namespace.
// Without this line gpm.podLister[ns] is nil for dynamically-added user namespaces,
// causing a nil-pointer panic in IsValid, which leaves activeRequests permanently stuck at 1.
gpm.podLister[ns] = gpmInformer.Core().V1().Pods().Lister()
// Start the factories — they will begin syncing immediately.
finformer.Start(ctx.Done())
gpmInformer.Start(ctx.Done())