Unverified Commit 5364f7be authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #60880 from wojtek-t/fix_pod_to_selectable_fields

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Avoid reallocating of map in PodToSelectableFields Ref #60589
parents 891b4710 6786d669
...@@ -237,7 +237,7 @@ func PodToSelectableFields(pod *api.Pod) fields.Set { ...@@ -237,7 +237,7 @@ func PodToSelectableFields(pod *api.Pod) fields.Set {
// amount of allocations needed to create the fields.Set. If you add any // 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 // field here or the number of object-meta related fields changes, this should
// be adjusted. // be adjusted.
podSpecificFieldsSet := make(fields.Set, 7) podSpecificFieldsSet := make(fields.Set, 8)
podSpecificFieldsSet["spec.nodeName"] = pod.Spec.NodeName podSpecificFieldsSet["spec.nodeName"] = pod.Spec.NodeName
podSpecificFieldsSet["spec.restartPolicy"] = string(pod.Spec.RestartPolicy) podSpecificFieldsSet["spec.restartPolicy"] = string(pod.Spec.RestartPolicy)
podSpecificFieldsSet["spec.schedulerName"] = string(pod.Spec.SchedulerName) podSpecificFieldsSet["spec.schedulerName"] = string(pod.Spec.SchedulerName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment