Skip to content

Commit e6314ed

Browse files
Edit controller-gen call to only generate manifests for operrator-controller and exclude catalogd
1 parent 307a288 commit e6314ed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@ tidy: #HELP Update dependencies.
100100
$(Q)go mod tidy -go=$(GOLANG_VERSION)
101101

102102
.PHONY: manifests
103-
manifests: $(CONTROLLER_GEN) #EXHELP Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
104-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/base/crd/bases output:rbac:artifacts:config=config/base/rbac
103+
# To exclude catalogd. Otherwise, the CRD, Webhook and other configurations will be generated and added to the config/
104+
PATHS = ./api/... ./cmd/... ./internal/... ./test/...
105+
manifests: $(CONTROLLER_GEN) #EXHELP Generate WebhookConfiguration, ClusterRole, and CustomResourceDefinition objects.
106+
@for path in $(PATHS); do \
107+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="$$path" output:crd:artifacts:config=config/base/crd/bases output:rbac:artifacts:config=config/base/rbac; \
108+
done
105109

106110
.PHONY: generate
107111
generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.

0 commit comments

Comments
 (0)