File tree 2 files changed +12
-7
lines changed
2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -119,16 +119,19 @@ tidy: #HELP Update dependencies.
119
119
.PHONY : manifests
120
120
KUSTOMIZE_CRDS_DIR := config/base/crd/bases
121
121
KUSTOMIZE_RBAC_DIR := config/base/rbac
122
+
123
+ # Needed because otherwise we exclude Go all files in vendor/github.com/proglottis/gpgme and fail
124
+ CGO_ENABLED_CTRL_GEN := CGO_ENABLED=1 $(CONTROLLER_GEN )
122
125
manifests : $(CONTROLLER_GEN ) # EXHELP Generate WebhookConfiguration, ClusterRole, and CustomResourceDefinition objects.
123
126
# To generate the manifests used and do not use catalogd directory
124
- rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CONTROLLER_GEN ) crd paths=./api/... output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
125
- rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CONTROLLER_GEN ) rbac:roleName=manager-role paths=./internal/operator-controller/... output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
127
+ rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CGO_ENABLED_CTRL_GEN ) crd paths=./api/... output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
128
+ rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CGO_ENABLED_CTRL_GEN ) rbac:roleName=manager-role paths=./internal/operator-controller/... output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
126
129
# To generate the manifests for catalogd
127
130
$(MAKE ) -C catalogd generate
128
131
129
132
.PHONY : generate
130
133
generate : $(CONTROLLER_GEN ) # EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
131
- $(CONTROLLER_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
134
+ $(CGO_ENABLED_CTRL_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
132
135
133
136
.PHONY : verify
134
137
verify : tidy fmt generate manifests crd-ref-docs # HELP Verify all generated code is up-to-date.
Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ clean: ## Remove binaries and test artifacts
62
62
KUSTOMIZE_CRDS_DIR := config/base/crd/bases
63
63
KUSTOMIZE_RBAC_DIR := config/base/rbac
64
64
KUSTOMIZE_WEBHOOKS_DIR := config/base/manager/webhook
65
+ # Needed because otherwise we exclude Go all files in vendor/github.com/proglottis/gpgme and fail
66
+ CGO_ENABLED_CTRL_GEN := CGO_ENABLED=1 $(CONTROLLER_GEN )
65
67
generate : $(CONTROLLER_GEN ) # # Generate code and manifests.
66
- $(CONTROLLER_GEN ) object:headerFile=" ../hack/boilerplate.go.txt" paths=" ./..."
67
- rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CONTROLLER_GEN ) crd paths=" ./api/..." output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
68
- rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CONTROLLER_GEN ) rbac:roleName=manager-role paths=" ./internal/..." output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
69
- rm -f $(KUSTOMIZE_WEBHOOKS_DIR ) /manifests.yaml && $(CONTROLLER_GEN ) webhook paths=" ./internal/..." output:webhook:artifacts:config=$(KUSTOMIZE_WEBHOOKS_DIR )
68
+ $(CGO_ENABLED_CTRL_GEN ) object:headerFile=" ../hack/boilerplate.go.txt" paths=" ./..."
69
+ rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CGO_ENABLED_CTRL_GEN ) crd paths=" ./api/..." output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
70
+ rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CGO_ENABLED_CTRL_GEN ) rbac:roleName=manager-role paths=" ./internal/..." output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
71
+ rm -f $(KUSTOMIZE_WEBHOOKS_DIR ) /manifests.yaml && $(CGO_ENABLED_CTRL_GEN ) webhook paths=" ./internal/..." output:webhook:artifacts:config=$(KUSTOMIZE_WEBHOOKS_DIR )
70
72
71
73
# #@ Build
72
74
You can’t perform that action at this time.
0 commit comments