$ go get -tool sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.24.0And use it like:
$ go tool sigs.k8s.io/controller-runtime/tools/setup-envtest \
use $(go list -m -f '{{.Version}}' k8s.io/api | sed 's/^v0\./1./')
Therefore, we need to change the default scaffolds as scripts used in the CI to use the pinned version
Historically, we need to use the release branch for ENVTEST (i.e https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v4/Makefile#L197-L200 and for context: kubernetes-sigs/controller-runtime#1670), now it seems that is possible to pin the binary:
Therefore, we need to change the default scaffolds as scripts used in the CI to use the pinned version