Skip to content

Commit

Permalink
chore: Update controller-gen from v0.5.0 to v0.8.0 (PROJQUAY-3068)
Browse files Browse the repository at this point in the history
- Update controller-gen from v0.5.0 to v0.8.0
  • Loading branch information
jonathankingfc authored and ricardomaraschini committed Apr 1, 2022
1 parent 2b4e4b3 commit c7dffb4
Show file tree
Hide file tree
Showing 6 changed files with 3,864 additions and 1,071 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Image URL to use all building/pushing image targets
IMG ?= controller:latest
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
CRD_OPTIONS ?= "crd"

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -47,6 +47,10 @@ deploy: manifests
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
sed '/^---$$/d' config/crd/bases/quay.redhat.com_quayregistries.yaml > bundle/manifests/quayregistries.crd.yaml
cp bundle/manifests/quayregistries.crd.yaml config/crd/bases/quay.redhat.com_quayregistries.yaml
sed '/^---$$/d' config/crd/bases/redhatcop.redhat.io_quayecosystems.yaml > bundle/manifests/quayecosystems.crd.yaml
cp bundle/manifests/quayecosystems.crd.yaml config/crd/bases/redhatcop.redhat.io_quayecosystems.yaml

# Run go fmt against code
fmt:
Expand Down Expand Up @@ -77,7 +81,7 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0 ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
Expand Down
Loading

0 comments on commit c7dffb4

Please sign in to comment.