Skip to content

Commit e36a8e0

Browse files
Fix envtest version (#1286)
Signed-off-by: Andreas Gerstmayr <[email protected]>
1 parent 6dde867 commit e36a8e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
8383
BUNDLE_GEN_FLAGS += --use-image-digests
8484
endif
8585

86-
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by setup-envtest binary.
87-
ENVTEST_K8S_VERSION = 1.24.2
88-
8986
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
9087
ifeq (,$(shell go env GOBIN))
9188
GOBIN=$(shell go env GOPATH)/bin
@@ -237,11 +234,14 @@ $(LOCALBIN):
237234
KUSTOMIZE_VERSION ?= v5.0.3
238235
CONTROLLER_GEN_VERSION ?= v0.16.5
239236
GEN_API_DOCS_VERSION ?= v0.6.0
240-
ENVTEST_VERSION ?= latest
241237
OPERATOR_SDK_VERSION ?= 1.36.0
242238
OLM_VERSION ?= v0.28.0
243239
CERTMANAGER_VERSION ?= 1.9.1
244240
CHAINSAW_VERSION ?= v0.2.12
241+
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
242+
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
243+
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
244+
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
245245

246246
## Tool Binaries
247247
KUSTOMIZE ?= $(LOCALBIN)/kustomize-$(KUSTOMIZE_VERSION)

0 commit comments

Comments
 (0)