datreeio / CRDs-catalog

Popular Kubernetes CRDs (CustomResourceDefinition) in JSON schema format.
MIT License
440 stars 169 forks source link

crd-extractor.sh does not work properly on CRDs with more than one line matching `kind:` #287

Open ssmall opened 3 months ago

ssmall commented 3 months ago

Any CRD with metadata.ownerReferences populated will break the script. E.g.

metadata:
  ownerReferences:
    - apiVersion: core.cnrm.cloud.google.com/v1beta1
      kind: ConfigConnector
      name: configconnector.core.cnrm.cloud.google.com

causes the script to incorrectly match kind: ConfigConnector as the kind for the CRD