Make EnablePodSchedulingReadiness public

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet 2023-11-03 11:44:56 +08:00
parent d038b65fee
commit 5bf63036c7

View File

@ -32,7 +32,7 @@ const Name = names.SchedulingGates
// SchedulingGates checks if a Pod carries .spec.schedulingGates.
type SchedulingGates struct {
enablePodSchedulingReadiness bool
EnablePodSchedulingReadiness bool
}
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 {
if !pl.enablePodSchedulingReadiness || len(p.Spec.SchedulingGates) == 0 {
if !pl.EnablePodSchedulingReadiness || len(p.Spec.SchedulingGates) == 0 {
return nil
}
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.
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
}