Skip to content

Commit

Permalink
Merge pull request #252 from topolvm/specify-envtest-branch
Browse files Browse the repository at this point in the history
specify envtest branch according to controller-runtime version
  • Loading branch information
satoru-takeuchi authored Apr 22, 2024
2 parents 93ba244 + 86e31d5 commit b433f48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ SETUP_ENVTEST := $(BINDIR)/setup-envtest
setup-envtest: $(SETUP_ENVTEST) ## Download setup-envtest locally if necessary
$(SETUP_ENVTEST):
# see https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest
GOBIN=$(BINDIR) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_VERSION)
GOBIN=$(BINDIR) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_BRANCH)

.PHONY: setup
setup: # Setup tools
Expand Down
8 changes: 4 additions & 4 deletions versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ KUBE_PROMETHEUS_VERSION := 0.13.0
KUBERNETES_VERSION ?= 1.28.0
TOPOLVM_VERSION := topolvm-chart-v14.0.0

# 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
# Tools versions which are defined in go.mod
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
CONTROLLER_RUNTIME_VERSION := $(shell awk '/sigs\.k8s\.io\/controller-runtime/ {print substr($$2, 2)}' $(SELF_DIR)/go.mod)

ENVTEST_BRANCH := release-$(shell echo $(CONTROLLER_RUNTIME_VERSION) | cut -d "." -f 1-2)
ENVTEST_K8S_VERSION := $(shell echo $(KUBERNETES_VERSION) | cut -d "." -f 1-2)

# Tools versions which are defined in go.mod
Expand Down

0 comments on commit b433f48

Please sign in to comment.