From 0d30e21867c12001740501483b41228cdb2b654e Mon Sep 17 00:00:00 2001 From: Joe Betz Date: Tue, 29 Mar 2022 14:37:57 -0400 Subject: [PATCH] Reduce CEL runtime cost limits by 1/2 based on latency goals --- .../pkg/apiserver/schema/cel/compilation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go index d9a5cdb963b..61b0eee0602 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go @@ -44,11 +44,11 @@ const ( // PerCallLimit specify the actual cost limit per CEL validation call // current PerCallLimit gives roughly 0.1 second for each expression validation call - PerCallLimit = 2000000 + PerCallLimit = 1000000 // RuntimeCELCostBudget is the overall cost budget for runtime CEL validation cost per CustomResource // current RuntimeCELCostBudget gives roughly 1 seconds for CR validation - RuntimeCELCostBudget = 20000000 + RuntimeCELCostBudget = 10000000 // checkFrequency configures the number of iterations within a comprehension to evaluate // before checking whether the function evaluation has been interrupted