Merge pull request #54165 from caesarxuchao/webhook-e2e-test
Automatic merge from submit-queue (batch tested with PRs 54165, 53909). 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>. Adding an e2e test for admission webhook Part of https://github.com/kubernetes/features/issues/492 The purpose of this test is making sure the webhooks get called, and the apiserver can communicate with the webhook. We will expand the test cover more webhook features in followups. The webhook used in the test rejects pods with container names "webhook-disallow". Will upload the source code of the example in a follow up PR. Kubernetes-commit: 444d0c11153647d45b899b25a5dbbd3a5ea4a123
This commit is contained in:
commit
52d7687cc0
|
|
@ -298,5 +298,6 @@ func (a *GenericAdmissionWebhook) hookClient(h *v1alpha1.ExternalAdmissionHook)
|
|||
cfg.TLSClientConfig.ServerName = serverName
|
||||
cfg.TLSClientConfig.CAData = h.ClientConfig.CABundle
|
||||
cfg.ContentConfig.NegotiatedSerializer = a.negotiatedSerializer
|
||||
cfg.ContentConfig.ContentType = runtime.ContentTypeJSON
|
||||
return rest.UnversionedRESTClientFor(cfg)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue