This commit is contained in:
kkb0318
2024-04-18 23:27:41 +09:00
parent 05fe822ff4
commit 6350eb7a2f
6 changed files with 374 additions and 62 deletions
+10
View File
@@ -48,6 +48,7 @@ HELM_DOCS ?= $(LOCALBIN)/helm-docs
ENVTEST ?= $(LOCALBIN)/setup-envtest
HELMIFY ?= $(LOCALBIN)/helmify
CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs
MOCKGEN ?= $(LOCALBIN)/mockgen
## Tool Versions
KUSTOMIZE_VERSION ?= v5.2.1
@@ -73,6 +74,10 @@ helm: manifests kustomize helmify
$(KUSTOMIZE) build config/release | $(HELMIFY) -crd-dir charts/irsa-manager
.PHONY: mock
mock: mockgen
$(MOCKGEN) -source internal/client/aws.go -destination internal/mock/aws_mock.go -package mock
.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
@@ -176,6 +181,11 @@ $(CONTROLLER_GEN): $(LOCALBIN)
test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
.PHONY: mockgen
mockgen: $(MOCKGEN)
$(MOCKGEN): $(LOCALBIN)
test -s $(LOCALBIN)/mockgen || GOBIN=$(LOCALBIN) go install go.uber.org/mock/mockgen@latest
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)