Create an APIObject
based class from a CustomResourceDefinition
#457
Labels
APIObject
based class from a CustomResourceDefinition
#457
We can use the
CustomResourceDefinition
objects to create/update/delete Custom Resource Definitions. But if we want to create the Custom Resources themselves we need to callnew_class()
with the name of the CRD and some options to generate a class that we can use to create resources.It would be nice if
CustomResourceDefinition
had a utility method to do this for us automatically.For example if we start by making a new CRD.
Now we have a CRD for
shirts.stable.example.com/v1
we might want to make a new Shirt resource. Currently we would need to usenew_class()
and pass a lot of the same information that we passed to the CRD.Instead we could add a method to
CustomResourceDefinition
to do this for us.Alternatively we could update
new_class()
to accept a CRD.Then we can finally define and create a Shirt.
The text was updated successfully, but these errors were encountered: