Skip to content

Commit 908da47

Browse files
committed
more normalization/validation updates
1 parent 03cbe6c commit 908da47

File tree

1 file changed

+12
-0
lines changed
  • keps/sig-api-machinery/1027-api-unions

1 file changed

+12
-0
lines changed

keps/sig-api-machinery/1027-api-unions/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
- [Examples](#examples)
2323
- [OpenAPI](#openapi)
2424
- [Normalization and Validation](#normalization-and-validation)
25+
- [Normalization](#normalization)
26+
- [Validation](#validation)
2527
- [Ratcheting Validation](#ratcheting-validation)
2628
- [Migrating existing unions](#migrating-existing-unions)
2729
- [Test Plan](#test-plan)
@@ -432,6 +434,8 @@ Conversion between OpenAPI v2 and OpenAPI v3 will preserve these fields.
432434

433435
### Normalization and Validation
434436

437+
#### Normalization
438+
435439
Normalization refers to the process by which the API server attempts to understand
436440
and correct clients which may provide the server with conflicting or incomplete
437441
information about a union.
@@ -466,8 +470,16 @@ Union types without a discriminator must continue to perform normalization and
466470
validation manually (i.e. per resource in the validation functions), as is
467471
currently done for existing union types.
468472

473+
#### Validation
474+
469475
Objects must be validated AFTER the normalization process.
470476

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+
471483
#### Ratcheting Validation
472484

473485
When updating CRDs to support union validation, it is possible that existing CRs

0 commit comments

Comments
 (0)