https://pulumi.com logo
#general
Title
# general
w

wooden-queen-36575

06/05/2023, 12:31 PM
Is there a good recommendation for dealing with CRDs? I noticed the crd2pulumi project, which appears to suggest that every public CRD needs to be imported in to source and managed in the repo. This is actually pretty great, though it makes it more challenging to update as I would nodejs packages, helm charts, etc... each time a new version of a CRD gets released, I would need to download it, run
crd2pulumi
on it, etc... I will likely automate this, but I'm curious if there is some prior art here worth exploring?
l

limited-rainbow-51650

06/05/2023, 12:47 PM
@wooden-queen-36575 you are not obliged to use
crd2pulumi
. You can deploy the CRD using our generic CustomResourceDefinition resource type, or as part of a Helm chart, deployed via Chart or Release. Creating custom resources from it can be done using our generic CustomResource resource. Given this is a generic type, it doesn't help you with code assist while writing the custom resources in your code. If you want to let your IDE help you, generating types from your CRDs using
crd2pulumi
allows you to have proper code assist.
w

wooden-queen-36575

06/05/2023, 12:56 PM
Yes, that's correct, I would like to have proper code assist in place for these CRDs. It seems like I will need to invent some automated vendoring solution. It would be nice if popular CRDs were available in the NPM ecosystem (for those using Typescript)
l

limited-rainbow-51650

06/05/2023, 1:17 PM
The Pulumiverse community has this repo, but it needs a refresh badly. https://github.com/pulumiverse/kubernetes-sdks