Commit Graph

22 Commits

Author SHA1 Message Date
Stanislav Laznicka cd3019f777 webhooks, aggregation: add metrics to count certs with SHA1 signatures
Extends the certificate attribute deprecation RoundTrippers wrapper with
a checker that counts certificates with sha-1 signatures in server responses.

Non-root non-self-signed SHA-1 certificate signatures were deprecated in
Golang 1.18.

Kubernetes-commit: 499ee65a9b0cd45d41716b513fae0d537f7f9c88
2022-03-24 01:08:02 -04:00
Monis Khan 2d35015235 webhook: use rest.Config instead of kubeconfig file as input
This change updates the generic webhook logic to use a rest.Config
as its input instead of a kubeconfig file.  This exposes all of the
rest.Config knobs to the caller instead of the more limited set
available through the kubeconfig format.  This is useful when this
code is being used as a library outside of core Kubernetes. For
example, a downstream consumer may want to override the webhook's
internals such as its TLS configuration.

Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: fef7d0ef1e1fbff65e8d445256036704bb9dbcbd
2021-07-23 11:15:47 -04:00
Stanislav Laznicka 7eb7056b38 webhooks,aggregation: add metrics to count certs missing SAN
Adds counters to generic webhook code and to the kube aggregator
so that it is possible to effectively measure the impact of
Golang 1.15's deprecation of x509 cert CN hostname
verification.

Kubernetes-commit: 9d6a19efff05a40081337a2fcb3dce6331b04022
2020-10-06 13:02:52 +02:00
Abu Kashem 5254108841 make backoff parameters configurable for webhook
Currently webhook retry backoff parameters are hard coded, we want
to have the ability to configure the backoff parameters for webhook
retry logic.

Kubernetes-commit: 53a1307f68ccf6c9ffd252eeea2b333e818c1103
2020-10-30 11:25:32 -04:00
Abu Kashem 67f1bb6022 Webhook: handle error when calling wait.ExponentialBackoff
- Inside WithExponentialBackoff function, handle error returned
by wait.ExponentialBackoff.
- Ensure that the wait time is bound to the given context.

Kubernetes-commit: f8e35de156f212b6989b465e608dd99b525bd5dc
2020-10-26 11:37:11 -04:00
Gaurav Singh 43ce4f9092 Remove double import of k8s.io/apimachinery/pkg/util/net
Kubernetes-commit: 29ceb8d5f2fc48d1fe4974110b7f60579668c00e
2020-04-08 16:25:23 -04:00
Jefftree 13613a1c15 Address comment and remove if condition
Kubernetes-commit: 61fa4e6c098559b65fe28c1bf55cb817697e38e5
2020-02-27 17:18:57 -08:00
Jefftree f1c9537c7b pass Dialer instead of egressselector to webhooks
Kubernetes-commit: 1b38199ea8b220be0b645af8a4cbdef4c87ce7fc
2019-12-05 17:28:59 -08:00
Jefftree aa55f94611 authentication webhook via network proxy
Kubernetes-commit: d318e52ffe0ba156a96cb5507026de6827d543ca
2019-12-03 15:20:49 -08:00
Jordan Liggitt 8c0dc1fdf9 Ensure webhook backend requests are not artificially rate-limited
Kubernetes-commit: d620493b7430c0f59d7393c3de8451d6a686c0c1
2019-12-02 11:39:16 -05:00
shturec b054ff44ee custom retry strategy in GenericWebhook
Kubernetes-commit: 4877b0b7b50bdc3eaaadd3f968fd846c1396b708
2019-09-27 13:04:10 +03:00
Jordan Liggitt 0ca78287c0 Propagate context to ExponentialBackoff
Kubernetes-commit: 4c686ddc1c5f9bc5c28d711dd56551b1ac003faa
2019-09-24 09:43:04 -04:00
Odin Ugedal 1be6195f27 Fix file permissions for non executable files
Normal files should have permissions 644 by default,
and does not require the last bit to be
executable

Signed-off-by: Odin Ugedal <odin@ugedal.com>

Kubernetes-commit: 35cb87f9cf71776e99a970dfff751cd29ba7ebfb
2019-06-14 21:04:39 +02:00
Patrick Barker 53adc37659 updates shared apiserver webhook client
Kubernetes-commit: 5874a1f8faab92aacc5503aa6dbf1c6a724f832f
2018-10-21 10:03:28 -05:00
David Eads c41d1d0993 simplify api registration
Kubernetes-commit: c5445d3c56e06ab366b9cca34bd69c5cc386ec47
2018-05-07 08:32:20 -04:00
David Eads 88d943c0e6 eliminate indirection from type registration
Kubernetes-commit: e7fbbe0e3c91f34836b999e695aa133503cfdae5
2018-04-24 08:21:23 -04:00
Cao Shufeng 2a2505e824 remove duplicated import
Kubernetes-commit: 4e7398b67b12390486012dd6f9d708dd64f961f3
2018-01-11 19:15:11 +08:00
Mik Vyatskov 470942c90d Always retry network connection error in webhook
Signed-off-by: Mik Vyatskov <vmik@google.com>

Kubernetes-commit: 59bacba0565b3849d939e9330ffd4da2ae19f0e1
2017-10-15 16:52:15 +02:00
Eric Chiang 1f5bdb8525 generic webhook: set a default timeout for webhook requests
Add a 30 second timeout for all HTTP requests that the webhook sends
so they timeout instead of hanging forever.

Kubernetes-commit: 2de3ee5c48503d3b3214aef55ae7fd0dacc40457
2017-10-11 17:44:29 -07:00
Clayton Coleman 0d288373d0 SuggestClientDelay is not about retrying, clarify message and header
SuggestClientDelay is returning whether the server has requested that
the client delay their next action. It is *not* about whether the client
should retry the action. Webhook was using it incorrectly, and the
method is now up to date.

Kubernetes-commit: 04846cc25b862c1eabff03ea0b11cbf2f7fae8e2
2017-08-29 13:14:37 +00:00
deads2k 2770a87575 stop hardcoding api registry and codecs in webhook 2017-01-27 08:47:01 -05:00
Dr. Stefan Schimanski dc90e9a003 genericapiserver: move packages
Towards a sane k8s.io/apiserver package structure.
2017-01-19 10:27:27 -05:00