mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Make EnablePodSchedulingReadiness public
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
		@@ -32,7 +32,7 @@ const Name = names.SchedulingGates
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// SchedulingGates checks if a Pod carries .spec.schedulingGates.
 | 
					// SchedulingGates checks if a Pod carries .spec.schedulingGates.
 | 
				
			||||||
type SchedulingGates struct {
 | 
					type SchedulingGates struct {
 | 
				
			||||||
	enablePodSchedulingReadiness bool
 | 
						EnablePodSchedulingReadiness bool
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var _ framework.PreEnqueuePlugin = &SchedulingGates{}
 | 
					var _ framework.PreEnqueuePlugin = &SchedulingGates{}
 | 
				
			||||||
@@ -43,7 +43,7 @@ func (pl *SchedulingGates) Name() string {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (pl *SchedulingGates) PreEnqueue(ctx context.Context, p *v1.Pod) *framework.Status {
 | 
					func (pl *SchedulingGates) PreEnqueue(ctx context.Context, p *v1.Pod) *framework.Status {
 | 
				
			||||||
	if !pl.enablePodSchedulingReadiness || len(p.Spec.SchedulingGates) == 0 {
 | 
						if !pl.EnablePodSchedulingReadiness || len(p.Spec.SchedulingGates) == 0 {
 | 
				
			||||||
		return nil
 | 
							return nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	gates := make([]string, 0, len(p.Spec.SchedulingGates))
 | 
						gates := make([]string, 0, len(p.Spec.SchedulingGates))
 | 
				
			||||||
@@ -63,5 +63,5 @@ func (pl *SchedulingGates) EventsToRegister() []framework.ClusterEventWithHint {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// New initializes a new plugin and returns it.
 | 
					// New initializes a new plugin and returns it.
 | 
				
			||||||
func New(_ context.Context, _ runtime.Object, _ framework.Handle, fts feature.Features) (framework.Plugin, error) {
 | 
					func New(_ context.Context, _ runtime.Object, _ framework.Handle, fts feature.Features) (framework.Plugin, error) {
 | 
				
			||||||
	return &SchedulingGates{enablePodSchedulingReadiness: fts.EnablePodSchedulingReadiness}, nil
 | 
						return &SchedulingGates{EnablePodSchedulingReadiness: fts.EnablePodSchedulingReadiness}, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user