From d622b7dc175cbe2d2fdc5157b2af6bb2b17debf4 Mon Sep 17 00:00:00 2001 From: grokspawn Date: Tue, 1 Sep 2026 11:19:13 -0500 Subject: [PATCH] UPSTREAM: : fix webhook finalizer flake Signed-off-by: grokspawn --- openshift/tests-extension/test/webhooks.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openshift/tests-extension/test/webhooks.go b/openshift/tests-extension/test/webhooks.go index 58ba83992c..938c5675d4 100644 --- a/openshift/tests-extension/test/webhooks.go +++ b/openshift/tests-extension/test/webhooks.go @@ -455,6 +455,14 @@ func setupWebhookOperator(ctx SpecContext, k8sClient client.Client, webhookOpera g.Expect(client.IgnoreNotFound(err)).To(Succeed()) g.Expect(apierrors.IsNotFound(err)).To(BeTrue(), "ClusterExtension still exists") }).WithTimeout(helpers.DefaultTimeout).WithPolling(helpers.DefaultPolling).Should(Succeed()) + + // Wait for OLMv1 finalizer cleanup to remove the webhook configurations before + // the namespace DeferCleanup runs. The webhook operator registers failurePolicy:Fail + // admission webhooks; if they outlive their backing service, the namespace controller + // cannot delete resources inside the terminating namespace, causing a 300s deadlock. + // This is deterministic on OVN because pod route teardown is immediate. + By("waiting for webhook configurations to be removed by OLMv1 cleanup") + ensureCleanupWebhookConfigurations(ctx, k8sClient, "vwebhooktest", "mwebhooktest") }) By("waiting for the webhook operator to be installed")