VirtuslabRnD / pulumi-kotlin

Experimental support for Kotlin language in Pulumi
Apache License 2.0
58 stars 3 forks source link

Support CustomResource for k8s #706

Open kylepl opened 5 days ago

kylepl commented 5 days ago

Hope things are well!

I'm attempting to start using CustomResource's in my configurations (i.e. from https://www.pulumi.com/registry/packages/kubernetes/api-docs/apiextensions/customresource/), and I believe I'm using the latest versions - but I do not see CustomResource classes being generated (i.e. com/pulumi/kubernetes/apiextensions/ just has subfolders, not CustomResource.kt or something similar).

So perhaps I'm missing something - and I do see recent work in this area.

Thanks!

jplewa commented 4 days ago

Hi Kyle, glad to hear you're continuing to give it a try!

The kubernetes:apiextensions.k8s.io:CustomResource resource has its isOverlay parameter set to true in the schema, which, as per the docs:

Indicates that the implementation of the resource should not be generated from the schema, and is instead provided out-of-band by the package author

image

Therefore we don't generate these files, we will need to handle them manually. I see that Java started generating them in May, so we could create our own wrappers on top of those files, but it will take me some time to get to it. Thank you for pointing this out. In the meantime, you should be able to use the Java code directly.

kylepl commented 4 days ago

Got it, makes sense. I will use the Java objects for now.