Skip to content

Commit 445f911

Browse files
authored
Skip disabling keep-alives when shutting down the webhook server (#3295)
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.
1 parent 93e95a6 commit 445f911

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

webhook/webhook.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,6 @@ func (wh *Webhook) Run(stop <-chan struct{}) error {
333333
select {
334334
case <-stop:
335335
eg.Go(func() error {
336-
// As we start to shutdown, disable keep-alives to avoid clients hanging onto connections.
337-
server.SetKeepAlivesEnabled(false)
338-
339336
// Start failing readiness probes immediately.
340337
logger.Info("Starting to fail readiness probes...")
341338
drainer.Drain()

0 commit comments

Comments
 (0)