kubebuilder
kubebuilder copied to clipboard
Makefile scaffolding should generate target to install Kustomize with go install
What do you want to happen?
Since version 4.5.2, Kustomize supports installation with go install
, ref. https://github.com/kubernetes-sigs/kustomize/issues/3618. As a workaround we used the official install script in https://github.com/kubernetes-sigs/kubebuilder/pull/2486.
Motivation: Even if using the official Kustomize install script, I try to avoid executing remotely downloaded shell scripts.
Extra Labels
/kind cleanup
Hi @erikgb,
By default Kubebuilder scaffolds the Bundle go/v3 which cannot begin to use kustomize v4. It is a breaking change for the stable plugin. More info
Then, we cannot get the kustomize v3 used in the default scaffolds with go install. We can only change it for the next version (go/v4-alpha) which is using this version. In this way, I am adding this one to the go/v4 milestone.
To know more about the plugins see: https://book.kubebuilder.io/plugins/plugins.html
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
Still relevant
Hello @camilamacedo86 from above conversation it does not look like a good first issue. you have added good first issue label after long time. Can I know how this is a good first issue?
Yes, you can. Please feel free to check this one.
I think there should be a link in this
keyword.
The changes must be done in : https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go#L198-L206
You will do the change and run make generate
to ensure that all samples under testdata are updated properly to push the PR.
The above info was a little hard to process. I got that go get
can't be used we need to add go install
in updated version of kubebuilder. controller-gen have go install
. Do I need to change like that?
/assign
@lakshya8066 If you are not able to resolve this, I would like to take this up @camilamacedo86
The above info was a little hard to process. I got that
go get
can't be used we need to addgo install
in updated version of kubebuilder. controller-gen havego install
. Do I need to change like that?
it may sound dumb. but can I get reply or reviews on this. i am eager to contribute here. help me.
The above info was a little hard to process. I got that
go get
can't be used we need to addgo install
in updated version of kubebuilder. controller-gen havego install
. Do I need to change like that?it may sound dumb. but can I get reply or reviews on this. i am eager to contribute here. help me.
Not sure if I understand the question, but I assume using a similar approach that for the other CLI tools installations using go install
would work (like controller-gen
).
Thank you @erikgb for your reply.
The above info was a little hard to process. I got that
go get
can't be used we need to addgo install
in updated version of kubebuilder. controller-gen havego install
. Do I need to change like that?
Hello @camilamacedo86 need your reviews.
The scope for this task is only change how we obtain / install kustomize. The idea is to use go install instead of the shell script only for go/v4 scaffold.
See the target:
https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v4/Makefile#L138-L146
Then, see where the code changes should be done:
https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go#L198-L206
Therefore, we should not touch in the controller-gen target at all to do this one. I am not sure if we can use go install to obtain controller-gen but anyway that is not part of the scope of this issue.
You can check here: https://kubectl.docs.kubernetes.io/installation/kustomize/source/ how we can install kustomize using the go install instead.
/assign
Will tackle this one 😃, expecting a PR within 2 weeks