Skip to content

Commit 6b7b8e8

Browse files
authored
Merge pull request kubernetes#129786 from JoelSpeed/drop-netip-variables
Drop declaration of IP/CDIR type CEL variables
2 parents 00fa8f1 + 2b24c51 commit 6b7b8e8

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

staging/src/k8s.io/apiserver/pkg/cel/library/cidr.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ var cidrLibraryDecls = map[string][]cel.FunctionOpt{
160160
}
161161

162162
func (*cidrs) CompileOptions() []cel.EnvOption {
163-
options := []cel.EnvOption{cel.Types(apiservercel.CIDRType),
164-
cel.Variable(apiservercel.CIDRType.TypeName(), types.NewTypeTypeWithParam(apiservercel.CIDRType)),
165-
}
163+
options := []cel.EnvOption{cel.Types(apiservercel.CIDRType)}
166164
for name, overloads := range cidrLibraryDecls {
167165
options = append(options, cel.Function(name, overloads...))
168166
}

staging/src/k8s.io/apiserver/pkg/cel/library/ip.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ var ipLibraryDecls = map[string][]cel.FunctionOpt{
187187
}
188188

189189
func (*ip) CompileOptions() []cel.EnvOption {
190-
options := []cel.EnvOption{cel.Types(apiservercel.IPType),
191-
cel.Variable(apiservercel.IPType.TypeName(), types.NewTypeTypeWithParam(apiservercel.IPType)),
192-
}
190+
options := []cel.EnvOption{cel.Types(apiservercel.IPType)}
193191
for name, overloads := range ipLibraryDecls {
194192
options = append(options, cel.Function(name, overloads...))
195193
}

0 commit comments

Comments
 (0)