Generate CRD manifest with more validation schema
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:
@cofyc Do you know more about the controller-tools/controller-gen? What's your suggestion for this?
/assign