Integrate convertion tool to kubectl

Added 'convert' subcommand to kubectl to convert config files
between different API versions.
This commit is contained in:
hurf
2015-07-16 17:20:53 +08:00
parent 86fdc3f85c
commit e1b88c6942
43 changed files with 557 additions and 33 deletions

View File

@@ -66,6 +66,7 @@ func (m *Mapper) InfoForData(data []byte, source string) (*Info, error) {
if err != nil {
return nil, fmt.Errorf("unable to connect to a server to handle %q: %v", mapping.Resource, err)
}
name, _ := mapping.MetadataAccessor.Name(obj)
namespace, _ := mapping.MetadataAccessor.Namespace(obj)
resourceVersion, _ := mapping.MetadataAccessor.ResourceVersion(obj)