Skip to content

crd2pulumi generator splits types apart into duplicate entires in pulumiTypes.go and pulumiTypes1.go #108

@tusharshahrs

Description

@tusharshahrs

What happened?

While running crd2pulumi on CRS for components, we noticed that the generator for Go is splitting the types apart into a pulumiTypes.go and a pulumiTypes1.go. Furthermore, there is some duplication of some type definitions.

Expected Behavior

crd2pulumi install.yaml --go will not duplicate type definition across pulumiTypes.go files (pulumiTypes.go, pulumiTypes1.go, etc

Steps to reproduce

  1. Install crd2pulumi
  2. mkdir myfiles
  3. cd myfiles
  4. Download https://github.com/kyverno/kyverno/blob/v1.8.5/config/install.yaml
  5. Run: crd2pulumi install.yaml --go
  6. cd crds/kubernetes/kyverno/v2beta1/
  7. Notice that there is a pulumiTypes.go and a pulumiTypes1.go file.
  8. Both files contain this exact code:
    type ClusterPolicySpecRulesImageextractorsArrayMap map[string]ClusterPolicySpecRulesImageextractorsArrayInput

Output of pulumi about

pulumi about
CLI
Version 3.58.0
Go Version go1.20.2
Go Compiler gc

Host
OS darwin
Version 11.7.4
Arch x86_64

Backend
Name pulumi.com
URL https://app.pulumi.com/tushar-pulumi-corp
User tushar-pulumi-corp
Organizations ***

pulumi version
v3.58.0

crd2pulumi version
v1.2.3

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

Labels

customer/feedbackFeedback from customerskind/bugSome behavior is incorrect or out of specp1A bug severe enough to be the next item assigned to an engineerresolution/fixedThis issue was fixed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions