Skip to content

Unable to handle unstructured CRDs #166

@SamuelCabralCruz

Description

@SamuelCabralCruz

What happened?

Since version 1.5+ there seems to be a bug with the handling of plural kinds where only the plural kind will be exported and not the singular type or maybe it is only a problem with the ordering of the types export.

Example

Use crd2pulumi with version 1.5.3 on ratelimitconfigs.ratelimit.solo.io.

npm error code 1
npm error path /Users/Samuel.Cabralcruz/Documents/ticketmaster/crds/crds/gloo
npm error command failed
npm error command sh -c node ./scripts/postinstall.js
npm error Command failed: tsc: ratelimit/v1alpha1/rateLimitConfigList.ts(9,9): error TS2724: '"./index"' has no exported member named 'RateLimitConfig'. Did you mean 'RateLimitConfigList'?
npm error types/input.ts(8,9): error TS2724: '"../ratelimit/v1alpha1"' has no exported member named 'RateLimitConfig'. Did you mean 'RateLimitConfigList'?
npm error types/output.ts(8,9): error TS2724: '"../ratelimit/v1alpha1"' has no exported member named 'RateLimitConfig'. Did you mean 'RateLimitConfigList'?

Output of pulumi about

CLI
Version 3.113.3
Go Version go1.22.2
Go Compiler gc

Host
OS darwin
Version 15.3.1
Arch arm64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/codegenAffects quality or correctness of generated codekind/bugSome behavior is incorrect or out of spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions