@@ -76,7 +76,6 @@ mock: mockgen ## Generate mock client for k8sclient
7676.PHONY : generate-helm-chart
7777generate-helm-chart : manifests kustomize helmify # # Generate Helm chart from Kustomize manifests
7878 $(KUSTOMIZE ) build config/default | $(HELMIFY ) -crd-dir charts/armada-operator
79- ./hack/fix-helmify.sh
8079
8180generate-crd-ref-docs : crd-ref-docs # # Generate CRD reference documentation
8281 $(CRD_REF_DOCS ) crd-ref-docs --source-path=./api --config=./hack/crd-ref-docs-config.yaml --renderer=markdown --output-path=./dev/crd
@@ -92,12 +91,12 @@ vet: ## Run go vet against code.
9291 go vet ./...
9392
9493.PHONY : lint
95- lint : # # Run golangci-lint against code.
96- golangci-lint run
94+ lint : golangci-lint # # Run golangci-lint against code.
95+ $( GOLANGCI_LINT ) run
9796
9897.PHONY : lint-fix
99- lint-fix : # # Run golangci-lint against code and fix issues.
100- golangci-lint run --fix
98+ lint-fix : golangci-lint # # Run golangci-lint against code and fix issues.
99+ $( GOLANGCI_LINT ) run --fix
101100
102101# #@ Tests
103102
@@ -182,11 +181,11 @@ kind-all: kind-create-cluster kind-deploy ## Create a kind cluster and deploy th
182181
183182.PHONY : kind-create-cluster
184183kind-create-cluster : kind # # Create a kind cluster using config from hack/kind-config.yaml.
185- kind create cluster --config hack/kind-config.yaml --name $(KIND_CLUSTER_NAME )
184+ $( KIND ) create cluster --config hack/kind-config.yaml --name $(KIND_CLUSTER_NAME )
186185
187186.PHONY : kind-load-image
188187kind-load-image : docker-build # # Load Operator Docker image into kind cluster.
189- kind load docker-image --name $(KIND_CLUSTER_NAME ) ${IMAGE_TAG}
188+ $( KIND ) load docker-image --name $(KIND_CLUSTER_NAME ) ${IMAGE_TAG}
190189
191190.PHONY : kind-deploy
192191kind-deploy : kind-load-image install install-cert-manager wait-for-cert-manager # # Deploy operator in a kind cluster after building & loading the image
@@ -195,7 +194,7 @@ kind-deploy: kind-load-image install install-cert-manager wait-for-cert-manager
195194
196195.PHONY : kind-delete-cluster
197196kind-delete-cluster : # # Delete the local development cluster using kind.
198- kind delete cluster --name $(KIND_CLUSTER_NAME )
197+ $( KIND ) delete cluster --name $(KIND_CLUSTER_NAME )
199198
200199.PHONY : install
201200install : kustomize manifests # # Install Armada Operator CRDs.
@@ -313,6 +312,7 @@ KIND ?= $(LOCALBIN_TOOLING)/kind
313312HELMIFY ?= $(LOCALBIN_TOOLING ) /helmify
314313GORELEASER ?= $(LOCALBIN_TOOLING ) /goreleaser
315314CRD_REF_DOCS ?= $(LOCALBIN_TOOLING ) /crd-ref-docs
315+ GOLANGCI_LINT ?= $(LOCALBIN_TOOLING ) /golangci-lint
316316
317317KUSTOMIZE_VERSION ?= v5.4.2
318318KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
@@ -368,6 +368,12 @@ crd-ref-docs: $(CRD_REF_DOCS) ## Download crd-ref-docs locally if necessary.
368368$(CRD_REF_DOCS ) : $(LOCALBIN_TOOLING )
369369 test -s $(CRD_REF_DOCS ) || GOBIN=$(LOCALBIN_TOOLING ) go install github.com/elastic/crd-ref-docs@$(CRD_REF_DOCS_VERSION )
370370
371+ GOLANGCI_LINT_VERSION ?= v1.59.0
372+ .PHONY : golangci-lint
373+ golangci-lint : $(GOLANGCI_LINT ) # # Download golangci-lint locally if necessary.
374+ $(GOLANGCI_LINT ) : $(LOCALBIN_TOOLING )
375+ test -s $(GOLANGCI_LINT ) || GOBIN=$(LOCALBIN_TOOLING ) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION )
376+
371377.PHONY : helm
372378HELM = ./bin/helm
373379OS =$(shell go env GOOS)
0 commit comments