diff --git a/Makefile b/Makefile index fdb2b9ca4a10..7018cf268f1c 100644 --- a/Makefile +++ b/Makefile @@ -1310,7 +1310,8 @@ $(CONVERSION_GEN): # Build conversion-gen from tools folder. GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(CONVERSION_GEN_PKG) $(CONVERSION_GEN_BIN) $(CONVERSION_GEN_VER) $(CONVERSION_VERIFIER): $(TOOLS_DIR)/go.mod # Build conversion-verifier from tools folder. - cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/$(CONVERSION_VERIFIER_BIN) sigs.k8s.io/cluster-api/hack/tools/conversion-verifier + # conversion-verifier 0.13 cannot be built with Go >= 1.22. We have to pin it to 1.21. + cd $(TOOLS_DIR); GOTOOLCHAIN=go1.21.11 go build -tags=tools -o $(BIN_DIR)/$(CONVERSION_VERIFIER_BIN) sigs.k8s.io/cluster-api/hack/tools/conversion-verifier .PHONY: $(OPENAPI_GEN) $(OPENAPI_GEN): # Build openapi-gen from tools folder.