mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Avoid reallocating of map in PodToSelectableFields
This commit is contained in:
parent
891b471064
commit
6786d6691a
@ -237,7 +237,7 @@ func PodToSelectableFields(pod *api.Pod) fields.Set {
|
||||
// amount of allocations needed to create the fields.Set. If you add any
|
||||
// field here or the number of object-meta related fields changes, this should
|
||||
// be adjusted.
|
||||
podSpecificFieldsSet := make(fields.Set, 7)
|
||||
podSpecificFieldsSet := make(fields.Set, 8)
|
||||
podSpecificFieldsSet["spec.nodeName"] = pod.Spec.NodeName
|
||||
podSpecificFieldsSet["spec.restartPolicy"] = string(pod.Spec.RestartPolicy)
|
||||
podSpecificFieldsSet["spec.schedulerName"] = string(pod.Spec.SchedulerName)
|
||||
|
Loading…
Reference in New Issue
Block a user