Graduate field validation to GA

This commit is contained in:
Kevin Delgado 2023-01-23 18:30:33 +00:00
parent f45505d19a
commit 3b6c4d307f
4 changed files with 9 additions and 37 deletions

View File

@ -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
// ...

View File

@ -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},

View File

@ -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

View File

@ -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)