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

Autogenerate CustomResourceDefinition instance from Model #83

Open
mortenlj opened this issue Jun 26, 2020 · 1 comment
Open

Autogenerate CustomResourceDefinition instance from Model #83

mortenlj opened this issue Jun 26, 2020 · 1 comment
Labels
enhancement New functionality.

Comments

@mortenlj
Copy link
Member

When working with CRDs, the current design requires that you define your Model for working with objects of that CRD, but it also requires that you manually build a CustomResourceDefinition that you can save to the api-server to create your type to start with.

Much of the information used in CustomResourceDefinition is also used in the URLs needed in the models Meta.

It would make things smoother to work with if we extend Meta so that it also describes the fields in CRD. When present, MetaModel will add a method to create a CustomResourceDefinition object, ready for saving to the api-server.

This could also auto generate the URLs in Meta for this type, and the apiVersion and kind fields which are required on custom models today.

@mortenlj mortenlj added the enhancement New functionality. label Jun 26, 2020
@mortenlj
Copy link
Member Author

mortenlj commented Nov 9, 2020

Additional improvement would be to add a cli mode for generating a yaml for the CRD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New functionality.
Projects
None yet
Development

No branches or pull requests

1 participant