Skip to content

Commit f2b9f9c

Browse files
Skip disabling keep-alives when shutting down the webhook server (#3306)
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. Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
1 parent 4ebd86b commit f2b9f9c

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎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)