• Kubernetes Submit Queue's avatar
    Merge pull request #62659 from enj/enj/i/gc_admission_dynamic_restmapper · b37564d9
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Use a dynamic RESTMapper for admission plugins
    
    **What this PR does / why we need it**:
    
    This change updates the REST mapper used by all admission plugins to be backed by cached discovery information.  This cache is updated every ten seconds via a post start hook and will not attempt to update on calls to `RESTMapping`.  It solely relies on the hook to keep the cache in sync with discovery.
    
    This prevents issues with the `OwnerReferencesPermissionEnforcement` admission plugin when it is used with custom resources that set `blockOwnerDeletion`.
    
    **Which issue(s) this PR fixes**:
    `Fixes #...`
    
    **Special notes for your reviewer**:
    
    There are probably other ways the post start hook could be wired.
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    Signed-off-by: 's avatarMonis Khan <mkhan@redhat.com>
    
    @kubernetes/sig-api-machinery-misc
    b37564d9
Name
Last commit
Last update
..
conformance Loading commit data...
e2e Loading commit data...
e2e_node Loading commit data...
fixtures Loading commit data...
images Loading commit data...
integration Loading commit data...
kubemark Loading commit data...
list Loading commit data...
soak Loading commit data...
typecheck Loading commit data...
utils Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
test_owners.csv Loading commit data...
test_owners.json Loading commit data...