You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: vertical-pod-autoscaler/pkg/admission-controller/main.go
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,7 @@ var (
63
63
serviceName=flag.String("webhook-service", "vpa-webhook", "Kubernetes service under which webhook is registered. Used when registerByURL is set to false.")
64
64
webhookAddress=flag.String("webhook-address", "", "Address under which webhook is registered. Used when registerByURL is set to true.")
65
65
webhookPort=flag.String("webhook-port", "", "Server Port for Webhook")
66
+
webhookTimeout=flag.Int("webhook-timeout-seconds", 30, "Timeout in seconds that the API server should wait for this webhook to respond before failing.")
66
67
registerWebhook=flag.Bool("register-webhook", true, "If set to true, admission webhook object will be created on start up to register with the API server.")
67
68
registerByURL=flag.Bool("register-by-url", false, "If set to true, admission webhook will be registered by URL (webhookAddress:webhookPort) instead of by service name")
68
69
vpaObjectNamespace=flag.String("vpa-object-namespace", apiv1.NamespaceAll, "Namespace to search for VPA objects. Empty means all namespaces will be used.")
0 commit comments