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

Generate CRUD functions for user-provided CRDs #39

Closed
Arnavion opened this issue Mar 29, 2019 · 2 comments
Closed

Generate CRUD functions for user-provided CRDs #39

Arnavion opened this issue Mar 29, 2019 · 2 comments
Labels

Comments

@Arnavion
Copy link
Owner

@Arnavion Arnavion commented Mar 29, 2019

The golang client has a code generator that takes a file containing the definition of a custom resource and generates CRUD functions for it ("clientsets").

It might be useful to expose this part of the code generator as an API so that a user can call it from their crate's build script. For example, given this definition it could output this code plus a Resource and Metadata impl.

@Arnavion Arnavion added the libcodegen label Apr 5, 2019
@Arnavion Arnavion changed the title [codegen] Generate CRUD functions for user-provided CRDs Generate CRUD functions for user-provided CRDs Apr 5, 2019
@Arnavion

This comment has been minimized.

Copy link
Owner Author

@Arnavion Arnavion commented May 10, 2019

WIP implementation in master...fix-39

See the change to k8s-openapi-tests/src/custom_resource_definition.rs for a usage example.

The remaining work is to implement some more methods, and to figure out how to share the code generation with the k8s-openapi-codegen crate.

Edit (2019-06-20): Sharing the code generation with the k8s-openapi-codegen crate is now figured out and implemented.

@Arnavion Arnavion closed this in b4f9d4d Jul 16, 2019
@Arnavion

This comment has been minimized.

Copy link
Owner Author

@Arnavion Arnavion commented Jul 16, 2019

(The remaining missing delete_collection_ API is covered by #46 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.