From 897eb42c18e907b6b40d2d3d0c20f402c999185a Mon Sep 17 00:00:00 2001 From: Ryotaro Banno Date: Mon, 1 Apr 2024 02:01:40 +0000 Subject: [PATCH] pin setup-envtest to go 1.20 Signed-off-by: Ryotaro Banno --- Makefile | 2 +- versions.mk | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cbc4e96..24b72f2 100644 --- a/Makefile +++ b/Makefile @@ -171,4 +171,4 @@ $(CONTROLLER_GEN): $(LOCALBIN) .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) - test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_VERSION) diff --git a/versions.mk b/versions.mk index ff9d381..684504c 100644 --- a/versions.mk +++ b/versions.mk @@ -3,6 +3,10 @@ CONTROLLER_TOOLS_VERSION := v0.13.0 # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. # NOTE: the suffix .x means wildcard match so specifying the latest patch version. ENVTEST_K8S_VERSION := 1.28.x +# ENVTEST_VERSION is usually latest, but might need to be pinned from time to time. +# Version pinning is needed due to version incompatibility between controller-runtime and setup-envtest. +# For more information: https://github.com/kubernetes-sigs/controller-runtime/issues/2744 +ENVTEST_VERSION := bf15e44028f908c790721fc8fe67c7bf2d06a611 HELM_VERSION := 3.14.0 KIND_VERSION := v0.20.0 # It is set by CI using the environment variable, use conditional assignment.