• Kubernetes Submit Queue's avatar
    Merge pull request #38533 from DirectXMan12/bug/priority-restmapper-versions · e338afbc
    Kubernetes Submit Queue authored
    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.
    e338afbc
Name
Last commit
Last update
..
metatypes Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
doc.go Loading commit data...
errors.go Loading commit data...
firsthit_restmapper.go Loading commit data...
help.go Loading commit data...
help_test.go Loading commit data...
interfaces.go Loading commit data...
meta.go Loading commit data...
meta_test.go Loading commit data...
multirestmapper.go Loading commit data...
multirestmapper_test.go Loading commit data...
priority.go Loading commit data...
priority_test.go Loading commit data...
restmapper.go Loading commit data...
restmapper_test.go Loading commit data...
scheme_test.go Loading commit data...
unstructured.go Loading commit data...