mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-26 19:35:10 +00:00
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: Monis Khan <mkhan@redhat.com> @kubernetes/sig-api-machinery-misc