operator icon indicating copy to clipboard operation
operator copied to clipboard

Add make (mage) targets for controller-gen and kustomize

Open troy0820 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

Make targets that come bundle with kubebuilder/operator-framework allow the crds/manifests to be generated when changes are made to the crds, etc. Having this as mage targets will allow the pipeline to vet that the crds matches what is described in the api/v1 layer.

Describe the solution you'd like

  • [ ] Include the kubebuilder make targets as mage targets to vet manifests created by the controller-gen/kustomize tool
  • [ ] Included mage targets in the pipeline

Describe alternatives you've considered This used to be in the repo but was removed for some reason

Additional context None

troy0820 avatar Aug 07 '23 18:08 troy0820

potential targets:

  • make tools:
    • ~~controller-gen tool install~~ edit: may need updating to v0.12.1
    • ~~kustomize tool install~~
  • make manifests - generates crds from api/v1
  • make install - generates crds from api/v1 and puts them on a cluster (installs crds, good for integration tests?)
  • make generate - generate deepcopy for api types (verify in pipeline)
    • controller-gen object paths=./api/v1

troy0820 avatar Aug 08 '23 22:08 troy0820

controller-gen is there EnsureControllerGen() kustomize is there EnsureKustomize()

  • make generate needs to include the go generate to include the mocks in a PR that will help with testing the GRPCClient without the server.

troy0820 avatar Aug 10 '23 19:08 troy0820