bored-spoon-83710
08/06/2021, 9:09 AMcrds
└── go
├── acme
│ ├── v1
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ ├── v1alpha2
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ ├── v1alpha3
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ └── v1beta1
│ ├── challenge.go
│ ├── init.go
│ ├── order.go
│ └── pulumiTypes.go
├── certmanager
│ ├── v1
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha2
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha3
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ └── v1beta1
│ ├── certificate.go
│ ├── certificateRequest.go
│ ├── clusterIssuer.go
│ ├── init.go
│ ├── issuer.go
│ └── pulumiTypes.go
└── pulumiUtilities.go
I expected that the acme folder be under the certmanager folder, since the API group of these CRDs is <http://acme.cert-manager.io|acme.cert-manager.io>
. I see from the code (https://github.com/pulumi/crd2pulumi/blob/765df3fae9a0b07043229c4d540c8808a5c25d65/gen/generate.go#L335) that only the first word of the API group is kept.
Couldn’t we take as crd2pulumi argument a suffix to remove from the API group and a prefix to add so that for example crd2pulumi -g --prefix-to-add certmanager --suffix-to-remove <http://cert-manager.io|cert-manager.io> cert-manager.crds.yaml
would give a structure like that?
crds
└── go
├── certmanager
│ ├── acme
│ │ ├── v1
│ │ │ ├── challenge.go
│ │ │ ├── init.go
│ │ │ ├── order.go
│ │ │ └── pulumiTypes.go
│ │ ├── v1alpha2
│ │ │ ├── challenge.go
│ │ │ ├── init.go
│ │ │ ├── order.go
│ │ │ └── pulumiTypes.go
│ │ ├── v1alpha3
│ │ │ ├── challenge.go
│ │ │ ├── init.go
│ │ │ ├── order.go
│ │ │ └── pulumiTypes.go
│ │ └── v1beta1
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ ├── v1
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha2
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha3
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ └── v1beta1
│ ├── certificate.go
│ ├── certificateRequest.go
│ ├── clusterIssuer.go
│ ├── init.go
│ ├── issuer.go
│ └── pulumiTypes.go
└── pulumiUtilities.go
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by