From 6786d6691ae290f3953d63a071049b4c89ac418d Mon Sep 17 00:00:00 2001 From: wojtekt Date: Wed, 7 Mar 2018 12:26:02 +0100 Subject: [PATCH] Avoid reallocating of map in PodToSelectableFields --- pkg/registry/core/pod/strategy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/core/pod/strategy.go b/pkg/registry/core/pod/strategy.go index 1f2acb41a30..90118016cdb 100644 --- a/pkg/registry/core/pod/strategy.go +++ b/pkg/registry/core/pod/strategy.go @@ -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)