mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
Merge pull request #138919 from jpbetz/minimize-cel-conversions
Skip conversion for empty expression groups
This commit is contained in:
commit
b6b2ab9ded
1 changed files with 4 additions and 0 deletions
|
|
@ -90,6 +90,10 @@ func objectToResolveVal(r runtime.Object) (interface{}, error) {
|
|||
func (c *condition) ForInput(ctx context.Context, versionedAttr *admission.VersionedAttributes, request *admissionv1.AdmissionRequest, inputs OptionalVariableBindings, namespace *v1.Namespace, runtimeCELCostBudget int64) ([]EvaluationResult, int64, error) {
|
||||
// TODO: replace unstructured with ref.Val for CEL variables when native type support is available
|
||||
evaluations := make([]EvaluationResult, len(c.compilationResults))
|
||||
if len(c.compilationResults) == 0 {
|
||||
return evaluations, runtimeCELCostBudget, nil
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
// if this activation supports composition, we will need the compositionCtx. It may be nil.
|
||||
|
|
|
|||
Loading…
Reference in a new issue