You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Feature Enablement and Rollback](#feature-enablement-and-rollback)
110
112
-[Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
@@ -313,11 +315,12 @@ client-side validation, albeit one that is error-prone and not officially
313
315
supported).
314
316
315
317
Long-term, we want to favor using out-of-tree solutions for client-side
316
-
validation, though this idea is still in its infancy.
318
+
validation. The [kubeconform](https://github.com/yannh/kubeconform) project is an example of an out-of-tree solution that does this.
317
319
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.
320
+
SIG API Machinery's effort will go to producing clear and complete (and
321
+
improving over time) API spec documents insteading of making client side
322
+
validation. We strongly recommend that third part integrators make use of such
323
+
documents.
321
324
322
325
##### Aligning json and yaml errors
323
326
@@ -615,6 +618,11 @@ It tests the cross product of all valid permutations along the dimensions of:
615
618
With field validation on by default in beta, we will modify
616
619
[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.
617
620
621
+
[GA]
622
+
We will introduce field validation specific e2e/conformance tests to submit
623
+
requests directly against the API server for both built-in and custom resources
624
+
to test that duplicate and unknown fields are appropriately detected.
625
+
618
626
### Graduation Criteria
619
627
<!--
620
628
**Note:** *Not required until targeted at a release.*
@@ -655,29 +663,23 @@ Below are some examples to consider, in addition to the aforementioned [maturity
655
663
-[x] field validation integration tests check for exact match of strict errors
656
664
-[x] In tree NestedObjectDecoders no longer short circuit on strict decoding
-[] Unknown/Duplicate fields are properly detected in the metadata at both the
666
+
-[x] Unknown/Duplicate fields are properly detected in the metadata at both the
659
667
root level and within embedded objects
660
668
[#109215](https://github.com/kubernetes/kubernetes/issues/109215),[#109316](https://github.com/kubernetes/kubernetes/pull/109316), and
-[x] Wait two releases (1.25 and 1.26) with field validation enabled by default
675
+
and receive minimal bug reports pertaining to the feature. As a data point,
676
+
GKE clusters running field validation by default in 1.25 are seeing less CPU
677
+
and memory overall vs 1.24, supporting the notion that this feature has not
678
+
significantly impacted performance.
679
+
-[] Add conformance testing to invoke field validation directly
680
+
against the API server
680
681
682
+
<!--
681
683
#### Deprecation
682
684
683
685
- Announce deprecation and support policy of the existing flag
@@ -696,20 +698,30 @@ enhancement:
696
698
cluster required to make on upgrade, in order to maintain previous behavior?
697
699
- What changes (in invocations, configurations, API use, etc.) is an existing
698
700
cluster required to make on upgrade, in order to make use of the enhancement?
701
+
-->
699
702
700
703
### Version Skew Strategy
701
704
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.
705
+
Following the graduation of server-side field validation to GA, there will be a
706
+
period of time when a newer client (which expects server-side field validation locked in GA) will send
707
+
requests to an older server that could have server-side field validation
708
+
disabled.
704
709
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
-
-->
710
+
Until version skew makes it incompatible for a client to hit a server
711
+
with field validation disabled, kubectl must continue to check if the feature is
712
+
enabled server-side. As long as the feature can be disabled server-side, kubectl
713
+
must continue to have client-side validation. When the feature can't be disabled
714
+
server-side, kubectl should remove client-side validation entirely.
715
+
716
+
Given that kubectl [supports](https://kubernetes.io/releases/version-skew-policy/#kubectl) one minor version skew (older or newer) of kube-apipserver,
717
+
this would mean that removing client-side validation in 1.28 would be
718
+
1-version-skew-compatible with GA in 1.27 (when server-side validation can no
719
+
longer be disabled).
720
+
721
+
See section on [Out-of-Tree
722
+
Alternatives to Client Side
723
+
Validation](#out-of-tree-alternatives-to-client-side-validation) for
724
+
alternatives to client-side validation
713
725
714
726
## Production Readiness Review Questionnaire
715
727
@@ -749,6 +761,8 @@ Pick one of these and delete the rest.
749
761
-[x] Feature gate (also fill in values in `kep.yaml`)
750
762
- Feature gate name: ServerSideFieldValidation
751
763
- Components depending on the feature gate: kube-apiserver
764
+
- Note: feature gate locked to true upon graduation to GA (1.27) and removed
765
+
two releases later (1.29)
752
766
-[x] Other
753
767
- Describe the mechanism: query parameter
754
768
- Will enabling / disabling the feature require downtime of the control
@@ -851,8 +865,15 @@ Recall that end users cannot usually observe component logs or access metrics.
851
865
852
866
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
853
867
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.
868
+
We have benchmark tests for field validation
869
+
[here](https://github.com/kubernetes/kubernetes/blob/master/test/integration/apiserver/field_validation_test.go#L2936-L2996) and an analysis of those
0 commit comments