Skip to content

Commit

Permalink
Update controller-gen to 0.5.0
Browse files Browse the repository at this point in the history
* Switches to v1 crd by default
* fix/cleanup generator opts (generator outputs crd only
  "output:crd:artifact")

Signed-off-by: Dinar Valeev <dinar.valeev@absa.africa>
  • Loading branch information
k0da committed Mar 8, 2021
1 parent 4e05a43 commit 4a6c366
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 280 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ define generate
endef

define manifest
$(call controller-gen,crd:trivialVersions=true rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases)
$(call controller-gen,crd:crdVersions=v1 paths="./..." output:crd:artifacts:config=config/crd/bases)
endef

# function retrieves controller-gen path or installs controller-gen@v3.0.0 and retrieve new path in case it is not installed
Expand All @@ -420,7 +420,7 @@ define controller-gen
endef

define install-controller-gen
GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0
GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0
$(eval CONTROLLER_GEN_PATH = $(GOBIN)/controller-gen)
endef

Expand Down
Loading

0 comments on commit 4a6c366

Please sign in to comment.