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
Copy file name to clipboardExpand all lines: staging/src/k8s.io/apiserver/pkg/cel/environment/base.go
+27-10Lines changed: 27 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -72,9 +72,9 @@ var baseOptsWithoutStrictCost = []VersionedOptions{
72
72
cel.EagerlyValidateDeclarations(true),
73
73
cel.DefaultUTCTimeZone(true),
74
74
75
-
library.URLs(),
76
-
library.Regex(),
77
-
library.Lists(),
75
+
UnversionedLib(library.URLs),
76
+
UnversionedLib(library.Regex),
77
+
UnversionedLib(library.Lists),
78
78
79
79
// 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.
80
80
// Since it is a regression fix, we apply it uniformly to all code use v0.17.7.
@@ -92,15 +92,15 @@ var baseOptsWithoutStrictCost = []VersionedOptions{
92
92
{
93
93
IntroducedVersion: version.MajorMinor(1, 27),
94
94
EnvOptions: []cel.EnvOption{
95
-
library.Authz(),
95
+
UnversionedLib(library.Authz),
96
96
},
97
97
},
98
98
{
99
99
IntroducedVersion: version.MajorMinor(1, 28),
100
100
EnvOptions: []cel.EnvOption{
101
101
cel.CrossTypeNumericComparisons(true),
102
102
cel.OptionalTypes(),
103
-
library.Quantity(),
103
+
UnversionedLib(library.Quantity),
104
104
},
105
105
},
106
106
// add the new validator in 1.29
@@ -139,15 +139,15 @@ var baseOptsWithoutStrictCost = []VersionedOptions{
139
139
{
140
140
IntroducedVersion: version.MajorMinor(1, 30),
141
141
EnvOptions: []cel.EnvOption{
142
-
library.IP(),
143
-
library.CIDR(),
142
+
UnversionedLib(library.IP),
143
+
UnversionedLib(library.CIDR),
144
144
},
145
145
},
146
146
// Format Library
147
147
{
148
148
IntroducedVersion: version.MajorMinor(1, 31),
149
149
EnvOptions: []cel.EnvOption{
150
-
library.Format(),
150
+
UnversionedLib(library.Format),
151
151
},
152
152
},
153
153
// Authz selectors
@@ -166,14 +166,14 @@ var baseOptsWithoutStrictCost = []VersionedOptions{
0 commit comments