correct the allocated element number of pod selectable field set

pull/6/head
wu8685 2017-08-09 21:02:27 +08:00
parent 3655685d64
commit 10d3ba15a8
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,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, 5) podSpecificFieldsSet := make(fields.Set, 6)
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["status.phase"] = string(pod.Status.Phase) podSpecificFieldsSet["status.phase"] = string(pod.Status.Phase)