mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Improve the performance of schedulinggates
This commit is contained in:
parent
47f1bd9f80
commit
887654160f
@ -46,7 +46,7 @@ func (pl *SchedulingGates) PreEnqueue(ctx context.Context, p *v1.Pod) *framework
|
|||||||
if !pl.enablePodSchedulingReadiness || len(p.Spec.SchedulingGates) == 0 {
|
if !pl.enablePodSchedulingReadiness || len(p.Spec.SchedulingGates) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
var gates []string
|
gates := make([]string, 0, len(p.Spec.SchedulingGates))
|
||||||
for _, gate := range p.Spec.SchedulingGates {
|
for _, gate := range p.Spec.SchedulingGates {
|
||||||
gates = append(gates, gate.Name)
|
gates = append(gates, gate.Name)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user