Skip to content

Commit a6fb501

Browse files
committed
Update field validation KEP for 1.27 GA graduation
1 parent 475b18a commit a6fb501

File tree

3 files changed

+38
-36
lines changed

3 files changed

+38
-36
lines changed

keps/prod-readiness/sig-api-machinery/2885.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ alpha:
33
approver: "@deads2k"
44
beta:
55
approver: "@deads2k"
6+
stable:
7+
approver: "@deads2k"

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

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ tags, and then generate with `hack/update-toc.sh`.
105105
- [Graduation Criteria](#graduation-criteria)
106106
- [Alpha](#alpha)
107107
- [Beta](#beta)
108+
- [GA](#ga)
109+
- [Version Skew Strategy](#version-skew-strategy)
108110
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
109111
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
110112
- [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
@@ -313,11 +315,9 @@ client-side validation, albeit one that is error-prone and not officially
313315
supported).
314316

315317
Long-term, we want to favor using out-of-tree solutions for client-side
316-
validation, though this idea is still in its infancy.
317-
318-
The [kubeval](https://www.kubeval.com/) project is an example of an out-of-tree solution that does this, and
319-
we will look into expanding its support of open API to v3, and investigate
320-
whether it makes sense as a permanent solution to client-side validation.
318+
validation. The [kubeconform](https://github.com/yannh/kubeconform) project is an example of an out-of-tree solution that does this, and
319+
we recommend using this or similar tools to validate manifests offline going
320+
forward.
321321

322322
##### Aligning json and yaml errors
323323

@@ -615,6 +615,11 @@ It tests the cross product of all valid permutations along the dimensions of:
615615
With field validation on by default in beta, we will modify
616616
[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.
617617

618+
[GA]
619+
We will introduce field validation specific e2e/conformance tests to submit
620+
requests directly against the API server for both built-in and custom resources
621+
to test that duplicate and unknown fields are appropriately detected.
622+
618623
### Graduation Criteria
619624
<!--
620625
**Note:** *Not required until targeted at a release.*
@@ -655,29 +660,20 @@ Below are some examples to consider, in addition to the aforementioned [maturity
655660
- [x] field validation integration tests check for exact match of strict errors
656661
- [x] In tree NestedObjectDecoders no longer short circuit on strict decoding
657662
errors [#107545](https://github.com/kubernetes/kubernetes/issues/107545)
658-
- [ ] Unknown/Duplicate fields are properly detected in the metadata at both the
663+
- [x] Unknown/Duplicate fields are properly detected in the metadata at both the
659664
root level and within embedded objects
660665
[#109215](https://github.com/kubernetes/kubernetes/issues/109215),[#109316](https://github.com/kubernetes/kubernetes/pull/109316), and
661666
[#109494](https://github.com/kubernetes/kubernetes/pull/109494)
662667

663668

664-
<!--
665669
#### GA
666670

667-
- N examples of real-world usage
668-
- N installs
669-
- More rigorous forms of testing—e.g., downgrade tests and scalability tests
670-
- Allowing time for feedback
671-
672-
**Note:** Generally we also wait at least two releases between beta and
673-
GA/stable, because there's no opportunity for user feedback, or even bug reports,
674-
in back-to-back releases.
675-
676-
**For non-optional features moving to GA, the graduation criteria must include
677-
[conformance tests].**
678-
679-
[conformance tests]: https://git.k8s.io/community/contributors/devel/sig-architecture/conformance-tests.md
671+
- [x] Wait two releases (1.25 and 1.26) with field validation enabled by default
672+
and receive minimal bug reports pertaining to the feature.
673+
- [] More rigorous e2e/conformance testing added to invoke field validation directly
674+
against the API server
680675

676+
<!--
681677
#### Deprecation
682678
683679
- Announce deprecation and support policy of the existing flag
@@ -696,20 +692,22 @@ enhancement:
696692
cluster required to make on upgrade, in order to maintain previous behavior?
697693
- What changes (in invocations, configurations, API use, etc.) is an existing
698694
cluster required to make on upgrade, in order to make use of the enhancement?
695+
-->
699696

700697
### Version Skew Strategy
701698

702-
If applicable, how will the component handle version skew with other
703-
components? What are the guarantees? Make sure this is in the test plan.
699+
Following the graduation of server-side field validation to GA, there will be a
700+
period of time when a newer client (which expects server-side field validation locked in GA) will send
701+
requests to an older server that could have server-side field validation
702+
disabled. Until version skew makes it incompatible for a client to hit a server
703+
with field validation disabled, kubectl will need to continue to have
704+
client-side validation available.
704705

705-
Consider the following in developing a version skew strategy for this
706-
enhancement:
707-
- Does this enhancement involve coordinating behavior in the control plane and
708-
in the kubelet? How does an n-2 kubelet without this feature available behave
709-
when this feature is used?
710-
- Will any other components on the node change? For example, changes to CSI,
711-
CRI or CNI may require updating that component before the kubelet.
712-
-->
706+
After this skew (2-3 releases), client-side
707+
validation will be removed from kubectl entirely. (See section on [Out-of-Tree
708+
Alternatives to Client Side
709+
Validation](#out-of-tree-alternatives-to-client-side-validation) for
710+
alternatives to client-side validation)
713711

714712
## Production Readiness Review Questionnaire
715713

@@ -749,6 +747,7 @@ Pick one of these and delete the rest.
749747
- [x] Feature gate (also fill in values in `kep.yaml`)
750748
- Feature gate name: ServerSideFieldValidation
751749
- Components depending on the feature gate: kube-apiserver
750+
- Note: feature gate removed upon graduation to GA (1.27)
752751
- [x] Other
753752
- Describe the mechanism: query parameter
754753
- Will enabling / disabling the feature require downtime of the control
@@ -851,8 +850,9 @@ Recall that end users cannot usually observe component logs or access metrics.
851850

852851
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
853852

854-
Users should expect to see an increase in request latency and memory usage
855-
(~20-25% increase) for requests that desire server side schema validation.
853+
Users should expect to see an increase in request latency (~5% increase) and memory usage
854+
(~10% increase) for requests that desire server side schema validation (json and
855+
yaml only, no change for protobuf).
856856

857857
Cluster operators can also use cpu usage monitoring to determine whether
858858
increased usage of server-side schema validation dramatically increases CPU usage after feature enablement.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ see-also:
1818
replaces:
1919

2020
# The target maturity stage in the current dev cycle for this KEP.
21-
stage: beta
21+
stage: stable
2222

2323
# The most recent milestone for which work toward delivery of this KEP has been
2424
# done. This can be the current (upcoming) milestone, if it is being actively
2525
# worked on.
26-
latest-milestone: "v1.25"
26+
latest-milestone: "v1.27"
2727

2828
# The milestone at which this feature was, or is targeted to be, at each stage.
2929
milestone:
3030
alpha: "v1.23"
3131
beta: "v1.25"
32-
stable: "v1.26"
32+
stable: "v1.27"
3333

3434
# The following PRR answers are required at alpha release
3535
# List the feature gate name and the components for which it must be enabled
3636
feature-gates:
3737
- name: ServerSideFieldValidation
3838
components:
3939
- kube-apiserver
40-
disable-supported: true
40+
disable-supported: false
4141

4242
# The following PRR answers are required at beta release
4343
metrics:

0 commit comments

Comments
 (0)