crossplane/provider-template

Makefile contains unneeded clean.crds target

bobh66 opened this issue · 0 comments

What happened?

Recently provider-kubernetes and provider-terraform were updated to the latest crossplane-runtime and added max-reconcile-rate using this project as a template. After those changes were implemented it was found that the generated CRDs were missing the first two lines of the YAML file, the "---" and the apiVersion line.

After debugging it was found that this was caused by the "clean.crds" target in the Makefile which was called by the generate.done target, causing the sed command in the clean.crds target to remove the first two lines of the files.

In this project the clean.crds target is called by the "generate" target instead of "generate.done" which means that the existing YAML files are corrupted FIRST, and then they get regenerated and are fine. Which means that clean.crds doesn't really do anything functional.

I believe that clean.crds can be removed from the Makefile as it has been in provider-kubernetes and provider-terraform, to eliminate the possibility that the CRDs will be corrupted.