- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for NewVersionedAttributes (0.24 sec)
-
staging/src/k8s.io/apiserver/pkg/admission/conversion.go
if err != nil { return nil, err } // Explicitly set the GVK out.GetObjectKind().SetGroupVersionKind(gvk) return out, nil } // NewVersionedAttributes returns versioned attributes with the old and new object (if non-nil) converted to the requested kind func NewVersionedAttributes(attr Attributes, gvk schema.GroupVersionKind, o ObjectInterfaces) (*VersionedAttributes, error) { // convert the old and new objects to the requested version
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 07 16:56:12 UTC 2023 - 4.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/matchconditions/matcher_test.go
func TestMatch(t *testing.T) { fakeAttr := admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "default", "foo", schema.GroupVersionResource{}, "", admission.Create, nil, false, nil) fakeVersionedAttr, _ := admission.NewVersionedAttributes(fakeAttr, schema.GroupVersionKind{}, nil) fail := v1.Fail ignore := v1.Ignore cases := []struct { name string evaluations []cel.EvaluationResult throwError bool shouldMatch bool
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jul 15 00:53:08 UTC 2023 - 8.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/composition_test.go
f := compiler.Compile(validations, OptionalVariableDeclarations{HasParams: false, HasAuthorizer: false, StrictCost: tc.strictCostEnforcement}, environment.NewExpressions) versionedAttr, err := admission.NewVersionedAttributes(tc.attributes, tc.attributes.GetKind(), newObjectInterfacesForTest()) if err != nil { t.Fatal(err) } optionalVars := OptionalVariableBindings{} costBudget := tc.runtimeCostBudget
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 8.2K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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)