Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NewVersionedAttributes (0.65 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/validator_test.go

    	fakeAttr := admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "default", "foo", schema.GroupVersionResource{}, "", admission.Create, nil, false, nil)
    	fakeVersionedAttr, _ := admission.NewVersionedAttributes(fakeAttr, schema.GroupVersionKind{}, nil)
    
    	cases := []struct {
    		name               string
    		failPolicy         *v1.FailurePolicyType
    		matcher            matchconditions.Matcher
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/dispatcher.go

    				continue
    			} else if versionedAttr == nil && len(params) > 0 {
    				// As optimization versionedAttr creation is deferred until
    				// first use. Since > 0 params, we will validate
    				va, err := admission.NewVersionedAttributes(a, matchKind, o)
    				if err != nil {
    					wrappedErr := fmt.Errorf("failed to convert object version: %w", err)
    					addConfigError(wrappedErr, definition, binding)
    					continue
    				}
    				versionedAttr = va
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_dispatcher.go

    	if val, ok := v.versionedAttrs[gvk]; ok {
    		return val, nil
    	}
    	versionedAttr, err := admission.NewVersionedAttributes(v.attr, gvk, v.objectInterfaces)
    	if err != nil {
    		return nil, err
    	}
    	v.versionedAttrs[gvk] = versionedAttr
    	return versionedAttr, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go

    func (v *versionedAttributeAccessor) VersionedAttribute(gvk schema.GroupVersionKind) (*admission.VersionedAttributes, error) {
    	if val, ok := v.versionedAttrs[gvk]; ok {
    		return val, nil
    	}
    	versionedAttr, err := admission.NewVersionedAttributes(v.attr, gvk, v.objectInterfaces)
    	if err != nil {
    		return nil, err
    	}
    	v.versionedAttrs[gvk] = versionedAttr
    	return versionedAttr, nil
    }
    
    var _ generic.Dispatcher = &validatingDispatcher{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 20:24:12 UTC 2023
    - 13K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/filter_test.go

    			}
    			validations := tc.validations
    			CompilationResults := f.(*filter).compilationResults
    			require.Equal(t, len(validations), len(CompilationResults))
    
    			versionedAttr, err := admission.NewVersionedAttributes(tc.attributes, tc.attributes.GetKind(), newObjectInterfacesForTest())
    			if err != nil {
    				t.Fatalf("unexpected error on conversion: %v", err)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go

    	if v.versionedAttr == nil {
    		// First call, create versioned attributes
    		var err error
    		if v.versionedAttr, err = admission.NewVersionedAttributes(v.attr, gvk, v.objectInterfaces); err != nil {
    			return nil, apierrors.NewInternalError(err)
    		}
    	} else {
    		// Subsequent call, convert existing versioned attributes to the requested version
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top