-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
✨ Make the edit command to be a plugin. #1691
Conversation
Hi @prafull01. 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. |
6f18b1e
to
5ddbcd4
Compare
/ok-to-test |
/test pull-kubebuilder-e2e-k8s-1-16-2 |
5ddbcd4
to
9b8578e
Compare
/test pull-kubebuilder-e2e-k8s-1-17-0 |
1 similar comment
/test pull-kubebuilder-e2e-k8s-1-17-0 |
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.
I tested and it worked fine:
$ kubebuilder edit --multigroup
camilamacedo@Camilas-MacBook-Pro ~/go/src/multigroup (test-ocp) $ cat PROJECT
domain: my.domain
layout: go.kubebuilder.io/v2
multigroup: true
projectName: multigroup
repo: multigroup
version: 3-alpha
Just a few nits otherwise it shows great 👍
/ok-to-test |
9b8578e
to
a845eda
Compare
/test pull-kubebuilder-e2e-k8s-1-14-1 |
Just for reference. I think the code : kubebuilder/pkg/plugin/v2/scaffolds/edit.go Lines 53 to 70 in 8c19293
However, I do not think that it is a blocker for the PR and it also might change soon. So, it for me is /approve Great work 👍 |
Hi @prafull01, Could we just update the title for something such as: |
|
HI @prafull01, I update the title for |
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.
I will let others decide if this is required but you should include some motivation why kubebuilder edit
should be considered a plugin instead of an extra command. Examples of what you could do with this for example. What I understand from the code is that it does exaclty the same without setting the layout field of the project configuration file.
Aside from that, a couple NITs to keep the comments same as the other interfaces.
a845eda
to
f6a53ea
Compare
f6a53ea
to
3d8ad18
Compare
Hi @Adirio, Thank you for your input.
The addon and edit should be plugins because all subcommands of kubebuilder should follow this design introduced in the plugin phase 1 in order to keep a standard and consistency in the project whcih is helpful to keep it maintained. Also, it allows other projects to use this plugin whcih is the purpose of the EP https://github.com/kubernetes-sigs/kubebuilder/blob/master/designs/extensible-cli-and-scaffolding-plugins-phase-1.md . PS.: Both issues (#1543, #1639) were tracked by myself after a chat with @DirectXMan12 over it. |
9271bbf
to
3d8ad18
Compare
3d8ad18
to
4f53185
Compare
4f53185
to
ea61cf4
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, camilamacedo86, prafull01 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
It is approved for 2 contributors/reviewers so I think we can move forward with it is as well. /lgtm |
Description of the change
Moved the edit commands to the plugins just like KB init , KB create api and KB create webhook plugins for v3+.
Kept the v2 behavior exactly same.
Motivation for the change
It would be nice to have the edit plugin which can be extending as well. Also, it is in sync with other commands which have their own extendible plugins. Making edit command a plugin gives us feasibility to extend the functionality of edit command same as any other command in kubebuilder. For example: In #1640 RFE whenever we move the project layout from single group to multi group, the api/ folder (created in single group project layout) should be moved to apis/ folder.
Fixes #1639