Threw a crazy long CRD at `crd2pulumi` and it erro...
# kubernetes
b
Threw a crazy long CRD at
crd2pulumi
and it error out like on https://github.com/pulumi/crd2pulumi/pull/136 . Should I file another issue? Its a 5000 line CRD from https://github.com/element-hq/ess-starter-edition-core
Copy code
panic: fatal: error An assertion has failed: could not parse Pulumi package. source error: could not import spec: <nil>: #/types/kubernetes:matrix.element.io%2Fv1alpha1:ElementDeploymentSpecComponentsSynapseConfigMedia/properties/volume/default: type pulumi:pulumi:Any cannot have a constant value; only booleans, integers, numbers and strings may have constant values; , and 3 other diagnostic(s)
Actually it looks like it's missing a type.
pulumi:pulumi:Any
Here is the CRD
h
what version are you using? something similar was fixed in 1.4.0
b
Yes I am using 1.4.0 I pulled it from the github release
The problem here I think is that there isn't a type being applied
pulumi:plulumi:Any
isn't what these values are. They are defaults
h
interesting - are you able to narrow it down to a particular resource from the CRD?
b
this one? #/types/kubernetes:matrix.element.io%2Fv1alpha1:ElementDeploymentSpecComponentsSynapseConfigMedia/properties/volume/default
It's a complicated object i guess:
Copy code
properties:
                              volume:
                                default:
                                  name: media
                                  size: 2048
                                description: The volume holding media
                                oneOf:
                                - not:
                                    required:
                                    - name
                                  required:
                                  - size
                                - required:
                                  - name
                                  - size
                                properties:
                                  name:
                                    description: The volume name to use to store the
                                      media
                                    type: string
                                  size:
                                    anyOf:
                                    - type: integer
                                    - type: string
                                    description: The volume size to use to store the
                                      media
                                    pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[MGTPE])?$
                                    x-kubernetes-int-or-string: true
                                type: object
                            type: object
I delete the media objcts and it works
h
awesome this is helpful, could you file another issue with that example?
we’re currently looking into some of these crd2pulumi issues and should hopefully have some good improvements too
b