Skip to content

Commit fe2ea29

Browse files
committed
Update kep for beta graduation in 1.25
1 parent 6a4aadc commit fe2ea29

File tree

2 files changed

+40
-17
lines changed

2 files changed

+40
-17
lines changed

keps/sig-api-machinery/2885-server-side-unknown-field-validation/README.md

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -570,17 +570,35 @@ when drafting this test plan.
570570
571571
[testing-guidelines]: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
572572
-->
573-
We can unit test and benchmark the performance of each endpoint in
574-
[apiserver/pkg/endpoints/apiserver_test.go](https://github.com/kubernetes/kubernetes/blob/dadecb2c8932fd28de9dfb94edbc7bdac7d0d28f/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go). We will need to test that requests
575-
fail with invalid fields for all types of fields (embedding, free-form fields,
576-
etc).
573+
##### Unit tests
574+
[alpha and beta]
575+
Logic that is changed in the apiextensions schema package (i.e. objectmeta
576+
algorithm and pruning algorithm) will be thoroughly unit tested as well as
577+
changes made to the
578+
apimachinery runtime converter and json decoding.
577579

578-
Additionally, we can add integration testing for all endpoints in
579-
[test/integration/apiserver/apiserver_test.go](https://github.com/kubernetes/kubernetes/blob/master/test/integration/apiserver/apiserver_test.go)
580+
Additional testing has also been added to the
581+
[apiserver/endpoints/handlers/rest_test.go](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go) to detect unknown and duplicate fields.
580582

581-
We will also have additional testing for changes to the strategic merge patch
582-
logic in
583-
[apimachinery/pkg/util/strategicpatch/patch_test.go](https://github.com/kubernetes/kubernetes/blob/dadecb2c8932fd28de9dfb94edbc7bdac7d0d28f/staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go)
583+
##### Integration tests
584+
[alpha and beta]
585+
Primarily, server side validation will be integration tested and benchmarked via a complete test
586+
suite at
587+
[test/integration/apiserver/field_validation_test.go](https://github.com/kubernetes/kubernetes/blob/master/test/integration/apiserver/field_validation_test.go)
588+
589+
It tests the cross product of all valid permutations along the dimensions of:
590+
* request type (Create vs Update vs Patch)
591+
* data format (json, yaml, json patch, json merge patch, SMP patch, apply
592+
(create), apply (update))
593+
* schema type (typed/builtin, CRD/untyped with schema, CRD/untyped without
594+
schema)
595+
596+
597+
598+
##### e2e tests
599+
[beta]
600+
With field validation on by default in beta, we will modify
601+
[test/e2e/kubectl/kubectl.go](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/kubectl/kubectl.go) to ensure that kubectl defaults to using server side field validation and detects unknown/duplicate fields as expected.
584602

585603
### Graduation Criteria
586604
<!--
@@ -616,12 +634,16 @@ Below are some examples to consider, in addition to the aforementioned [maturity
616634

617635
#### Beta
618636

619-
- [ ] kubectl validate flag offers ability to perform server-side validation
620-
- [ ] endpoints handler unit testing of field validation
621-
- [ ] customresource handler unit testing of field validation
622-
- [ ] field validation integration tests check for exact match of strict errors
623-
- [ ] In tree NestedObjectDecoders no longer short circuit on strict decoding
637+
- [x] kubectl validate flag offers ability to perform server-side validation
638+
- [x] endpoints handler unit testing of field validation
639+
- [x] customresource handler unit testing of field validation
640+
- [x] field validation integration tests check for exact match of strict errors
641+
- [x] In tree NestedObjectDecoders no longer short circuit on strict decoding
624642
errors [#107545](https://github.com/kubernetes/kubernetes/issues/107545)
643+
- [ ] Unknown/Duplicate fields are properly detected in the metadata at both the
644+
root level and within embedded objects
645+
[#109215](https://github.com/kubernetes/kubernetes/issues/109215),[#109316](https://github.com/kubernetes/kubernetes/pull/109316), and
646+
[#109494](https://github.com/kubernetes/kubernetes/pull/109494)
625647

626648

627649
<!--

keps/sig-api-machinery/2885-server-side-unknown-field-validation/kep.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ reviewers:
1212
- "@smarterclayton"
1313
approvers:
1414
- "@deads2k"
15+
- "@liggitt"
1516

1617
##### WARNING !!! ######
1718
# prr-approvers has been moved to its own location
@@ -29,13 +30,13 @@ stage: beta
2930
# The most recent milestone for which work toward delivery of this KEP has been
3031
# done. This can be the current (upcoming) milestone, if it is being actively
3132
# worked on.
32-
latest-milestone: "v1.24"
33+
latest-milestone: "v1.25"
3334

3435
# The milestone at which this feature was, or is targeted to be, at each stage.
3536
milestone:
3637
alpha: "v1.23"
37-
beta: "v1.24"
38-
stable: "v1.25"
38+
beta: "v1.25"
39+
stable: "v1.26"
3940

4041
# The following PRR answers are required at alpha release
4142
# List the feature gate name and the components for which it must be enabled

0 commit comments

Comments
 (0)