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
Currently kro doesn't enforce any limits on CEL expression evaluation costs. We need to implement cost budgeting similar to Kubernetes API server to prevent resource exhaustion from complex expressions. The controller should enforce both per call and total runtime budgets.
const (
// PerCallLimit specifies the cost limit per individual CEL expression evaluation// This gives roughly 0.1 second of execution time per expression evaluationPerCallLimit=1000000// RuntimeCELCostBudget is the total cost budget allowed during a single // ResourceGroup reconciliation cycle. This includes all expression evaluations// across all resources defined in the ResourceGroup. The budget gives roughly// 1 second of total execution time before being exceeded.RuntimeCELCostBudget=10000000// CheckFrequency configures the number of iterations within a comprehension to evaluate// before checking whether the function evaluation has been interruptedCheckFrequency=100
)
Feature Description
Currently kro doesn't enforce any limits on CEL expression evaluation costs. We need to implement cost budgeting similar to Kubernetes API server to prevent resource exhaustion from complex expressions. The controller should enforce both per call and total runtime budgets.
Example constants, inspired from https://github.com/kubernetes/apiserver/blob/2241ea00526fdd746871375dfca871627f6a511a/pkg/apis/cel/config.go#L1
Example error when budget is exceeded:
The text was updated successfully, but these errors were encountered: