Skip to content

Commit 4c888fe

Browse files
committed
Add PRR and test section
1 parent 6dcfbdc commit 4c888fe

File tree

1 file changed

+35
-5
lines changed
  • keps/sig-api-machinery/3488-cel-admission-control

1 file changed

+35
-5
lines changed

keps/sig-api-machinery/3488-cel-admission-control/README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,6 +1854,7 @@ to implement this enhancement.
18541854
Based on reviewers feedback describe what additional tests need to be added prior
18551855
implementing this enhancement to ensure the enhancements have also solid foundations.
18561856
-->
1857+
N/A
18571858

18581859
##### Unit tests
18591860

@@ -1887,8 +1888,16 @@ For Alpha, describe what tests will be added to ensure proper quality of the enh
18871888
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
18881889
https://storage.googleapis.com/k8s-triage/index.html
18891890
-->
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.
18901900

1891-
- <test>: <link to test coverage>
18921901

18931902
##### e2e tests
18941903

@@ -1901,8 +1910,8 @@ https://storage.googleapis.com/k8s-triage/index.html
19011910

19021911
We expect no non-infra related flakes in the last month as a GA graduation criteria.
19031912
-->
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.
19061915

19071916
### Graduation Criteria
19081917

@@ -1967,6 +1976,10 @@ in back-to-back releases.
19671976
- Address feedback on usage/changed behavior, provided on GitHub issues
19681977
- Deprecate the flag
19691978
-->
1979+
#### Alpha
1980+
1981+
- Feature implemented behind a feature flag
1982+
- Ensure proper tests are in place.
19701983

19711984
### Upgrade / Downgrade Strategy
19721985

@@ -1981,6 +1994,8 @@ enhancement:
19811994
- What changes (in invocations, configurations, API use, etc.) is an existing
19821995
cluster required to make on upgrade, in order to make use of the enhancement?
19831996
-->
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.
19841999

19852000
### Version Skew Strategy
19862001

@@ -1996,6 +2011,7 @@ enhancement:
19962011
- Will any other components on the node change? For example, changes to CSI,
19972012
CRI or CNI may require updating that component before the kubelet.
19982013
-->
2014+
N/A
19992015

20002016
## Production Readiness Review Questionnaire
20012017

@@ -2040,8 +2056,8 @@ well as the [existing list] of feature gates.
20402056
-->
20412057

20422058
- [ ] 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
20452061
- [ ] Other
20462062
- Describe the mechanism:
20472063
- Will enabling / disabling the feature require downtime of the control
@@ -2055,6 +2071,7 @@ well as the [existing list] of feature gates.
20552071
Any change of default behavior may be surprising to users or break existing
20562072
automations, so be extremely careful here.
20572073
-->
2074+
No, default behavior is the same.
20582075

20592076
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
20602077

@@ -2068,8 +2085,10 @@ feature.
20682085

20692086
NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
20702087
-->
2088+
Yes, disabling the feature will result in validation expressions being ignored.
20712089

20722090
###### What happens if we reenable the feature if it was previously rolled back?
2091+
The validatingAdmissionPolicy will be enforced again.
20732092

20742093
###### Are there any tests for feature enablement/disablement?
20752094

@@ -2085,6 +2104,7 @@ feature gate after having objects written with the new field) are also critical.
20852104
You can take a look at one potential example of such test in:
20862105
https://github.com/kubernetes/kubernetes/pull/97058/files#diff-7826f7adbc1996a05ab52e3f5f02429e94b68ce6bce0dc534d1be636154fded3R246-R282
20872106
-->
2107+
Unit test and integration test will be introduced in alpha implementation.
20882108

20892109
### Rollout, Upgrade and Rollback Planning
20902110

@@ -2103,13 +2123,21 @@ feature flags will be enabled on some API servers and not others during the
21032123
rollout. Similarly, consider large clusters and how enablement/disablement
21042124
will rollout across nodes.
21052125
-->
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.
21062130

21072131
###### What specific metrics should inform a rollback?
21082132

21092133
<!--
21102134
What signals should users be paying attention to when the feature is young
21112135
that might indicate a serious problem?
21122136
-->
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
21132141

21142142
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
21152143

@@ -2118,12 +2146,14 @@ Describe manual testing that was done and the outcomes.
21182146
Longer term, we may want to require automated upgrade/rollback tests, but we
21192147
are missing a bunch of machinery and tooling and can't do that now.
21202148
-->
2149+
Upgrade and rollback will be tested before the feature goes to Beta.
21212150

21222151
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
21232152

21242153
<!--
21252154
Even if applying deprecation policies, they may still surprise some users.
21262155
-->
2156+
No.
21272157

21282158
### Monitoring Requirements
21292159

0 commit comments

Comments
 (0)