kubectl should use UnstructuredJSONScheme to decode version and kind, as it throws errors if either are missing]

pull/6/head
Mike Danese 2015-06-08 11:42:19 -07:00
parent 2bb0fc00e5
commit 627b2f9a24
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ func (m *Mapper) InfoForData(data []byte, source string) (*Info, error) {
return nil, fmt.Errorf("unable to parse %q: %v", source, err)
}
data = json
version, kind, err := m.DataVersionAndKind(data)
version, kind, err := runtime.UnstructuredJSONScheme.DataVersionAndKind(data)
if err != nil {
return nil, fmt.Errorf("unable to get type info from %q: %v", source, err)
}