mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-21 17:48:01 +00:00
Address comment
This commit is contained in:
parent
048cb8b2ed
commit
44898f7909
@ -18,13 +18,13 @@ package environment
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/google/cel-go/checker"
|
|
||||||
"github.com/google/cel-go/interpreter"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/google/cel-go/cel"
|
"github.com/google/cel-go/cel"
|
||||||
|
"github.com/google/cel-go/checker"
|
||||||
"github.com/google/cel-go/ext"
|
"github.com/google/cel-go/ext"
|
||||||
|
"github.com/google/cel-go/interpreter"
|
||||||
"golang.org/x/sync/singleflight"
|
"golang.org/x/sync/singleflight"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/util/version"
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
@ -64,6 +64,7 @@ var baseOpts = []VersionedOptions{
|
|||||||
library.Lists(),
|
library.Lists(),
|
||||||
|
|
||||||
// cel-go v0.17.7 change the cost of has() from 0 to 1, but also provided the CostEstimatorOptions option to preserve the old behavior, so we enabled it at the same time we bumped our cel version to v0.17.7.
|
// cel-go v0.17.7 change the cost of has() from 0 to 1, but also provided the CostEstimatorOptions option to preserve the old behavior, so we enabled it at the same time we bumped our cel version to v0.17.7.
|
||||||
|
// Since it is a regression fix, we apply it uniformly to all code use v0.17.7.
|
||||||
cel.CostEstimatorOptions(checker.PresenceTestHasCost(false)),
|
cel.CostEstimatorOptions(checker.PresenceTestHasCost(false)),
|
||||||
},
|
},
|
||||||
ProgramOptions: []cel.ProgramOption{
|
ProgramOptions: []cel.ProgramOption{
|
||||||
@ -71,6 +72,7 @@ var baseOpts = []VersionedOptions{
|
|||||||
cel.CostLimit(celconfig.PerCallLimit),
|
cel.CostLimit(celconfig.PerCallLimit),
|
||||||
|
|
||||||
// cel-go v0.17.7 change the cost of has() from 0 to 1, but also provided the CostEstimatorOptions option to preserve the old behavior, so we enabled it at the same time we bumped our cel version to v0.17.7.
|
// cel-go v0.17.7 change the cost of has() from 0 to 1, but also provided the CostEstimatorOptions option to preserve the old behavior, so we enabled it at the same time we bumped our cel version to v0.17.7.
|
||||||
|
// Since it is a regression fix, we apply it uniformly to all code use v0.17.7.
|
||||||
cel.CostTrackerOptions(interpreter.PresenceTestHasCost(false)),
|
cel.CostTrackerOptions(interpreter.PresenceTestHasCost(false)),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user