Skip to content

Commit 16cf1aa

Browse files
authored
Merge pull request kubernetes#3861 from tallclair/webhook-predicates
KEP-3716: (Match Conditions) mark implementable + cleanup
2 parents f85a88e + 8ef7223 commit 16cf1aa

File tree

2 files changed

+30
-94
lines changed

2 files changed

+30
-94
lines changed

keps/sig-api-machinery/3716-webhook-predicates/README.md renamed to keps/sig-api-machinery/3716-admission-webhook-match-conditions/README.md

Lines changed: 28 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
- [Integration tests](#integration-tests)
2424
- [e2e tests](#e2e-tests)
2525
- [Graduation Criteria](#graduation-criteria)
26+
- [Alpha](#alpha)
27+
- [Beta](#beta)
28+
- [GA](#ga)
2629
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
2730
- [Version Skew Strategy](#version-skew-strategy)
2831
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
@@ -214,8 +217,8 @@ type ValidatingWebhook struct {
214217
// for a request to be sent to this webhook. All conditions in the list must evaluate to TRUE for
215218
// the request to be matched.
216219
// +optional
217-
// +patchMergeKey=name
218-
// +patchStrategy=merge
220+
// +patchMergeKey=name
221+
// +patchStrategy=merge
219222
MatchConditions []MatchCondition `json:"matchConditions,omitempty"`
220223
}
221224

@@ -339,116 +342,48 @@ implementing this enhancement to ensure the enhancements have also solid foundat
339342

340343
##### Unit tests
341344

342-
<!--
343-
In principle every added code should have complete unit test coverage, so providing
344-
the exact set of tests will not bring additional value.
345-
However, if complete unit test coverage is not possible, explain the reason of it
346-
together with explanation why this is acceptable.
347-
-->
348-
349-
<!--
350-
Additionally, for Alpha try to enumerate the core package you will be touching
351-
to implement this enhancement and provide the current unit coverage for those
352-
in the form of:
353-
- <package>: <date> - <current test coverage>
354-
The data can be easily read from:
355-
https://testgrid.k8s.io/sig-testing-canaries#ci-kubernetes-coverage-unit
356-
357-
This can inform certain test coverage improvements that we want to do before
358-
extending the production code to implement this enhancement.
359-
-->
360-
361-
- `<package>`: `<date>` - `<test coverage>`
345+
TBD - unit tests will be added as this feature is implemented.
362346

363347
##### Integration tests
364348

365-
<!--
366-
This question should be filled when targeting a release.
367-
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
368-
369-
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
370-
https://storage.googleapis.com/k8s-triage/index.html
371-
-->
349+
Test cases to add:
372350

373-
- <test>: <link to test coverage>
351+
- [ ] Feature gate enablement / disablement is a no-op when no `matchConditions` are set
352+
- [ ] Feature gate enablement / disablement works as expected when `matchConditions` are set
353+
- [ ] Single match condition:
354+
- [ ] Request out of scope without `matchConditions`
355+
- [ ] Request in scope without `matchConditions`, but not matching
356+
- [ ] Request in scope without `matchConditions`, and also matching
357+
- [ ] Multiple match conditions, covering the same cases as the single-condition case
374358

375359
##### e2e tests
376360

377-
<!--
378-
This question should be filled when targeting a release.
379-
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
380-
381-
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
382-
https://storage.googleapis.com/k8s-triage/index.html
383-
384-
We expect no non-infra related flakes in the last month as a GA graduation criteria.
385-
-->
361+
We will test the edge cases mostly in integration tests and unit tests.
386362

387-
- <test>: <link to test coverage>
363+
Once the feature is default enabled in beta, a single E2E test covering hte single-match-condition
364+
cases outlined above will be added.
388365

389366
### Graduation Criteria
390367

391-
<!--
392-
**Note:** *Not required until targeted at a release.*
393-
394-
Define graduation milestones.
395-
396-
These may be defined in terms of API maturity, [feature gate] graduations, or as
397-
something else. The KEP should keep this high-level with a focus on what
398-
signals will be looked at to determine graduation.
399-
400-
Consider the following in developing the graduation criteria for this enhancement:
401-
- [Maturity levels (`alpha`, `beta`, `stable`)][maturity-levels]
402-
- [Feature gate][feature gate] lifecycle
403-
- [Deprecation policy][deprecation-policy]
404-
405-
Clearly define what graduation means by either linking to the [API doc
406-
definition](https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-versioning)
407-
or by redefining what graduation means.
408-
409-
In general we try to use the same stages (alpha, beta, GA), regardless of how the
410-
functionality is accessed.
411-
412-
[feature gate]: https://git.k8s.io/community/contributors/devel/sig-architecture/feature-gates.md
413-
[maturity-levels]: https://git.k8s.io/community/contributors/devel/sig-architecture/api_changes.md#alpha-beta-and-stable-versions
414-
[deprecation-policy]: https://kubernetes.io/docs/reference/using-api/deprecation-policy/
415-
416-
Below are some examples to consider, in addition to the aforementioned [maturity levels][maturity-levels].
417-
418368
#### Alpha
419369

420-
- Feature implemented behind a feature flag
421-
- Initial e2e tests completed and enabled
370+
- Feature implemented behind `AdmissionWebhookMatchConditions` feature flag
371+
- [Integration tests](#integration-tests) implemented
422372

423373
#### Beta
424374

425-
- Gather feedback from developers and surveys
426-
- Complete features A, B, C
427-
- Additional tests are in Testgrid and linked in KEP
428-
429-
#### GA
430-
431-
- N examples of real-world usage
432-
- N installs
433-
- More rigorous forms of testing—e.g., downgrade tests and scalability tests
434-
- Allowing time for feedback
375+
- Add E2E test coverage
376+
- Resolve resource constraints validation
435377

436-
**Note:** Generally we also wait at least two releases between beta and
437-
GA/stable, because there's no opportunity for user feedback, or even bug reports,
438-
in back-to-back releases.
439-
440-
**For non-optional features moving to GA, the graduation criteria must include
441-
[conformance tests].**
442-
443-
[conformance tests]: https://git.k8s.io/community/contributors/devel/sig-architecture/conformance-tests.md
378+
<<[UNRESOLVED resource constraints ]>>
379+
Additional beta requirements TBD
380+
<<[/UNRESOLVED]>>
444381

445-
#### Deprecation
382+
#### GA
446383

447-
- Announce deprecation and support policy of the existing flag
448-
- Two versions passed since introducing the functionality that deprecates the flag (to address version skew)
449-
- Address feedback on usage/changed behavior, provided on GitHub issues
450-
- Deprecate the flag
451-
-->
384+
<<[UNRESOLVED resource constraints ]>>
385+
GA requirements TBD
386+
<<[/UNRESOLVED]>>
452387

453388
### Upgrade / Downgrade Strategy
454389

keps/sig-api-machinery/3716-webhook-predicates/kep.yaml renamed to keps/sig-api-machinery/3716-admission-webhook-match-conditions/kep.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
owning-sig: sig-api-machinery
66
participating-sigs:
77
- sig-auth
8-
status: provisional
8+
status: implementable
99
creation-date: 2023-01-09
1010
reviewers:
1111
- jpbetz
@@ -14,6 +14,7 @@ reviewers:
1414
approvers:
1515
- jpbetz
1616
- deads2k
17+
- lavalamp
1718

1819
##### WARNING !!! ######
1920
# prr-approvers has been moved to its own location

0 commit comments

Comments
 (0)