@@ -1854,6 +1854,7 @@ to implement this enhancement.
1854
1854
Based on reviewers feedback describe what additional tests need to be added prior
1855
1855
implementing this enhancement to ensure the enhancements have also solid foundations.
1856
1856
-->
1857
+ N/A
1857
1858
1858
1859
# #### Unit tests
1859
1860
@@ -1887,8 +1888,16 @@ For Alpha, describe what tests will be added to ensure proper quality of the enh
1887
1888
For Beta and GA, add links to added tests together with links to k8s-triage for those tests :
1888
1889
https://storage.googleapis.com/k8s-triage/index.html
1889
1890
-->
1891
+ In the first alpha phrase, the integration tests are expected to be added for :
1892
+ - The behavior with feature gate and API turned on/off and mix match
1893
+ - The happy path with everything configured and validation proceeded successfully
1894
+ - Validation with different enforcement policies
1895
+ - Validation with different failure policies
1896
+ - Validation with different Match Criteria
1897
+ - Validation violations for different reasons including type checking failures, misconfiguration, failed validation, etc and formatted messages
1898
+ - Singleton policy
1899
+ - Validation limit check including cost limit, max policy binding limit, max length, etc.
1890
1900
1891
- - <test> : <link to test coverage>
1892
1901
1893
1902
# #### e2e tests
1894
1903
@@ -1901,8 +1910,8 @@ https://storage.googleapis.com/k8s-triage/index.html
1901
1910
1902
1911
We expect no non-infra related flakes in the last month as a GA graduation criteria.
1903
1912
-->
1904
-
1905
- - <test> : <link to test coverage>
1913
+ We will test the edge cases mostly in integration test and unit test.
1914
+ We may add e2e test for spot check of the feature presence.
1906
1915
1907
1916
# ## Graduation Criteria
1908
1917
@@ -1967,6 +1976,10 @@ in back-to-back releases.
1967
1976
- Address feedback on usage/changed behavior, provided on GitHub issues
1968
1977
- Deprecate the flag
1969
1978
-->
1979
+ # ### Alpha
1980
+
1981
+ - Feature implemented behind a feature flag
1982
+ - Ensure proper tests are in place.
1970
1983
1971
1984
# ## Upgrade / Downgrade Strategy
1972
1985
@@ -1981,6 +1994,8 @@ enhancement:
1981
1994
- What changes (in invocations, configurations, API use, etc.) is an existing
1982
1995
cluster required to make on upgrade, in order to make use of the enhancement?
1983
1996
-->
1997
+ In alpha, no changes are required to maintain previous behavior. And the feature gate
1998
+ and the required API could be turned on to make use of the enhancement.
1984
1999
1985
2000
# ## Version Skew Strategy
1986
2001
@@ -1996,6 +2011,7 @@ enhancement:
1996
2011
- Will any other components on the node change? For example, changes to CSI,
1997
2012
CRI or CNI may require updating that component before the kubelet.
1998
2013
-->
2014
+ N/A
1999
2015
2000
2016
# # Production Readiness Review Questionnaire
2001
2017
@@ -2040,8 +2056,8 @@ well as the [existing list] of feature gates.
2040
2056
-->
2041
2057
2042
2058
- [ ] Feature gate (also fill in values in `kep.yaml`)
2043
- - Feature gate name :
2044
- - Components depending on the feature gate :
2059
+ - Feature gate name : ValidatingAdmissionPolicy
2060
+ - Components depending on the feature gate : kube-apiserver
2045
2061
- [ ] Other
2046
2062
- Describe the mechanism :
2047
2063
- Will enabling / disabling the feature require downtime of the control
@@ -2055,6 +2071,7 @@ well as the [existing list] of feature gates.
2055
2071
Any change of default behavior may be surprising to users or break existing
2056
2072
automations, so be extremely careful here.
2057
2073
-->
2074
+ No, default behavior is the same.
2058
2075
2059
2076
# ##### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
2060
2077
@@ -2068,8 +2085,10 @@ feature.
2068
2085
2069
2086
NOTE : Also set `disable-supported` to `true` or `false` in `kep.yaml`.
2070
2087
-->
2088
+ Yes, disabling the feature will result in validation expressions being ignored.
2071
2089
2072
2090
# ##### What happens if we reenable the feature if it was previously rolled back?
2091
+ The validatingAdmissionPolicy will be enforced again.
2073
2092
2074
2093
# ##### Are there any tests for feature enablement/disablement?
2075
2094
@@ -2085,6 +2104,7 @@ feature gate after having objects written with the new field) are also critical.
2085
2104
You can take a look at one potential example of such test in :
2086
2105
https://github.com/kubernetes/kubernetes/pull/97058/files#diff-7826f7adbc1996a05ab52e3f5f02429e94b68ce6bce0dc534d1be636154fded3R246-R282
2087
2106
-->
2107
+ Unit test and integration test will be introduced in alpha implementation.
2088
2108
2089
2109
# ## Rollout, Upgrade and Rollback Planning
2090
2110
@@ -2103,13 +2123,21 @@ feature flags will be enabled on some API servers and not others during the
2103
2123
rollout. Similarly, consider large clusters and how enablement/disablement
2104
2124
will rollout across nodes.
2105
2125
-->
2126
+ The existing workload could potentially fail the validation and cause unexpected failures if the validation is misconfigured.
2127
+
2128
+ While rollout, the cluster administrator could configure the feature with `enforcement : [Warn, Audit]` or similar,
2129
+ and wait until being comfortable to switch the enforcement level to `Deny`. In this way it will minimize the effect on the running workloads.
2106
2130
2107
2131
# ##### What specific metrics should inform a rollback?
2108
2132
2109
2133
<!--
2110
2134
What signals should users be paying attention to when the feature is young
2111
2135
that might indicate a serious problem?
2112
2136
-->
2137
+ On a cluster that has not yet opted into ValidatingAdmissionPolicy, non-zero counts for either of the following metrics mean
2138
+ the feature is not working as expected :
2139
+ - cel_admission_validation_total
2140
+ - cel_admission_validation_errors
2113
2141
2114
2142
# ##### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
2115
2143
@@ -2118,12 +2146,14 @@ Describe manual testing that was done and the outcomes.
2118
2146
Longer term, we may want to require automated upgrade/rollback tests, but we
2119
2147
are missing a bunch of machinery and tooling and can't do that now.
2120
2148
-->
2149
+ Upgrade and rollback will be tested before the feature goes to Beta.
2121
2150
2122
2151
# ##### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
2123
2152
2124
2153
<!--
2125
2154
Even if applying deprecation policies, they may still surprise some users.
2126
2155
-->
2156
+ No.
2127
2157
2128
2158
# ## Monitoring Requirements
2129
2159
0 commit comments