Just wanted to share some thoughts on working with Kubernetes CRDs in Pulumi, especially with Typescript. Currently, it's challenging to maintain type-safe coding with CRDs due to certain issues. The crd2pulumi CLI, while initially promising, has been somewhat inconsistent. For instance, I encountered issues when using it with the Pulumi Operator CRD.
There's also a complexity around code generation, particularly with a monolithic repo setup. The CLI tends to produce an opinionated project with its own package.json, tsconfig, etc. which aren't aligned with my linting or tsconfig rules. Managing separate repositories for each CRD isn't ideal either. My preference leans toward vendored packages that can be updated easily.
An article I found
here discusses a potential solution in community-maintained SDKs. But this seems to have its drawbacks too, particularly around longevity and consistency. This is evident from a repository like
this which hasn't been updated in a year.
Given these concerns, I've been using ConfigFile to apply the raw yaml for CRDs in Pulumi. But this means missing out on some of Pulumi's core benefits - type safety and code completion, especially when dealing with custom resources, which comprise a significant chunk of my work.
I'm curious about others' experiences with Kubernetes in Pulumi and Typescript. Also, any insights on how Pulumi plans to address these CRD issues would be appreciated.