k3s/pkg/api/meta
Kubernetes Submit Queue e338afbca7 Merge pull request #38533 from DirectXMan12/bug/priority-restmapper-versions
Automatic merge from submit-queue (batch tested with PRs 38720, 38533)

Priority REST Mapper: Actually honor user choice

```release-note
Fixes bug in resolving client-requested API versions
```

RESTMapping takes a desired GroupKind, and a set of versions, and
returns a rest mapper for the first matching version.  It also has a
list of built-in discovered prioritized versions, to which it appends
the user versions.

However, when it goes to parse the versions, it parses them as
GroupVersions.  Since only a version was passed, the group will be the
empty group (""), which will only match rest mappings for the empty
group, ergo, none of the user's versions will match if they are
attempting a match for a non-emtpy-group GroupKind.

This fixes that by taking the parsed GroupVersion, and overriding the
Group with the Group from the passed-in GroupKind.
2016-12-14 05:52:48 -08:00
..
metatypes autoupdate BUILD files 2016-12-12 13:30:07 -08:00
BUILD autoupdate BUILD files 2016-12-12 13:30:07 -08:00
OWNERS Update OWNERS approvers and reviewers: pkg/api 2016-11-09 10:18:08 -08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
errors.go generated: refactor 2016-11-23 22:30:47 -06:00
firsthit_restmapper.go generated: refactor 2016-11-23 22:30:47 -06:00
help.go Switch to use pkg/apis/meta/v1/unstructured and the new interfaces 2016-12-10 18:05:28 -05:00
help_test.go Switch to use pkg/apis/meta/v1/unstructured and the new interfaces 2016-12-10 18:05:28 -05:00
interfaces.go Move OwnerReference to pkg/apis/meta/v1 and remove metatypes pkg 2016-12-10 18:05:28 -05:00
meta.go Move OwnerReference to pkg/apis/meta/v1 and remove metatypes pkg 2016-12-10 18:05:28 -05:00
meta_test.go refactor: generated 2016-12-10 18:05:53 -05:00
multirestmapper.go extended RESTMappings method by a version parameter. 2016-12-05 20:09:36 +01:00
multirestmapper_test.go extended RESTMappings method by a version parameter. 2016-12-05 20:09:36 +01:00
priority.go Priority REST Mapper: Actually honor user choice 2016-12-12 10:54:47 -05:00
priority_test.go Priority REST Mapper: Actually honor user choice 2016-12-12 10:54:47 -05:00
restmapper.go extended RESTMappings method by a version parameter. 2016-12-05 20:09:36 +01:00
restmapper_test.go extended RESTMappings method by a version parameter. 2016-12-05 20:09:36 +01:00
scheme_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
unstructured.go Switch to use pkg/apis/meta/v1/unstructured and the new interfaces 2016-12-10 18:05:28 -05:00