diff --git a/pkg/utils/cel/cel.go b/pkg/utils/cel/cel.go index 9efd0e901b1b..d0f21f251fd2 100644 --- a/pkg/utils/cel/cel.go +++ b/pkg/utils/cel/cel.go @@ -27,8 +27,7 @@ func NewCompiler( matchConditions []admissionregistrationv1.MatchCondition, variables []admissionregistrationv1beta1.Variable, ) (*Compiler, error) { - env := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), false) - env.Extend(environment.VersionedOptions{ + env, err := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), false).Extend(environment.VersionedOptions{ IntroducedVersion: version.MajorMinor(1, 0), EnvOptions: []celgo.EnvOption{ library.JsonParseLib(),