|
22 | 22 | - [Examples](#examples)
|
23 | 23 | - [OpenAPI](#openapi)
|
24 | 24 | - [Normalization and Validation](#normalization-and-validation)
|
| 25 | + - [Normalization](#normalization) |
| 26 | + - [Validation](#validation) |
25 | 27 | - [Ratcheting Validation](#ratcheting-validation)
|
26 | 28 | - [Migrating existing unions](#migrating-existing-unions)
|
27 | 29 | - [Test Plan](#test-plan)
|
@@ -432,6 +434,8 @@ Conversion between OpenAPI v2 and OpenAPI v3 will preserve these fields.
|
432 | 434 |
|
433 | 435 | ### Normalization and Validation
|
434 | 436 |
|
| 437 | +#### Normalization |
| 438 | + |
435 | 439 | Normalization refers to the process by which the API server attempts to understand
|
436 | 440 | and correct clients which may provide the server with conflicting or incomplete
|
437 | 441 | information about a union.
|
@@ -466,8 +470,16 @@ Union types without a discriminator must continue to perform normalization and
|
466 | 470 | validation manually (i.e. per resource in the validation functions), as is
|
467 | 471 | currently done for existing union types.
|
468 | 472 |
|
| 473 | +#### Validation |
| 474 | + |
469 | 475 | Objects must be validated AFTER the normalization process.
|
470 | 476 |
|
| 477 | +For custom resources, union validation will be done at the same point as the |
| 478 | +existing structural schema validation that occurs in the custom resource handler. |
| 479 | +This ensures that any generic validation changes made to all custom resources (such |
| 480 | +as the ratcheting validation discussed below), behaves appropriately with union |
| 481 | +validation. |
| 482 | + |
471 | 483 | #### Ratcheting Validation
|
472 | 484 |
|
473 | 485 | When updating CRDs to support union validation, it is possible that existing CRs
|
|
0 commit comments