From 905cb36c29ef091217c8511328007c7a71e9687e Mon Sep 17 00:00:00 2001 From: Dave Protasowski Date: Tue, 25 Nov 2025 16:30:23 -0500 Subject: [PATCH] Skip disabling keep-alives when shutting down the webhook server My theory is that when this happens the go runtime will close idle connections. If by chance the API server is making a request and re-using a connection (that is closing) it will receive an io.EOF. Thus introducing a flake. So we now remove this setting change and let all the connections close during the regular graceful shutdown. We would have already lame ducked so the webhook shouldn't be receiving new requests. --- webhook/webhook.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/webhook/webhook.go b/webhook/webhook.go index 089ccf4a89..32e6cff83d 100644 --- a/webhook/webhook.go +++ b/webhook/webhook.go @@ -333,9 +333,6 @@ func (wh *Webhook) Run(stop <-chan struct{}) error { select { case <-stop: eg.Go(func() error { - // As we start to shutdown, disable keep-alives to avoid clients hanging onto connections. - server.SetKeepAlivesEnabled(false) - // Start failing readiness probes immediately. logger.Info("Starting to fail readiness probes...") drainer.Drain()