Skip to content

Commit

Permalink
SQUASH: fix x-kubernetes-embedded-{object -> resource}
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts committed Jun 7, 2019
1 parent 155b8ac commit 36b7c16
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,13 +475,13 @@ In [Validation Schema Publishing](/docs/tasks/access-kubernetes-api/extend-api-c

RawExtensions (as in `runtime.RawExtension` defined in [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery/blob/03ac7a9ade429d715a1a46ceaa3724c18ebae54f/pkg/runtime/types.go#L94)) holds complete Kubernetes objects, i.e. with `apiVersion` and `kind` fields.

It is possible specify those embedded objects (both completely without constraints or partially specified) by setting `x-kubernetes-embedded-object: true`. For example:
It is possible specify those embedded objects (both completely without constraints or partially specified) by setting `x-kubernetes-embedded-resource: true`. For example:

```yaml
type: object
properties:
foo:
x-kubernetes-embedded-object: true
x-kubernetes-embedded-resource: true
x-kubernetes-preserve-unknown-fields: true
```

Expand All @@ -497,7 +497,7 @@ foo:

Because `x-kubernetes-preserve-unknown-fields: true` is specified alongside, nothing will be pruned.

With `x-kubernetes-embedded-object: true`, the `apiVersion`, `kind` and `metadata` are implicitly specified and validated.
With `x-kubernetes-embedded-resource: true`, the `apiVersion`, `kind` and `metadata` are implicitly specified and validated.

## Serving multiple versions of a CRD

Expand Down

0 comments on commit 36b7c16

Please sign in to comment.