@@ -101,8 +101,9 @@ help: ## Display this help.
101
101
# #@ Development
102
102
103
103
.PHONY : manifests
104
- manifests : controller-gen # # Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
104
+ manifests : controller-gen kubebuilder # # Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
105
105
$(CONTROLLER_GEN ) rbac:roleName=manager-role crd webhook paths=" ./..." output:crd:artifacts:config=config/crd/bases
106
+ $(KUBEBUILDER ) edit --plugins=helm/v1-alpha --force # # regenerate the helm charts
106
107
107
108
.PHONY : generate
108
109
generate : controller-gen # # Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -121,7 +122,7 @@ mod.check:#check go module dependencies
121
122
@echo ' running "go mod verify"'
122
123
@go mod verify
123
124
@echo ' checking for modified files.'
124
- # fail in case there are uncommitted changes
125
+ # fail in case there are uncommitted changes
125
126
@ git diff --quiet || (echo " files were modified: " ; git status --porcelain ; false)
126
127
127
128
.PHONY : test
@@ -255,12 +256,20 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize-$(KUSTOMIZE_VERSION)
255
256
CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen-$(CONTROLLER_TOOLS_VERSION )
256
257
ENVTEST ?= $(LOCALBIN ) /setup-envtest-$(ENVTEST_VERSION )
257
258
GOLANGCI_LINT = $(LOCALBIN ) /golangci-lint-$(GOLANGCI_LINT_VERSION )
259
+ KUBEBUILDER ?= $(LOCALBIN ) /kubebuilder-$(KUBEBUILDER_VERSION )
258
260
259
261
# # Tool Versions
260
262
KUSTOMIZE_VERSION ?= v5.3.0
261
263
CONTROLLER_TOOLS_VERSION ?= v0.14.0
262
264
ENVTEST_VERSION ?= release-0.17
263
265
GOLANGCI_LINT_VERSION ?= v1.63.4
266
+ KUBEBUILDER_VERSION ?= v4.5.0
267
+
268
+ .PHONY : kubebuilder
269
+ kubebuilder : $(KUBEBUILDER ) # # Download kubebuilder locally if necessary.
270
+ $(KUBEBUILDER ) : $(LOCALBIN )
271
+ curl -L -o $(KUBEBUILDER ) https://github.com/kubernetes-sigs/kubebuilder/releases/download/$(KUBEBUILDER_VERSION ) /kubebuilder_$(shell go env GOOS) _$(shell go env GOARCH)
272
+ chmod +x $(KUBEBUILDER )
264
273
265
274
.PHONY : kustomize
266
275
kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
0 commit comments