mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Update cost budget
This commit is contained in:
parent
2acc22a9a0
commit
31677520f3
@ -18,7 +18,6 @@ package cel
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -43,12 +42,12 @@ const (
|
|||||||
OldScopedVarName = "oldSelf"
|
OldScopedVarName = "oldSelf"
|
||||||
|
|
||||||
// PerCallLimit specify the actual cost limit per CEL validation call
|
// PerCallLimit specify the actual cost limit per CEL validation call
|
||||||
//TODO: pick the number for PerCallLimit
|
// current PerCallLimit gives roughly 0.1 second for each expression validation call
|
||||||
PerCallLimit = uint64(math.MaxInt64)
|
PerCallLimit = 2000000
|
||||||
|
|
||||||
// RuntimeCELCostBudget is the overall cost budget for runtime CEL validation cost per CustomResource
|
// RuntimeCELCostBudget is the overall cost budget for runtime CEL validation cost per CustomResource
|
||||||
//TODO: pick the RuntimeCELCostBudget
|
// current RuntimeCELCostBudget gives roughly 1 seconds for CR validation
|
||||||
RuntimeCELCostBudget = math.MaxInt64
|
RuntimeCELCostBudget = 20000000
|
||||||
)
|
)
|
||||||
|
|
||||||
// CompilationResult represents the cel compilation result for one rule
|
// CompilationResult represents the cel compilation result for one rule
|
||||||
|
Loading…
Reference in New Issue
Block a user