diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index 8069c573468..818f7949c70 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -1080,7 +1080,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS genericfeatures.ServerSideApply: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 - genericfeatures.ServerSideFieldValidation: {Default: true, PreRelease: featuregate.Beta}, + genericfeatures.ServerSideFieldValidation: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 // features that enable backwards compatibility but are scheduled to be removed // ... diff --git a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go index aa903587d81..b90032bc62c 100644 --- a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go +++ b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go @@ -242,7 +242,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS ServerSideApply: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 - ServerSideFieldValidation: {Default: true, PreRelease: featuregate.Beta}, + ServerSideFieldValidation: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 StorageVersionAPI: {Default: false, PreRelease: featuregate.Alpha}, diff --git a/test/conformance/testdata/conformance.yaml b/test/conformance/testdata/conformance.yaml index 176a2ebdc51..9ac049151cb 100755 --- a/test/conformance/testdata/conformance.yaml +++ b/test/conformance/testdata/conformance.yaml @@ -3264,32 +3264,4 @@ was configured with a subpath. release: v1.12 file: test/e2e/storage/subpath.go -- testname: 'Server side field validation, typed object' - codename: '[sig-api-machinery] Field validation should detect unknown/duplicate fields [Conformance]' - description: It should reject the request if a typed object has unknown or duplicate fields. - release: v1.27 -- testname: 'Server side field validation, typed unknown metadata' - codename: '[sig-api-machinery] Field validation should detect unknown metadata fields [Conformance]' - description: It should reject the request if a typed object has unknown fields in the metadata. - release: v1.27 -- testname: 'Server side field validation, valid CR with validation schema' - codename: '[sig-api-machinery] Field validation should allow valid CRs for CRDs with validation schema [Conformance]' - description: When a CRD has a validation schema, it should succeed when a valid CR is applied. - release: v1.27 -- testname: 'Server side field validation, unknown fields CR no validation schema' - codename: '[sig-api-machinery] Field validation should allow CRs with unknown fields for CRDs without validation schema [Conformance]' - description: When a CRD does not have a validation schema, it should succeed when a CR with unknown fields is applied. - release: v1.27 -- testname: 'Server side field validation, unknown fields CR fails validation' - codename: '[sig-api-machinery] Field validation should reject CRs with unknown fields for CRDs with validation schema [Conformance]' - description: When a CRD does have a validation schema, it should reject CRs with unknown fields. - release: v1.27 -- testname: 'Server side field validation, unknown metadata' - codename: '[sig-api-machinery] Field validation should reject CRs with unknown metadata [Conformance]' - description: The server should reject CRs with unknown metadata fields in both the root and embedded objects of a CR. - release: v1.27 -- testname: 'Server side field validation, CR duplicates' - codename: '[sig-api-machinery] Field validation should reject CRs with duplicate fields [Conformance]' - description: The server should reject CRs with duplicate fields even when preserving unknown fields. - release: v1.27 diff --git a/test/e2e/apimachinery/field_validation.go b/test/e2e/apimachinery/field_validation.go index 5ff9041ca90..511bd93f9fa 100644 --- a/test/e2e/apimachinery/field_validation.go +++ b/test/e2e/apimachinery/field_validation.go @@ -61,7 +61,7 @@ var _ = SIGDescribe("FieldValidation", func() { Testname: Server side field validation, typed object Description: It should reject the request if a typed object has unknown or duplicate fields. */ - framework.ConformanceIt("should detect unknown and duplicate fields of a typed object", func(ctx context.Context) { + ginkgo.It("should detect unknown and duplicate fields of a typed object", func(ctx context.Context) { ginkgo.By("apply creating a deployment") invalidMetaDeployment := `{ "apiVersion": "apps/v1", @@ -114,7 +114,7 @@ var _ = SIGDescribe("FieldValidation", func() { Testname: Server side field validation, typed unknown metadata Description: It should reject the request if a typed object has unknown fields in the metadata. */ - framework.ConformanceIt("should detect unknown metadata fields of a typed object", func(ctx context.Context) { + ginkgo.It("should detect unknown metadata fields of a typed object", func(ctx context.Context) { ginkgo.By("apply creating a deployment") invalidMetaDeployment := `{ "apiVersion": "apps/v1", @@ -165,7 +165,7 @@ var _ = SIGDescribe("FieldValidation", func() { Testname: Server side field validation, valid CR with validation schema Description: When a CRD has a validation schema, it should succeed when a valid CR is applied. */ - framework.ConformanceIt("should create/apply a valid CR for CRD with validation schema", func(ctx context.Context) { + ginkgo.It("should create/apply a valid CR for CRD with validation schema", func(ctx context.Context) { config, err := framework.LoadConfig() if err != nil { framework.Failf("%s", err) @@ -283,7 +283,7 @@ spec: Testname: Server side field validation, unknown fields CR no validation schema Description: When a CRD does not have a validation schema, it should succeed when a CR with unknown fields is applied. */ - framework.ConformanceIt("should create/apply a CR with unknown fields for CRD with no validation schema", func(ctx context.Context) { + ginkgo.It("should create/apply a CR with unknown fields for CRD with no validation schema", func(ctx context.Context) { config, err := framework.LoadConfig() if err != nil { framework.Failf("%s", err) @@ -341,7 +341,7 @@ spec: Testname: Server side field validation, unknown fields CR fails validation Description: When a CRD does have a validation schema, it should reject CRs with unknown fields. */ - framework.ConformanceIt("should create/apply an invalid CR with extra properties for CRD with validation schema", func(ctx context.Context) { + ginkgo.It("should create/apply an invalid CR with extra properties for CRD with validation schema", func(ctx context.Context) { config, err := framework.LoadConfig() if err != nil { framework.Failf("%s", err) @@ -462,7 +462,7 @@ spec: Description: The server should reject CRs with unknown metadata fields in both the root and embedded objects of a CR. */ - framework.ConformanceIt("should detect unknown metadata fields in both the root and embedded object of a CR", func(ctx context.Context) { + ginkgo.It("should detect unknown metadata fields in both the root and embedded object of a CR", func(ctx context.Context) { config, err := framework.LoadConfig() if err != nil { framework.Failf("%s", err) @@ -607,7 +607,7 @@ spec: Testname: Server side field validation, CR duplicates Description: The server should reject CRs with duplicate fields even when preserving unknown fields. */ - framework.ConformanceIt("should detect duplicates in a CR when preserving unknown fields", func(ctx context.Context) { + ginkgo.It("should detect duplicates in a CR when preserving unknown fields", func(ctx context.Context) { config, err := framework.LoadConfig() if err != nil { framework.Failf("%s", err)