Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for StoredExpressions (0.2 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/environment/environment.go

    	// permissive environment available.
    	//
    	// StoredExpressions is appropriate for use with CEL expressions in
    	// configuration files.
    	StoredExpressions Type = "StoredExpressions"
    )
    
    // EnvSet manages the creation and extension of CEL environments. Each EnvSet contains
    // both an NewExpressions and StoredExpressions environment. EnvSets are created
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 08 15:52:31 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/environment/environment_test.go

    			typeVersionCombinations: []envTypeAndVersion{
    				{version.MajorMinor(1, 28), NewExpressions},
    				{version.MajorMinor(1, 26), StoredExpressions},
    				{version.MajorMinor(1, 27), StoredExpressions},
    				{version.MajorMinor(1, 28), StoredExpressions},
    			},
    			validExpressions: []string{"test() == false", "testV1() == true"},
    			opts: []VersionedOptions{
    				{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/compile_test.go

    		},
    		{
    			name: "compile with storage environment should recognize functions available only in the storage environment",
    			expressions: []string{
    				"test() == true",
    			},
    			envType: environment.StoredExpressions,
    		},
    		{
    			name: "compile with supported environment should not recognize functions available only in the storage environment",
    			errorExpressions: map[string]string{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go

    			expressions,
    			cel.OptionalVariableDeclarations{
    				HasParams:     false,
    				HasAuthorizer: true,
    				StrictCost:    strictCost,
    			},
    			environment.StoredExpressions,
    		), m.FailurePolicy, "webhook", "admit", m.Name)
    	})
    	return m.compiledMatcher
    }
    
    func (m *mutatingWebhookAccessor) GetParsedNamespaceSelector() (labels.Selector, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go

    }
    
    // EnvLoader delegates the decision of which CEL environment to use for each expression.
    // Callers should return the appropriate CEL environment based on the guidelines from
    // environment.NewExpressions and environment.StoredExpressions.
    type EnvLoader interface {
    	// RuleEnv returns the appropriate environment from the EnvSet for the given CEL rule.
    	RuleEnv(envSet *environment.EnvSet, expression string) *cel.Env
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/typechecking.go

    		}
    		compiler.CompileAndStoreVariables(convertv1beta1Variables(ctx.variables), options, environment.StoredExpressions)
    		result := compiler.CompileCELExpression(celExpression(expression), options, environment.StoredExpressions)
    		if err := result.Error; err != nil {
    			typeCheckingResult := &TypeCheckingResult{GVK: gvk}
    			if err.Type == apiservercel.ErrorTypeInvalid {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  7. pkg/apis/resource/structured/namedresources/validation/validation_test.go

    		t.Run(name, func(t *testing.T) {
    			// At the moment, there's no difference between stored and new expressions.
    			// This uses the stricter validation.
    			opts := Options{
    				StoredExpressions: false,
    			}
    			errs := validateSelector(opts, scenario.selector, nil)
    			assert.Equal(t, scenario.wantFailures, errs)
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:13 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. pkg/apis/resource/validation/validation.go

    	entries := sets.New[string]()
    	if model.NamedResources != nil {
    		entries.Insert("namedResources")
    		allErrs = append(allErrs, namedresourcesvalidation.ValidateRequest(namedresourcesvalidation.Options{StoredExpressions: requestStored}, model.NamedResources, fldPath.Child("namedResources"))...)
    	}
    	switch len(entries) {
    	case 0:
    		allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set"))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 09:18:10 UTC 2024
    - 28.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/validator_test.go

    	f := fc.Compile([]cel.ExpressionAccessor{&ValidationCondition{Expression: "[1,2,3,4,5,6,7,8,9,10].map(x, [1,2,3,4,5,6,7,8,9,10].map(y, x*y)) == []"}}, cel.OptionalVariableDeclarations{HasParams: false, HasAuthorizer: false}, environment.StoredExpressions)
    	v := validator{
    		failPolicy:       &fail,
    		celMatcher:       &fakeCELMatcher{matches: true},
    		validationFilter: f,
    		messageFilter:    f,
    		auditAnnotationFilter: &fakeCelFilter{
    			evaluations: nil,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 24.7K bytes
    - Viewed (0)
Back to top