Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 227 for CEL (0.02 sec)

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

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package cel
    
    import (
    	"fmt"
    	"reflect"
    
    	"github.com/google/cel-go/cel"
    	"github.com/google/cel-go/checker/decls"
    	"github.com/google/cel-go/common/types"
    	"github.com/google/cel-go/common/types/ref"
    	"k8s.io/apimachinery/pkg/api/resource"
    )
    
    var (
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:23:54 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go

    	c := &Controller{}
    	if filter != nil {
    		compilation := cel.Compiler.CompileCELExpression(filter.Selector, environment.StoredExpressions)
    		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 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:26:16 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/interface.go

    import (
    	"context"
    
    	celgo "github.com/google/cel-go/cel"
    
    	corev1 "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/runtime/schema"
    	"k8s.io/apiserver/pkg/admission"
    	"k8s.io/apiserver/pkg/admission/plugin/cel"
    	"k8s.io/apiserver/pkg/authorization/authorizer"
    )
    
    var _ cel.ExpressionAccessor = &ValidationCondition{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 22 17:47:18 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/matchconditions/matcher.go

    	return v.Expression
    }
    
    func (v *MatchCondition) ReturnTypes() []*cel.Type {
    	return []*cel.Type{cel.BoolType}
    }
    
    var _ Matcher = &matcher{}
    
    // matcher evaluates compiled cel expressions and determines if they match the given request or not
    type matcher struct {
    	filter      celplugin.Filter
    	failPolicy  v1.FailurePolicyType
    	matcherType string
    	matcherKind string
    	objectName  string
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 24 14:46:11 UTC 2023
    - 5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/authorization/cel/matcher.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package cel
    
    import (
    	"context"
    	"fmt"
    	"time"
    
    	celgo "github.com/google/cel-go/cel"
    
    	authorizationv1 "k8s.io/api/authorization/v1"
    	utilerrors "k8s.io/apimachinery/pkg/util/errors"
    )
    
    type CELMatcher struct {
    	CompilationResults []CompilationResult
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 22:41:27 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/authorization/cel/interface.go

    limitations under the License.
    */
    
    package cel
    
    import (
    	celgo "github.com/google/cel-go/cel"
    )
    
    type ExpressionAccessor interface {
    	GetExpression() string
    	ReturnTypes() []*celgo.Type
    }
    
    var _ ExpressionAccessor = &SubjectAccessReviewMatchCondition{}
    
    // SubjectAccessReviewMatchCondition is a CEL expression that maps a SubjectAccessReview request to a list of values.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 04:48:00 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/cel/ip.go

    limitations under the License.
    */
    
    package cel
    
    import (
    	"fmt"
    	"math"
    	"net/netip"
    	"reflect"
    
    	"github.com/google/cel-go/cel"
    	"github.com/google/cel-go/common/types"
    	"github.com/google/cel-go/common/types/ref"
    )
    
    // IP provides a CEL representation of an IP address.
    type IP struct {
    	netip.Addr
    }
    
    var (
    	IPType = cel.OpaqueType("net.IP")
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 11:02:33 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/cel/types_test.go

    		t.Errorf("got %s, wanted elem type of string", list.ElemType.TypeName())
    	}
    	expT, err := list.ExprType()
    	if err != nil {
    		t.Errorf("fail to get cel type: %s", err)
    	}
    	if expT.GetListType() == nil {
    		t.Errorf("got %v, wanted CEL list type", expT)
    	}
    }
    
    func TestTypes_MapType(t *testing.T) {
    	mp := NewMapType(StringType, IntType, -1)
    	if !mp.IsMap() {
    		t.Error("map type not identifiable as map")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1beta1/types.go

    	//
    	// CEL expressions have access to the contents of the token claims, organized into CEL variable:
    	// - 'claims' is a map of claim names to claim values.
    	//   For example, a variable named 'sub' can be accessed as 'claims.sub'.
    	//   Nested claims can be accessed using dot notation, e.g. 'claims.foo.bar'.
    	//
    	// Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 17:59:05 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  10. pkg/apis/resource/structured/namedresources/validation/validation.go

    	}
    	return allErrs
    }
    
    func convertCELErrorToValidationError(fldPath *field.Path, expression string, err *cel.Error) *field.Error {
    	switch err.Type {
    	case cel.ErrorTypeRequired:
    		return field.Required(fldPath, err.Detail)
    	case cel.ErrorTypeInvalid:
    		return field.Invalid(fldPath, expression, err.Detail)
    	case cel.ErrorTypeInternal:
    		return field.InternalError(fldPath, err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:26:20 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top