mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	feature: promote CRDValidationRatcheting to beta
also fixup test which needs feature to be disabled it was set to enable by default in this CL
This commit is contained in:
		@@ -1212,7 +1212,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
 | 
			
		||||
	// inherited features from apiextensions-apiserver, relisted here to get a conflict if it is changed
 | 
			
		||||
	// unintentionally on either side:
 | 
			
		||||
 | 
			
		||||
	apiextensionsfeatures.CRDValidationRatcheting: {Default: false, PreRelease: featuregate.Alpha},
 | 
			
		||||
	apiextensionsfeatures.CRDValidationRatcheting: {Default: true, PreRelease: featuregate.Beta},
 | 
			
		||||
 | 
			
		||||
	// features that enable backwards compatibility but are scheduled to be removed
 | 
			
		||||
	// ...
 | 
			
		||||
 
 | 
			
		||||
@@ -44,5 +44,5 @@ func init() {
 | 
			
		||||
// To add a new feature, define a key for it above and add it here. The features will be
 | 
			
		||||
// available throughout Kubernetes binaries.
 | 
			
		||||
var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
 | 
			
		||||
	CRDValidationRatcheting: {Default: false, PreRelease: featuregate.Alpha},
 | 
			
		||||
	CRDValidationRatcheting: {Default: true, PreRelease: featuregate.Beta},
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1952,6 +1952,8 @@ func BenchmarkRatcheting(b *testing.B) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestRatchetingDropFields(t *testing.T) {
 | 
			
		||||
	// Field dropping only takes effect when feature is disabled
 | 
			
		||||
	defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.CRDValidationRatcheting, false)()
 | 
			
		||||
	tearDown, apiExtensionClient, _, err := fixtures.StartDefaultServerWithClients(t)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
@@ -1982,6 +1984,7 @@ func TestRatchetingDropFields(t *testing.T) {
 | 
			
		||||
										Type: "string",
 | 
			
		||||
										XValidations: []apiextensionsv1.ValidationRule{
 | 
			
		||||
											{
 | 
			
		||||
												// Results in error if field wasn't dropped
 | 
			
		||||
												Rule:            "self == oldSelf",
 | 
			
		||||
												OptionalOldSelf: ptr(true),
 | 
			
		||||
											},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user