Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for StoredExpressions (0.27 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/policy/validating/plugin.go

    	}
    	res := NewValidator(
    		filterCompiler.Compile(convertv1Validations(policy.Spec.Validations), optionalVars, environment.StoredExpressions),
    		matcher,
    		filterCompiler.Compile(convertv1AuditAnnotations(policy.Spec.AuditAnnotations), optionalVars, environment.StoredExpressions),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. pkg/apis/resource/structured/namedresources/validation/validation.go

    	validateAttributeName = corevalidation.ValidateDNS1123Subdomain
    )
    
    type Options struct {
    	// StoredExpressions must be true if and only if validating CEL
    	// expressions that were already stored persistently. This makes
    	// validation more permissive by enabling CEL definitions that are not
    	// valid yet for new expressions.
    	StoredExpressions bool
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:26:20 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go

    		if compilation.Error != nil {
    			// Shouldn't happen because of validation.
    			return nil, fmt.Errorf("compile class filter CEL expression: %w", compilation.Error)
    		}
    		c.filter = &compilation
    	}
    	for _, request := range requests {
    		compilation := cel.Compiler.CompileCELExpression(request.Selector, environment.StoredExpressions)
    		if compilation.Error != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:26:16 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/mutation/env_test.go

    			IntroducedVersion: version.MajorMinor(1, 30),
    			EnvOptions:        envOptions,
    		})
    	if err != nil {
    		t.Fatalf("fail to create env set: %v", err)
    	}
    	env, err := envSet.Env(environment.StoredExpressions)
    	if err != nil {
    		t.Fatalf("fail to setup env: %v", env)
    	}
    	return env
    }
    
    // mustCreateEnvWithOptional creates the default env for testing, with given option,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/cel/mutation/unstructured/typeresolver_test.go

    			IntroducedVersion: version.MajorMinor(1, 30),
    			EnvOptions:        envOptions,
    		})
    	if err != nil {
    		t.Fatalf("fail to create env set: %v", err)
    	}
    	env, err := envSet.Env(environment.StoredExpressions)
    	if err != nil {
    		t.Fatalf("fail to setup env: %v", env)
    	}
    	return env
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top