From d064d3dbd211ef6c309c45657fde3434bb368e83 Mon Sep 17 00:00:00 2001 From: Chaitanyareddy0702 <78363486+Chaitanyareddy0702@users.noreply.github.com> Date: Thu, 13 Nov 2025 09:13:35 +0530 Subject: [PATCH] Feat: Add configurable timeout for admission webhooks (#6977) * Feat: Add configurable timeout for admission webhooks Signed-off-by: Amit Singh Signed-off-by: Chaitanyareddy0702 * Feat: Update admission webhook timeout configuration to use admissionWebhookTimeout variable Signed-off-by: Amit Singh Signed-off-by: Chaitanyareddy0702 * Feat: Add admission webhook timeout parameter to README Signed-off-by: Amit Singh Signed-off-by: Chaitanyareddy0702 * removed period in readme to run pipelines Signed-off-by: Vaibhav Agrawal Signed-off-by: Chaitanyareddy0702 --------- Signed-off-by: Amit Singh Signed-off-by: Chaitanyareddy0702 Signed-off-by: Vaibhav Agrawal --- README.md | 2 +- charts/vela-core/README.md | 1 + .../admission-webhooks/mutatingWebhookConfiguration.yaml | 2 ++ .../admission-webhooks/validatingWebhookConfiguration.yaml | 6 +++++- charts/vela-core/values.yaml | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40b89ca86..b8ce7badb 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Check out [KubeVela videos](https://kubevela.io/videos/talks/en/oam-dapr) for th ## Contributing -Check out [CONTRIBUTING](https://kubevela.io/docs/contributor/overview) to see how to develop with KubeVela. +Check out [CONTRIBUTING](https://kubevela.io/docs/contributor/overview) to see how to develop with KubeVela ## Report Vulnerability diff --git a/charts/vela-core/README.md b/charts/vela-core/README.md index 8b078362d..6bd364d2c 100644 --- a/charts/vela-core/README.md +++ b/charts/vela-core/README.md @@ -151,6 +151,7 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai | `devLogs` | Enable formatted logging support for development purpose | `false` | | `logFilePath` | If non-empty, write log files in this path | `""` | | `logFileMaxSize` | Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. | `1024` | +| `admissionWebhookTimeout` | Timeout seconds for admission webhooks | `10` | | `kubeClient.qps` | The qps for reconcile clients | `400` | | `kubeClient.burst` | The burst for reconcile clients | `600` | | `authentication.enabled` | Enable authentication framework for applications | `false` | diff --git a/charts/vela-core/templates/admission-webhooks/mutatingWebhookConfiguration.yaml b/charts/vela-core/templates/admission-webhooks/mutatingWebhookConfiguration.yaml index b0b0b4910..5e4659388 100644 --- a/charts/vela-core/templates/admission-webhooks/mutatingWebhookConfiguration.yaml +++ b/charts/vela-core/templates/admission-webhooks/mutatingWebhookConfiguration.yaml @@ -45,6 +45,7 @@ webhooks: - UPDATE resources: - applications + timeoutSeconds: {{ .Values.admissionWebhookTimeout }} - clientConfig: caBundle: {{ default "Cg==" (get $vals "comps") }} service: @@ -71,5 +72,6 @@ webhooks: - UPDATE resources: - componentdefinitions + timeoutSeconds: {{ .Values.admissionWebhookTimeout }} {{- end -}} diff --git a/charts/vela-core/templates/admission-webhooks/validatingWebhookConfiguration.yaml b/charts/vela-core/templates/admission-webhooks/validatingWebhookConfiguration.yaml index 11ad4bbe8..31dc1c487 100644 --- a/charts/vela-core/templates/admission-webhooks/validatingWebhookConfiguration.yaml +++ b/charts/vela-core/templates/admission-webhooks/validatingWebhookConfiguration.yaml @@ -47,7 +47,7 @@ webhooks: - UPDATE resources: - traitdefinitions - timeoutSeconds: 5 + timeoutSeconds: {{ .Values.admissionWebhookTimeout }} - clientConfig: caBundle: {{ default "Cg==" (get $vals "apps") }} service: @@ -74,6 +74,7 @@ webhooks: - UPDATE resources: - applications + timeoutSeconds: {{ .Values.admissionWebhookTimeout }} - clientConfig: caBundle: {{ default "Cg==" (get $vals "comps") }} service: @@ -100,6 +101,7 @@ webhooks: - UPDATE resources: - componentdefinitions + timeoutSeconds: {{ .Values.admissionWebhookTimeout }} - clientConfig: caBundle: {{ default "Cg==" (get $vals "policies") }} service: @@ -126,6 +128,7 @@ webhooks: - UPDATE resources: - policydefinitions + timeoutSeconds: {{ .Values.admissionWebhookTimeout }} - clientConfig: caBundle: Cg== service: @@ -152,4 +155,5 @@ webhooks: - UPDATE resources: - workflowstepdefinitions + timeoutSeconds: {{ .Values.admissionWebhookTimeout }} {{- end -}} diff --git a/charts/vela-core/values.yaml b/charts/vela-core/values.yaml index 8b2d5fdb9..b888de8ad 100644 --- a/charts/vela-core/values.yaml +++ b/charts/vela-core/values.yaml @@ -267,6 +267,9 @@ logFilePath: "" ## @param logFileMaxSize Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. logFileMaxSize: 1024 +## @param admissionWebhookTimeout Timeout seconds for admission webhooks +admissionWebhookTimeout: 10 + ## @skip admissionWebhooks admissionWebhooks: enabled: true