Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Install setup-envtest from controller-runtime release directly and Bump envtest version to v1.31.0 #1935

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@ KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)
ENVSUBST_BIN := envsubst
ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN)-drone
SETUP_ENVTEST = $(TOOLS_BIN_DIR)/setup-envtest
SETUP_ENVTEST_BIN := setup-envtest
SETUP_ENVTEST = $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN))
SETUP_ENVTEST_VER := release-0.19
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
GINKGO_BIN := ginkgo
GINKGO := $(TOOLS_BIN_DIR)/$(GINKGO_BIN)
GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo

# Helper function to get dependency version from go.mod
get_go_version = $(shell $(GO) list -m $1 | awk '{print $$2}')
GINGKO_VER := $(call get_go_version,github.com/onsi/ginkgo/v2)
ENVTEST_K8S_VERSION := 1.30.x
ENVTEST_K8S_VERSION := 1.31.x

# Define Docker related variables. Releases should modify and double check these vars.
# REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
Expand Down Expand Up @@ -281,9 +284,8 @@ $(CONVERSION_GEN): $(TOOLS_DIR)/go.mod
$(KUBEBUILDER): $(TOOLS_DIR)/go.mod
cd $(TOOLS_DIR) && ./install_kubebuilder.sh

$(SETUP_ENVTEST): $(TOOLS_DIR)/go.mod
cd $(TOOLS_DIR) && \
$(GO) build -tags=tools -o $(BIN_DIR)/setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest
$(SETUP_ENVTEST):
GOBIN=$(TOOLS_BIN_DIR) $(GO) install $(SETUP_ENVTEST_PKG)@$(SETUP_ENVTEST_VER)

.PHONY: $(GINKGO_BIN)
$(GINKGO_BIN): $(GINKGO) ## Build a local copy of ginkgo.
Expand Down
6 changes: 0 additions & 6 deletions hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/golang/mock v1.6.0
github.com/jteeuwen/go-bindata v3.0.7+incompatible
k8s.io/code-generator v0.30.4
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20230510161459-7571f4b9a942
sigs.k8s.io/controller-tools v0.13.0
sigs.k8s.io/kustomize/kustomize/v5 v5.4.3
sigs.k8s.io/testing_frameworks v0.1.2
Expand All @@ -19,7 +18,6 @@ require (
github.com/fatih/color v1.15.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
Expand All @@ -42,14 +40,10 @@ require (
github.com/onsi/gomega v1.31.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
Expand Down
Loading
Loading