Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic defaulting and validation for TidbCluster CR #1332

Closed
aylei opened this issue Dec 13, 2019 · 0 comments · Fixed by #1429
Closed

Basic defaulting and validation for TidbCluster CR #1332

aylei opened this issue Dec 13, 2019 · 0 comments · Fixed by #1429
Assignees
Labels
area/api area/webhook Related to webhook

Comments

@aylei
Copy link
Contributor

aylei commented Dec 13, 2019

Feature Request

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

#1121 is going to complete, we need server-side defaulting as a replacement of client-side defaulting as we used to do in helm. Also, validation, as a missing part, should also be added.

Describe the feature you'd like:

Possible solutions:

  • AdmissionWebhook: validation and defaulting
  • OpenAPIV3 validation schema: schema based validation and defaulting, the schema could be automatically generated for struct definition in Go, additional properties like validation and default value could be written in field comment. See here for details.
    • available in k8s 1.16 or higher (Validation was Beta from 1.15, Defaulting was Beta from 1.16, Both of them became GA in 1.17)
  • Aggregated APIServer

Teachability, Documentation, Adoption, Migration Strategy:

This change is tend to be non-breaking. But the reference doc of API could be tedious to maintain, we have to figure out a solution to generate the API document from the CRD or Go code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api area/webhook Related to webhook
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant