Files
kubernetes/pkg/apis/core
Kubernetes Submit Queue 0ecfd343b3 Merge pull request #64267 from sttts/sttts-crd-objectmeta-pruning
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiextensions: add ObjectMeta validation and pruning

This is a critical pre-requisite for further multi-version support and especially for GA of CRDs: ObjectMeta must be schema-validated and pruned, like `json.Unmarshal` does this.

This PR adds this in the incoming request serializer and the storage decoder. The former errors when schema validation fails, the later just drops invalid typed fields.

Fixes #59451

```release-note
Meta data of CustomResources is now pruned and schema checked during deserialization of requests and when read from etcd. In the former case, invalid meta data is rejected, in the later it is dropped from the CustomResource objects.
```
2018-06-02 12:55:36 -07:00
..
2018-05-08 18:33:50 -04:00
2018-02-16 13:43:01 -08:00
2017-11-10 18:25:26 +01:00
2017-11-22 18:40:09 +00:00
2017-11-09 12:14:07 +01:00
2017-11-09 12:14:07 +01:00
2018-06-01 16:19:15 -07:00