From 42aebd71a7fcbb0bd63d843eb45d60e4ec85ab6f Mon Sep 17 00:00:00 2001 From: aleskandro Date: Tue, 2 Apr 2024 16:37:33 +0100 Subject: [PATCH] Pin setup-envtest setup-envtest is installed in the automatically generated makefile target. Pinning its version to avoid updates to its repo like the minimum golang version in the go.mod can break compatibility and CI. See kubernetes-sigs/kubebuilder#2480 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 83293593f..606f4bb50 100644 --- a/Makefile +++ b/Makefile @@ -259,6 +259,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v4.5.7 CONTROLLER_TOOLS_VERSION ?= v0.11.1 +SETUP_ENVTEST_VERSION ?= release-0.17 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize @@ -279,7 +280,7 @@ $(CONTROLLER_GEN): $(LOCALBIN) .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) - test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) GOFLAGS='' go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) GOFLAGS='' go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(SETUP_ENVTEST_VERSION) .PHONY: bundle bundle: manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.