mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 23:29:21 +00:00
Make EnablePodSchedulingReadiness public
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
parent
d038b65fee
commit
5bf63036c7
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user