k3s/test/utils
Kubernetes Submit Queue 5066a67caa
Merge pull request #59840 from jennybuckley/webhooks-on-webhooks
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
```
2018-03-05 19:09:33 -08:00
..
image Prevent webhooks from affecting admission requests for webhooks 2018-03-05 16:35:52 -08:00
junit update BUILD files 2017-10-15 18:18:13 -07:00
BUILD Add retries to resource deletions in testing framework 2018-03-01 15:18:46 +01:00
conditions.go fix-todo 2017-09-25 15:42:21 +08:00
create_resources.go Include EOF errors also as retryable errors 2018-02-27 15:32:44 +01:00
delete_resources.go Add retries to resource deletions in testing framework 2018-03-01 15:18:46 +01:00
density_utils.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
deployment.go add basic functionality deployment integration tests 2018-02-01 16:21:07 -08:00
pod_store.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
replicaset.go add basic functionality deployment integration tests 2018-02-01 16:21:07 -08:00
runners.go Add retries to resource deletions in testing framework 2018-03-01 15:18:46 +01:00
tmpdir.go
update_resources.go Move retry-based updates to a different pkg 2018-02-26 13:54:02 +01:00