|
3 | 3 |
|
4 | 4 | ## CLI versions (with links to the latest releases) |
5 | 5 | # https://github.com/kubernetes-sigs/controller-tools/releases/latest |
6 | | -CONTROLLER_GEN_VERSION := v0.16.3 |
| 6 | +CONTROLLER_GEN_VERSION := v0.19.0 |
7 | 7 | # https://github.com/kubernetes-sigs/kustomize/releases/latest |
8 | | -KUSTOMIZE_VERSION := v5.6.0 |
| 8 | +KUSTOMIZE_VERSION := v5.7.1 |
9 | 9 | # https://github.com/golangci/golangci-lint/releases/latest |
10 | 10 | GOLANGCI_VERSION := v1.64.8 |
11 | 11 | # https://github.com/mvdan/gofumpt/releases/latest |
12 | | -GOFUMPT_VERSION := v0.7.0 |
| 12 | +GOFUMPT_VERSION := v0.9.1 |
13 | 13 | # https://github.com/daixiang0/gci/releases/latest |
14 | | -GCI_VERSION := v0.13.5 |
| 14 | +GCI_VERSION := v0.13.7 |
15 | 15 | # https://github.com/securego/gosec/releases/latest |
16 | | -GOSEC_VERSION := v2.22.2 |
| 16 | +GOSEC_VERSION := v2.22.9 |
17 | 17 | # https://github.com/kubernetes-sigs/kubebuilder/releases/latest |
18 | | -KBVERSION := 3.15.1 |
19 | | -# https://github.com/kubernetes/kubernetes/releases/latest |
20 | | -ENVTEST_K8S_VERSION := 1.30.x |
| 18 | +KBVERSION := 4.9.0 |
| 19 | +# https://github.com/alexfalkowski/gocovmerge/releases/latest |
| 20 | +GOCOVMERGE_VERSION := v2.16.0 |
| 21 | +# ref: https://book.kubebuilder.io/reference/envtest.html?highlight=setup-envtest#installation |
| 22 | +# Parse the controller-runtime version from go.mod and parse to its release-X.Y git branch |
| 23 | +ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}') |
| 24 | +# Parse the Kubernetes API version from go.mod (which is v0.Y.Z) and convert to the corresponding v1.Y.Z format |
| 25 | +ENVTEST_K8S_VERSION := $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}') |
21 | 26 |
|
22 | 27 | LOCAL_BIN ?= $(error LOCAL_BIN is not set.) |
23 | 28 | ifneq ($(findstring $(LOCAL_BIN), $(PATH)), $(LOCAL_BIN)) |
@@ -112,7 +117,8 @@ kubebuilder: |
112 | 117 |
|
113 | 118 | .PHONY: envtest |
114 | 119 | envtest: |
115 | | - $(call go-get-tool,sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) |
| 120 | + # Installing setup-envtest using the release-X.Y branch from the version specified in go.mod |
| 121 | + $(call go-get-tool,sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_VERSION)) |
116 | 122 |
|
117 | 123 | .PHONY: gosec |
118 | 124 | gosec: |
@@ -180,4 +186,4 @@ e2e-dependencies: |
180 | 186 | GOCOVMERGE = $(LOCAL_BIN)/gocovmerge |
181 | 187 | .PHONY: coverage-dependencies |
182 | 188 | coverage-dependencies: |
183 | | - $(call go-get-tool,github.com/wadey/gocovmerge@v0.0.0-20160331181800-b5bfa59ec0ad) |
| 189 | + $(call go-get-tool,github.com/alexfalkowski/gocovmerge/v2@$(GOCOVMERGE_VERSION)) |
0 commit comments