Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for ratcheting (0.14 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/ratcheting.go

    		return res
    	}
    
    	// Current ratcheting rule is to ratchet errors if DeepEqual(old, new) is true.
    	if r.correlation.CachedDeepEqual() {
    		newRes := &validate.Result{}
    		newRes.MergeAsWarnings(res)
    		return newRes
    	}
    
    	return res
    }
    
    // SubPropertyValidator overrides the standard validator constructor for sub-properties by
    // returning our special ratcheting variant.
    //
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 26 21:17:17 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy_test.go

    	}{
    		{
    			name:             "Ratcheting, For creation, FG disabled, no OptionalOldSelf, no field drop",
    			enableRatcheting: false,
    			crd:              &apiextensions.CustomResourceDefinition{},
    			oldCRD:           nil,
    			expectedCRD:      &apiextensions.CustomResourceDefinition{},
    		},
    		{
    			name:             "Ratcheting, For creation, FG disabled, set OptionalOldSelf, drop OptionalOldSelf",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go

    						},
    					}},
    				applyPatchOperation{
    					"add new field `otherField`, ratcheting `minField` and `maxField`",
    					myCRDV1Beta1, myCRDInstanceName, map[string]interface{}{
    						"minField":   "value",
    						"maxField":   "valueThatsVeryLongSee",
    						"otherField": "otherValue",
    					}},
    				applyPatchOperation{
    					"make minField valid, ratcheting old value for maxField",
    					myCRDV1Beta1, myCRDInstanceName, map[string]interface{}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 59.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation.go

    	// This field is ignored for Validate
    	Ratcheting bool
    
    	// Correlation between old and new arguments.
    	// If set, this is expected to be the correlation between the `new` and
    	// `old` arguments to ValidateUpdate, and values for `new` and `old` will
    	// be taken from the correlation.
    	//
    	// This field is ignored for Validate
    	//
    	// Used for ratcheting, but left as a separate field since it may be used
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 24 18:23:28 UTC 2023
    - 15K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/metrics.go

    func init() {
    	legacyregistry.MustRegister(Metrics.(*validationMetrics).RatchetingTime)
    }
    
    type validationMetrics struct {
    	RatchetingTime *metrics.Histogram
    }
    
    // ObserveRatchetingTime records the time spent on ratcheting
    func (m *validationMetrics) ObserveRatchetingTime(d time.Duration) {
    	m.RatchetingTime.Observe(d.Seconds())
    }
    
    // Reset resets the metrics. This is meant to be used for testing. Panics
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 17:57:34 UTC 2023
    - 2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/common/equality.go

    		// We might be able to support this, but do not currently see a lot
    		// of value
    		// (would allow you to add/remove items from sets with ratcheting but not change them)
    		return nil
    	case "":
    		fallthrough
    	case "atomic":
    		// Atomic lists are the default are not correlatable by item
    		// Ratcheting is not available on a per-index basis
    		return nil
    	default:
    		// Unrecognized list type. Assume non-correlatable.
    		return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 25 21:53:21 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy.go

    	}
    
    	var errs field.ErrorList
    	errs = append(errs, a.customResourceStrategy.validator.ValidateStatusUpdate(ctx, uNew, uOld, a.scale)...)
    
    	// ratcheting validation of x-kubernetes-list-type value map and set
    	if newErrs := structurallisttype.ValidateListSetsAndMaps(nil, a.structuralSchema, uNew.Object); len(newErrs) > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 22:16:10 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/validation.go

    				allErrs = append(allErrs, celErrs...)
    
    				if len(celErrs) == 0 && utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CRDValidationRatcheting) {
    					// If ratcheting is enabled some CEL rules may use optionalOldSelf
    					// For such rules the above validation is not sufficient for
    					// determining if the default value is a valid value to introduce
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 22:34:13 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go

    }
    
    // Finds the next node following the field in the tree and returns options using
    // that node. If none could be found, then retains a reference to the last
    // correlatable ancestor for ratcheting purposes
    func (r ratchetingOptions) key(field string) ratchetingOptions {
    	if r.currentCorrelation == nil {
    		return r
    	} else if r.nearestParentCorrelation == nil && (field == "apiVersion" || field == "kind") {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 18:21:31 UTC 2024
    - 32.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiextensions-apiserver/test/integration/listtype_test.go

    		return err
    	})
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    
    	t.Logf("Updating again with invalid values, eventually successfully due to ratcheting logic")
    	err = wait.PollImmediate(time.Millisecond*100, wait.ForeverTestTimeout, func() (bool, error) {
    		_, err = fooClient.Update(context.TODO(), modifiedInstance, metav1.UpdateOptions{})
    		if err == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 03 06:51:04 UTC 2023
    - 6.9K bytes
    - Viewed (0)
Back to top