Do not re-initialize the output on label selector conversion

This commit is contained in:
Michal Fojtik 2016-08-01 10:56:46 +02:00
parent 74477a83e4
commit e220f95da7

View File

@ -234,6 +234,9 @@ func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out *
}
func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *unversioned.LabelSelector, s conversion.Scope) error {
if in == nil {
return nil
}
out = new(unversioned.LabelSelector)
for labelKey, labelValue := range *in {
utillabels.AddLabelToSelector(out, labelKey, labelValue)