polardb / polardbx-operator

polardbx-operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes.
Apache License 2.0
91 stars 30 forks source link

chore: support download controller-gen #39

Closed free6om closed 5 months ago

free6om commented 5 months ago

The current CRD was generated using controller-gen version 0.9.0, assuming that the developer has already installed it in the shell's PATH directory. This creates two problems:

  1. If it is not installed, it needs to be installed first.
  2. If a different version is already installed locally, the issue of version inconsistency needs to be considered.

The purpose of this PR is to address the above two problems.

The solution is as follows: Add the download-controller-gen command to the Makefile, which will download controller-gen version 0.9.0 to the bin directory of the project. The make manifests command will use the controller-gen from the bin directory.

dingfeng commented 5 months ago

Hi, @free6om Thanks for your PR.

It works and will be merged after test cases all pass.