• 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
..
apiserver Loading commit data...
auth Loading commit data...
benchmark/jsonify Loading commit data...
client Loading commit data...
configmap Loading commit data...
daemonset Loading commit data...
defaulttolerationseconds Loading commit data...
deployment Loading commit data...
etcd Loading commit data...
evictions Loading commit data...
examples Loading commit data...
framework Loading commit data...
garbagecollector Loading commit data...
ipamperf Loading commit data...
master Loading commit data...
metrics Loading commit data...
objectmeta Loading commit data...
openshift Loading commit data...
pods Loading commit data...
quota Loading commit data...
replicaset Loading commit data...
replicationcontroller Loading commit data...
scale Loading commit data...
scheduler Loading commit data...
scheduler_perf Loading commit data...
secrets Loading commit data...
serviceaccount Loading commit data...
statefulset Loading commit data...
storageclasses Loading commit data...
tls Loading commit data...
ttlcontroller Loading commit data...
util Loading commit data...
volume Loading commit data...
BUILD Loading commit data...
benchmark-controller.json Loading commit data...
doc.go Loading commit data...
utils.go Loading commit data...