-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom timeout value for webhook calls #3549
Allow custom timeout value for webhook calls #3549
Conversation
Welcome @renan! |
cfc956e
to
a43eaa2
Compare
Thanks, super useful. Can you set the default timeout to 30s? I know it's a ridiculously high value, but this is what the originally unconfigurable webhook timeout was set to and then the default behavior does not change unless users want to override it. |
a43eaa2
to
56e4772
Compare
@bskiba Makes sense. I amended my commit! :) |
Because webhooks add to API request latency, they should evaluate as quickly as possible. timeoutSeconds allows configuring how long the API server should wait for a webhook to respond before treating the call as a failure. The default values from Kubernetes are, however, too large. For admissionregistration.k8s.io/v1 the default value is 10 seconds while for admissionregistration.k8s.io/v1beta1 is 30 seconds. We keep 30 seconds as this was the original unconfigurable value. Signed-off-by: Renan Gonçalves <[email protected]>
56e4772
to
bc5c4a5
Compare
The previously failing test has been now fixed 👍 |
Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bskiba The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@bskiba Awesome, thank you! Oh, and it would be totally awesome if you could release a v0.8.1 or something. My clusters could use this feature 😅 |
Because webhooks add to API request latency, they should evaluate as
quickly as possible. timeoutSeconds allows configuring how long the
API server should wait for a webhook to respond before treating the call
as a failure.
The default values from Kubernetes are, however, too large. For
admissionregistration.k8s.io/v1 the default value is 10 seconds while
for admissionregistration.k8s.io/v1beta1 is 30 seconds!
This custom/default value of 5 seconds should be more than enough for
standard installs.