From c540fd8b84f8a134d577b4096ba5e1df0fbf8977 Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Mon, 15 Jul 2019 18:46:32 +0800 Subject: [PATCH] cleanup: remove useless code `failOpenHook` is validate against `configmaps`, it has nothing to do with pod attaching. Signed-off-by: Dave Chen --- test/e2e/apimachinery/webhook.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/e2e/apimachinery/webhook.go b/test/e2e/apimachinery/webhook.go index da1c980c589..63e01d43676 100644 --- a/test/e2e/apimachinery/webhook.go +++ b/test/e2e/apimachinery/webhook.go @@ -500,10 +500,6 @@ func registerWebhookForAttachingPod(f *framework.Framework, context *certContext namespace := f.Namespace.Name configName := attachingPodWebhookConfigName - // A webhook that cannot talk to server, with fail-open policy - failOpenHook := failingWebhook(namespace, "fail-open.k8s.io") - policyIgnore := admissionregistrationv1beta1.Ignore - failOpenHook.FailurePolicy = &policyIgnore _, err := client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Create(&admissionregistrationv1beta1.ValidatingWebhookConfiguration{ ObjectMeta: metav1.ObjectMeta{