|
23 | 23 | - [Integration tests](#integration-tests)
|
24 | 24 | - [e2e tests](#e2e-tests)
|
25 | 25 | - [Graduation Criteria](#graduation-criteria)
|
| 26 | + - [Alpha](#alpha) |
| 27 | + - [Beta](#beta) |
| 28 | + - [GA](#ga) |
26 | 29 | - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
|
27 | 30 | - [Version Skew Strategy](#version-skew-strategy)
|
28 | 31 | - [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
|
@@ -214,8 +217,8 @@ type ValidatingWebhook struct {
|
214 | 217 | // for a request to be sent to this webhook. All conditions in the list must evaluate to TRUE for
|
215 | 218 | // the request to be matched.
|
216 | 219 | // +optional
|
217 |
| - // +patchMergeKey=name |
218 |
| - // +patchStrategy=merge |
| 220 | + // +patchMergeKey=name |
| 221 | + // +patchStrategy=merge |
219 | 222 | MatchConditions []MatchCondition `json:"matchConditions,omitempty"`
|
220 | 223 | }
|
221 | 224 |
|
@@ -339,116 +342,48 @@ implementing this enhancement to ensure the enhancements have also solid foundat
|
339 | 342 |
|
340 | 343 | ##### Unit tests
|
341 | 344 |
|
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. |
362 | 346 |
|
363 | 347 | ##### Integration tests
|
364 | 348 |
|
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: |
372 | 350 |
|
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 |
374 | 358 |
|
375 | 359 | ##### e2e tests
|
376 | 360 |
|
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. |
386 | 362 |
|
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. |
388 | 365 |
|
389 | 366 | ### Graduation Criteria
|
390 | 367 |
|
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 |
| -
|
418 | 368 | #### Alpha
|
419 | 369 |
|
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 |
422 | 372 |
|
423 | 373 | #### Beta
|
424 | 374 |
|
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 |
435 | 377 |
|
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]>> |
444 | 381 |
|
445 |
| -#### Deprecation |
| 382 | +#### GA |
446 | 383 |
|
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]>> |
452 | 387 |
|
453 | 388 | ### Upgrade / Downgrade Strategy
|
454 | 389 |
|
|
0 commit comments