tidb-operator icon indicating copy to clipboard operation
tidb-operator copied to clipboard

Generate CRD manifest with more validation schema

Open cvvz opened this issue 5 years ago • 2 comments

Feature Request

Is your feature request related to a problem? Please describe:

Tidb-operator use code-generator/openapi-gen and to-crdgen to generate CRD manifest automatically, however, the CRDs only support a few validation schema. For example, if I want to validate the properties by regex, I have to code in ValidatingWebhook or validation.go, which actually validates API resources after created in etcd. Describe the feature you'd like:

Generate CRD manifest from go types with more validation schema automatically. Describe alternatives you've considered:

Kubebuilder use controller-tools/controller-gen to generate CRD automatically, which I think could be used to replace code-generator/openapi-gen and to-crdgen. Teachability, Documentation, Adoption, Migration Strategy:

cvvz avatar Sep 03 '20 02:09 cvvz

@cofyc Do you know more about the controller-tools/controller-gen? What's your suggestion for this?

DanielZhangQD avatar Sep 03 '20 03:09 DanielZhangQD

/assign

mianhk avatar Dec 29 '21 07:12 mianhk