• Kubernetes Submit Queue's avatar
    Merge pull request #59840 from jennybuckley/webhooks-on-webhooks · 5066a67c
    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>.
    
    Prevent webhooks from affecting admission requests for WebhookConfiguration objects
    
    **What this PR does / why we need it**:
    As it stands now webhooks can be added to the system which make it impossible for a user to remove that webhook, or two webhooks could be registered which make it impossible to remove each other.
    
    The first commit of this will add a test to make sure webhook deletion is never blocked by a webhook. This test will fail until the second commit is added which will prevent webhooks from affecting admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects in the admissionregistration.k8s.io group
    
    - [x] Test that webhook deletion is never blocked by a webhook ([test fails before second commit](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/59840/pull-kubernetes-e2e-gce/23731/))
    - [x] Prevent webhooks from being called on admission requests for [Validating|Mutating]WebhookConfiguration objects
    - [x] Document this new behavior maybe in another PR
    
    **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
    Part of fixing #59124 (Verifies that it can remove the broken webhook.)
    
    **Release note**:
    ```release-note
    ValidatingWebhooks and MutatingWebhooks will not be called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects in the admissionregistration.k8s.io group
    ```
    5066a67c
Name
Last commit
Last update
..
admissionregistration.k8s.io Loading commit data...
apps Loading commit data...
authentication.k8s.io Loading commit data...
authorization.k8s.io Loading commit data...
autoscaling Loading commit data...
batch Loading commit data...
certificates.k8s.io/v1beta1 Loading commit data...
events.k8s.io/v1beta1 Loading commit data...
extensions/v1beta1 Loading commit data...
networking.k8s.io/v1 Loading commit data...
policy/v1beta1 Loading commit data...
rbac.authorization.k8s.io Loading commit data...
scheduling.k8s.io/v1alpha1 Loading commit data...
settings.k8s.io/v1alpha1 Loading commit data...
storage.k8s.io Loading commit data...
v1 Loading commit data...
OWNERS Loading commit data...