• Kubernetes Submit Queue's avatar
    Merge pull request #52227 from liggitt/non-preferred-version-priority · 77e660ed
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 52227, 52120)
    
    Fix discovery restmapper finding resources in non-preferred versions
    
    Fixes: #52219
    
    Also reverts behavioral changes to tests that version-qualified cronjobs to work around this issue.
    
    The discovery rest mapper was only populating the priority rest mapper's search list with preferred groupversions.
    
    That meant that if a resource existed in multiple non-preferred versions, AND did not exist in the preferred version (like cronjob, which only exists in v1beta2.batch and v2alpha1.batch, but not v1.batch), the priority restmapper would not find it in its group/version priority list, and would return an error.
    
    ```release-note
    Fixed an issue looking up cronjobs when they existed in more than one API version
    ```
    77e660ed
Name
Last commit
Last update
..
src/k8s.io Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
godeps-json-updater.go Loading commit data...
prime-apimachinery.sh Loading commit data...