File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ defaults:
30
30
31
31
gofmt -w $(DEFAULTS_TEST_FILE)
32
32
33
+ # # Tool Binaries
34
+ CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen
35
+
36
+ # # Tool Versions
37
+ CONTROLLER_TOOLS_VERSION ?= v0.9.2
38
+
33
39
34
40
# # Location to install dependencies to
35
41
LOCALBIN ?= $(shell pwd) /bin
@@ -49,4 +55,13 @@ imports: openshift-goimports ## Organize imports in go files using openshift-goi
49
55
50
56
.PHONY : verify-imports
51
57
verify-imports : openshift-goimports # # Run import verifications.
52
- ./hack/verify-imports.sh $(OPENSHIFT-GOIMPORTS )
58
+ ./hack/verify-imports.sh $(OPENSHIFT-GOIMPORTS )
59
+
60
+ .PHONY : controller-gen
61
+ controller-gen : $(CONTROLLER_GEN ) # # Download controller-gen locally if necessary.
62
+ $(CONTROLLER_GEN ) : $(LOCALBIN )
63
+ test -s $(LOCALBIN ) /controller-gen || GOBIN=$(LOCALBIN ) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION )
64
+
65
+ .PHONY : manifests
66
+ manifests : controller-gen # # Generate RBAC objects.
67
+ $(CONTROLLER_GEN ) rbac:roleName=manager-role webhook paths=" ./..."
You can’t perform that action at this time.
0 commit comments