Commit Graph

4 Commits

Author SHA1 Message Date
Dave Protasowski 44d1d7d978
Go1.19 changes (#2631)
* run goimports

* ignore linter errors for now

* fix boilerplate
2022-11-03 22:34:05 +00:00
Markus Thömmes 8c88fa2764
Revert "Remove the unused file (#1935)" (#2213)
* Revert "Remove the unused file (#1935)"

This reverts commit e45bbefd1d.

* Add deprecation notice

* Ignore deprecation error of the alias
2021-08-18 03:57:08 -07:00
Victor Agababov e45bbefd1d
Remove the unused file (#1935)
Everyone is actually using the aliased option
2020-12-02 16:53:09 -08:00
Matt Moore e193c4be24
Implement a new shared "Drainer" handler. (#1517)
* Implement a new shared "Drainer" handler.

This implements a new `http.Handler` called `Drainer`, which is intended to wrap some inner `http.Handler` business logic with a new outer handler that can respond to Kubelet probes (successfully until told to "Drain()").

This takes over the webhook's relatively new probe handling and lame duck logic with one key difference.  Previously the webhook waited for a fixed period after SIGTERM before exitting, but the new logic waits for this same grace period AFTER THE LAST REQUEST.  So if the handler keeps getting (non-probe) requests, the timer will continually reset, and once it stops receiving requests for the configured grace period, "Drain()" will return and the webhook will exit.

The goal of this work is to try to better cope with what we believe to be high tail latencies of the API server seeing that a webhook replica is shutting down.

Related: https://github.com/knative/pkg/issues/1509

* Switch to RWLock
2020-07-17 21:25:34 -07:00