operator-framework / operator-courier

Build, verify and push operators
Apache License 2.0
41 stars 53 forks source link

When a CRD is present in a bundle, but not referenced in the CRD, confusing error about mismatched versions occurs. #172

Open flickerfly opened 5 years ago

flickerfly commented 5 years ago

I upgraded a CSV and copied in the CRDs. I had one that isn't mentioned in the CSV in the folder with a spec.version that mentioned a previous version. operator-courier verify would complain

ERROR: CRD.spec.version does not match CSV.spec.crd.owned.version

This confused me for awhile until I realized the other CRD was in the directory and removed it to clear the error.

Two suggestions: 1) As there can be multiple CRDs on an operator, could the CRD in conflict with the CSV be mentioned by some identifier like name? 2) Alert on a CRD not mentioned in the CSV