Merge pull request #65489 from deads2k/cli-80-convert

Automatic merge from submit-queue (batch tested with PRs 64246, 65489, 65443). 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>.

kubectl convert should not double wrap output in nested lists

@kubernetes/sig-cli-maintainers 
@soltysh 

```release-note
kubectl convert previous created a list inside of a list.  Now it is only wrapped once.
```
This commit is contained in:
Kubernetes Submit Queue 2018-06-27 08:17:13 -07:00 committed by GitHub
commit c581d09bc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,11 @@ func (o *ConvertOptions) RunConvert() error {
}
if meta.IsListType(objects) {
obj, err := objectListToVersionedObject([]runtime.Object{objects}, o.specifiedOutputVersion)
listContent, err := meta.ExtractList(objects)
if err != nil {
return err
}
obj, err := objectListToVersionedObject(listContent, o.specifiedOutputVersion)
if err != nil {
return err
}