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:
Feature Request
Is your feature request related to a problem? Please describe:
Tidb-operator use
code-generator/openapi-gen
andto-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 orvalidation.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
usecontroller-tools/controller-gen
to generate CRD automatically, which I think could be used to replacecode-generator/openapi-gen
andto-crdgen
. Teachability, Documentation, Adoption, Migration Strategy: