mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
RESTMapper should take into account multiple versions
When a CLI command `kubectl get rc --api-version=v1beta3` is called,
the API resource name should match v1beta3, not whatever the default
RESTMapper version is. This allows the correct resource name to be
returned ("replicationcontrollers", instead of "replicationControllers").
This commit is contained in:
@@ -106,5 +106,5 @@ type RESTMapping struct {
|
||||
// consumers of Kubernetes compatible REST APIs as defined in docs/api-conventions.md.
|
||||
type RESTMapper interface {
|
||||
VersionAndKindForResource(resource string) (defaultVersion, kind string, err error)
|
||||
RESTMapping(version, kind string) (*RESTMapping, error)
|
||||
RESTMapping(kind string, versions ...string) (*RESTMapping, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user