Update doc about json tag is needed to generate informer externalverion package

Kubernetes-commit: e98a28e5c78e9d6bf428ecd614ddf62083b0ea9a
This commit is contained in:
Catherine Fang 2023-01-03 14:08:57 -05:00 committed by Kubernetes Publisher
parent f642284f7b
commit 66316083a5

View File

@ -126,6 +126,9 @@ type User struct {
}
```
Note, json tag `json:` is needed to generate informer externalversions package.
Otherwise, informer internalversion package is generated.
## Validation
To validate custom resources, use the [`CustomResourceValidation`](https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/#validation) feature. Validation in the form of a [structured schema](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema) is mandatory to be provided for `apiextensions.k8s.io/v1`.