mirror of https://github.com/k3s-io/k3s
kubectl should use UnstructuredJSONScheme to decode version and kind, as it throws errors if either are missing]
parent
2bb0fc00e5
commit
627b2f9a24
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue