What's the progress on this?
I've made https://github.com/marcus-sa/pulumi-kubernetes-istio which generates all the required custom Pulumi Kubernetes resources for Istio.
So far I've realized that the only way these resources will work, is if I generate YAML from the args and then parse it using the Kubernetes YAML class.
EDIT:
Or extend all the Istio CRDs with apiextensions.CustomResource as mentioned in https://github.com/pulumi/pulumi/issues/1978#issuecomment-423841886
Another topic:
How do I test these CRDs without deploying it to the Pulumi stack?
Having to go through the original code just to figure out how integration tests work is meh
Now that CRDs have hit GA and require an OpenAPI spec as part of the definition, this should be possible to do more robustly.
Just want to mention that it would be great to support any extension API server, not just CRD. I believe the common basis is the OpenAPI v3 schema which one would obtain via the API, but am not 100% sure.
Any update about that? This will be a really interesting feature :)
We鈥檙e working on some related issues now (schema-based code generation), but don鈥檛 have a firm timeline on this issue yet. Definitely still interested in getting this done.
@lblackstone in all openness of an OpenSource project (grin), feel free to pass some ideas to us for validation. I'm also wildly interested in this. CRDs are becoming more and more important in the Kubernetes ecosystem.
So my initial thought is that this would would be done as a standalone binary that could produce the CRD type snippets in the target language of your choice.
Given the vast number of CRDs in the wild, I suspect it wouldn't make sense to bake them into the provider. It might make sense to create type libraries for particularly common CRDs like Istio.
Definitely interested in hearing any thoughts on this approach, as well as alternate suggestions!
This tool exists now, so I'm going to close out this tracking issue, and we can track additional bugs/features in new issues.
https://github.com/pulumi/pulumi-kubernetes/tree/master/provider/cmd/crd2pulumi
https://www.pulumi.com/blog/introducing-crd2pulumi/
Most helpful comment
So my initial thought is that this would would be done as a standalone binary that could produce the CRD type snippets in the target language of your choice.
Given the vast number of CRDs in the wild, I suspect it wouldn't make sense to bake them into the provider. It might make sense to create type libraries for particularly common CRDs like Istio.
Definitely interested in hearing any thoughts on this approach, as well as alternate suggestions!