mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 20:42:26 +00:00
Return the Kind of the object with the RESTMapper
This commit is contained in:
parent
778a50d00b
commit
dc862ae463
@ -83,6 +83,7 @@ type RESTMapping struct {
|
||||
// APIVersion represents the APIVersion that represents the resource as presented. It is provided
|
||||
// for convenience for passing around a consistent mapping.
|
||||
APIVersion string
|
||||
Kind string
|
||||
|
||||
runtime.Codec
|
||||
MetadataAccessor
|
||||
|
@ -157,8 +157,10 @@ func (m *DefaultRESTMapper) RESTMapping(version, kind string) (*RESTMapping, err
|
||||
}
|
||||
|
||||
return &RESTMapping{
|
||||
Resource: resource,
|
||||
APIVersion: version,
|
||||
Resource: resource,
|
||||
APIVersion: version,
|
||||
Kind: kind,
|
||||
|
||||
Codec: interfaces.Codec,
|
||||
MetadataAccessor: interfaces.MetadataAccessor,
|
||||
}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user