pingcap / pingcap/tidb-operator

Generate CRD manifest with more validation schema

Open
#3,213 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

area/CRD status/discussion-wanted
Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.