This message was deleted.
# general
s
This message was deleted.
g
Tried both the released binary and the source
and I think I figured out a workaround, I could send a pull-request with
just not sure if this is a use-case you want to support
the tool had a problem for me on a CRD definition like this:
b
@worried-needle-99800 FYI
g
Copy code
apiVersion: <http://apiextensions.k8s.io/v1beta1|apiextensions.k8s.io/v1beta1>
kind: CustomResourceDefinition
metadata:
  annotations: {}
  labels:
    <http://app.kubernetes.io/name|app.kubernetes.io/name>: ambassador
    product: aes
  name: <http://filterpolicies.getambassador.io|filterpolicies.getambassador.io>
spec:
  group: <http://getambassador.io|getambassador.io>
  names:
    categories:
      - ambassador-crds
    kind: FilterPolicy
    plural: filterpolicies
    shortNames:
      - fp
    singular: filterpolicy
  scope: Namespaced
  version: null
  versions:
    - name: v2
      served: true
      storage: true
    - name: v1beta2
      served: true
      storage: false
    - name: v1beta1
      served: true
      storage: false
it has no OpenApi definition and that caused a panic at one point
in my use-case, this CRD file (in this case from Ambassador) contains some CRDs with and some without OpenApi definition
b
@gray-city-50684 can you open an issue in pulumi/lubernetes repo about this? It feels like something we should handle better if it panics
g
my change at least guards against the panic, and the code gets generated
@broad-dog-22463 sure, should I also send the pull request? you could simply reject it if you want to handle it differently (really small change)
b
yeha please do send it if you have it 🙂
g
yes I wanted to see if I can figure it out - good exercise for learning more about Go 🙂
OK, both done
w
Thanks for catching this @gray-city-50684! We recently moved the repo to
<http://github.com/pulumi/crd2pulumi|github.com/pulumi/crd2pulumi>
, so I’ll commit your fix momentarily
g
Great - and glad to be able to help!