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

Use controller-gen to generate CRDs instead of writing them by hand #515

Open
tokers opened this issue May 28, 2021 · 5 comments
Open

Use controller-gen to generate CRDs instead of writing them by hand #515

tokers opened this issue May 28, 2021 · 5 comments
Labels
enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@tokers
Copy link
Contributor

tokers commented May 28, 2021

Currently, we write CRDs by ourselves, it's tedious and error-prone. We should use tools like controller-gen to generate them so that we can focus on the changes of go data structures, and let it do the rest jobs.

@tokers
Copy link
Contributor Author

tokers commented May 28, 2021

@lingsamuel
Copy link
Member

To do so, we need to remove usage of:
any type (interface{}), float64 (or enable allowDangerousTypes=true flag).

And add markers like this.

@tokers
Copy link
Contributor Author

tokers commented May 28, 2021

To do so, we need to remove usage of:
any type (interface{}), float64 (or enable allowDangerousTypes=true flag).

And add markers like this.

Got it.

@lingsamuel lingsamuel changed the title Use controller-gen to generate CRDs instead of writing them by humanbeings Use controller-gen to generate CRDs instead of writing them by hand Sep 26, 2021
@lingsamuel
Copy link
Member

xref: #689 (comment)

@tao12345666333 tao12345666333 added enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Feb 24, 2022
@lingsamuel
Copy link
Member

If any CRD validation rules cannot be represented by markers, we should ensure that they are migrated to our code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants