Skip to content

Commit

Permalink
Address liggitt's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts committed May 1, 2019
1 parent 2e3f530 commit d98e790
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keps/sig-api-machinery/20190426-crd-defaulting.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ Like for native resources, we do defaulting
* after mutating webhook admission
* during read from storage.

Note: like for native resources, we do not default after webhook conversions. Hence, webhook conversions must be complete in the sense that they return defaulted objects. Technically we could do defaulting, but to match native resources, we do not.
Note: like for native resources, we do not default after webhook conversions. Hence, webhook conversions should be complete in the sense that they return defaulted objects in order for the API user to see defaulted objects. Technically we could do additional defaulting, but to match native resources, we do not.

Compare the yellow boxes in the following figure:

![Decoding steps which must apply defaults](20190426-crd-defaulting-pipeline.png)

We rely on the validation steps in the request pipeline to verify that the default value validates value validation. We will check the types using the _structural schema_ during CRD creation and update though.
We rely on the validation steps in the request pipeline to verify that the default value validates value validation. We will check the types in default values using the _structural schema_ during CRD creation and update though. We will also reject defaults which contain values which will be pruned.

The `default` field in the CRD types is considered alpha quality. We will add a `CustomResourceDefaulting` feature gate. Values for `default` will be rejected if the gate is not enabled and there have not been `default` values set before (ratcheting validation).

Expand Down

0 comments on commit d98e790

Please sign in to comment.