Commit 627b2f9a authored by Mike Danese's avatar Mike Danese

kubectl should use UnstructuredJSONScheme to decode version and kind, as it…

kubectl should use UnstructuredJSONScheme to decode version and kind, as it throws errors if either are missing]
parent 2bb0fc00
...@@ -42,7 +42,7 @@ func (m *Mapper) InfoForData(data []byte, source string) (*Info, error) { ...@@ -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) return nil, fmt.Errorf("unable to parse %q: %v", source, err)
} }
data = json data = json
version, kind, err := m.DataVersionAndKind(data) version, kind, err := runtime.UnstructuredJSONScheme.DataVersionAndKind(data)
if err != nil { if err != nil {
return nil, fmt.Errorf("unable to get type info from %q: %v", source, err) return nil, fmt.Errorf("unable to get type info from %q: %v", source, err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment