File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -137,14 +137,8 @@ docker-registry-secret: check-env-docker-credentials operator-namespace
137137
138138controller-gen : # # download controller-gen if not in $PATH
139139ifeq (, $(shell which controller-gen) )
140- @{ \
141- set -e ;\
142- CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
143- cd $$CONTROLLER_GEN_TMP_DIR ;\
144- go mod init tmp ;\
145- go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 ;\
146- rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
147- }
140+ @echo Installing tools from tools.go
141+ @cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go install %
148142ifeq (, $(GOBIN ) )
149143GOBIN =$(GOPATH ) /bin
150144endif
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ apiVersion: apiextensions.k8s.io/v1
1010kind: CustomResourceDefinition
1111metadata:
1212 annotations:
13- controller-gen.kubebuilder.io/version: v0.2.5
13+ controller-gen.kubebuilder.io/version: v0.4.0
1414 creationTimestamp: null
1515 name: rabbitmqclusters.rabbitmq.com
1616spec:
Original file line number Diff line number Diff line change 1+ // +build tools
2+
3+ package main
4+
5+ import (
6+ _ "sigs.k8s.io/controller-tools/cmd/controller-gen"
7+ )
You can’t perform that action at this time.
0 commit comments