mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	enhancement(scheduler): share waitingPods among profiles
This commit is contained in:
		| @@ -132,6 +132,7 @@ type frameworkOptions struct { | ||||
| 	extenders              []framework.Extender | ||||
| 	captureProfile         CaptureProfile | ||||
| 	parallelizer           parallelize.Parallelizer | ||||
| 	waitingPods            *waitingPodsMap | ||||
| 	logger                 *klog.Logger | ||||
| } | ||||
|  | ||||
| @@ -221,6 +222,13 @@ func WithMetricsRecorder(r *metrics.MetricAsyncRecorder) Option { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // WithWaitingPods sets waitingPods for the scheduling frameworkImpl. | ||||
| func WithWaitingPods(wp *waitingPodsMap) Option { | ||||
| 	return func(o *frameworkOptions) { | ||||
| 		o.waitingPods = wp | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // WithLogger overrides the default logger from k8s.io/klog. | ||||
| func WithLogger(logger klog.Logger) Option { | ||||
| 	return func(o *frameworkOptions) { | ||||
| @@ -254,7 +262,7 @@ func NewFramework(ctx context.Context, r Registry, profile *config.KubeScheduler | ||||
| 		registry:             r, | ||||
| 		snapshotSharedLister: options.snapshotSharedLister, | ||||
| 		scorePluginWeight:    make(map[string]int), | ||||
| 		waitingPods:          newWaitingPodsMap(), | ||||
| 		waitingPods:          options.waitingPods, | ||||
| 		clientSet:            options.clientSet, | ||||
| 		kubeConfig:           options.kubeConfig, | ||||
| 		eventRecorder:        options.eventRecorder, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 NoicFank
					NoicFank