diff --git a/pkg/executor/executortype/poolmgr/gpm.go b/pkg/executor/executortype/poolmgr/gpm.go index dcf98fb8..4c806c67 100644 --- a/pkg/executor/executortype/poolmgr/gpm.go +++ b/pkg/executor/executortype/poolmgr/gpm.go @@ -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())