-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
✨ Remove deprecated go get from Makefile templates #2486
✨ Remove deprecated go get from Makefile templates #2486
Conversation
Hi @ryantking. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_cruisers.yaml
Outdated
Show resolved
Hide resolved
/ok-to-test |
...onjob-tutorial/testdata/project/config/crd/bases/batch.tutorial.kubebuilder.io_cronjobs.yaml
Outdated
Show resolved
Hide resolved
/ok-to-test |
ahh... saw this too late, but it looks like it's more evolved than my initial stab at this problem #2496 - what do we need to do to get this over the line? Happy to help on the kustomize end as well. |
@camilamacedo86 @mikebz sorry for the delay, I think the PR is in a good state to be accepted now. |
.PHONY: controller-gen | ||
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. | ||
$(CONTROLLER_GEN): | ||
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if controller-gen
is already installed in the required path, are we running go install
again every time ?
Same with kustomize
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the makefile target dependencies are setup such that it'll only be installed if not present.
/retest |
Install go dependencies using `go install` instead of `go get`. see kubernetes-sigs/kubebuilder#2486 Adds a dev-tools job that checks scripts/make targets that need to be run locally be developers run using different versions of go.
Update Makefile based on kubernetes-sigs/kubebuilder#2486
* Replace `go get` with `go install` in `Makefile`. * Tidy up `Makefile`. * Introduce `tools` in `Makefile` that downloads all the tools/dependencies required. * `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough. For further information, see: * kubernetes-sigs/kubebuilder#2566 * kubernetes-sigs/kubebuilder#2486
* Replace `go get` with `go install` in `Makefile`. * Tidy up `Makefile`. * Introduce `tools` in `Makefile` that downloads all the tools/dependencies required. * `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough. For further information, see: * kubernetes-sigs/kubebuilder#2566 * kubernetes-sigs/kubebuilder#2486
* Replace `go get` with `go install` in `Makefile`. * Tidy up `Makefile`. * Introduce `tools` in `Makefile` that downloads all the tools/dependencies required. * `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough. For further information, see: * kubernetes-sigs/kubebuilder#2566 * kubernetes-sigs/kubebuilder#2486
Fix/Cleanup `Makefile` - Closes #418: * Replace `go get` with `go install` in `Makefile`. * Tidy up `Makefile`. * Introduce `tools` in `Makefile` that downloads all the tools/dependencies required. * `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough. For further information, see: * kubernetes-sigs/kubebuilder#2566 * kubernetes-sigs/kubebuilder#2486
Signed-off-by: Ryan King [email protected]
In go 1.18, using
go get
to install go binaries will be removed fromin favor of using
go install
. This commit updates the Makefiletemplates to use alternative installation methods to install the tools
used at generation.
Since
go install
adds extra constraints on what go packages can beinstalled, not all tools were a simple
go get
=>go install
change:kustomize
: Incompatible withgo install
because itsgo.mod
hasexclude
andreplace
directives. The template now uses the officialinstall script.
controller-gen
: Fully compatible withgo install
.setup-envtest
: Can be installed usinggo install
, but not aspecific version since the repo does not have the tag scheme since it is
in a sub-module. It would need a tag in the format
tools/setup-envtest/vX.Y.Z
.The commit also regenerated all book source code using this new pattern.
Resolves: #2477