Skip to content
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

Phase 2 Plugins - Meta Issue #2600

Closed
6 tasks done
rashmigottipati opened this issue Apr 4, 2022 · 16 comments
Closed
6 tasks done

Phase 2 Plugins - Meta Issue #2600

rashmigottipati opened this issue Apr 4, 2022 · 16 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@rashmigottipati
Copy link
Contributor

rashmigottipati commented Apr 4, 2022

What do you want to happen?

The propose of this issue is to track Phase 2 Plugins effort and centralize all related discussions here so that the goals and next steps are aligned, and also share with the community on features to expect from Phase 2 Plugins Implementation.

  • Issue 1378
    This is the original feature request created that discusses the main requirements for Phase 2 plugins, which is to have a plugin architecture that supports:
  1. Plugins as separate binaries that can be discovered by the Kubebuilder CLI binary.
  2. Plugins that are language-agnostic, i.e. they can be written in any language.
  • Phase 2 Design Proposal
    This proposal discusses how to discover and use external plugins, also referred to as out-of-tree plugins (which can be implemented in any language).

  • Phase 2 Plugins implementation
    This PR handles discovery and chaining of external plugins.

Another goal of this this issue is to track the remaining work that needs to be completed for Phase 2 Plugins:

  • documentation; we need to update Plugin Section on how to create and run an external plugin.

  • Provide an example of an external plugin for users. This example could reside under the testdata dir.

  • e2e tests discovering and running the sample plugin.

Extra Labels

No response

@rashmigottipati rashmigottipati added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 4, 2022
@camilamacedo86 camilamacedo86 added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 28, 2022
@camilamacedo86
Copy link
Member

camilamacedo86 commented Jul 29, 2022

For we accomplish the goal:

a) Add samples
We have the PR: #2810
Also, @rashmigottipati would be great if we could add the python one as well used by you to demo. So we can demonstrate that it can work with any language

b) Add the e2e test to build the binary from the samples added and check that the kubebuilder CLI is capable of to properly using them by creating a project with the external plugin and verifying the result ( very simple we do not need to check all details. )

c) Add the docs and a tutorial to let people know how to create their own plugins that can be consumed by
d) update the plugins doc to let the users know that it is implemented, see:

Could we update the description of this issue as well accordingly?

Also, I am adding it as a priority for the project since we accepted the implementation but we are missing these parts which can make it harder we ensure its maintainability and usability.

c/c @everettraven

@camilamacedo86
Copy link
Member

We have now the PR"#2810
And I think it is very important we move forward with this one

@camilamacedo86 camilamacedo86 added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Sep 13, 2022
@HonakerM
Copy link

@rashmigottipati sorry to ping you but do you happen to have an example of a python plugin as mentioned in this comment? No worries if its not ready for a PR I've just been looking into implementing a kubebuilder plugin in python and would love a look at how someone else approached it.

@rashmigottipati
Copy link
Contributor Author

@HonakerM Absolutely. I will create a PR with the example of a python plugin.

@rashmigottipati
Copy link
Contributor Author

@HonakerM https://github.com/rashmigottipati/POC-Phase2-Plugins here's a sample example python plugin. Please let me know if you have any questions or need any help with this!

@HonakerM
Copy link

HonakerM commented Jan 19, 2023

@rashmigottipati thank you so much for putting that repo together. It's really helpful in understanding the plugin structure and process. I had one question regarding how kubebuilder discovers these external plugins/executables? Will I have to extended the kubebuilder executable and bundle my plugin with it? I see your PR for implementing the discovery process but I'm unsure how to use it in the kubebuilder cli. Thanks again for your help.

[EDIT] After further investigating your PR I see how kubebuilder has a few set folder paths that it checks. Do you think it would be viable to add a new cli option like --external-plugin-dir which users can pass in to add custom paths? I can look to implement this feature I'm just wondering if it would fit in with the architecture proposal.

@camilamacedo86
Copy link
Member

Hi @HonakerM,

That is described here: https://github.com/kubernetes-sigs/kubebuilder/blob/master/designs/extensible-cli-and-scaffolding-plugins-phase-2.md#discovery-of-plugin-binaries (but basically you need to have a binary)

@Kavinjsir
Copy link
Contributor

Kavinjsir commented Jan 26, 2023

For we accomplish the goal:

a) Add samples We have the PR: #2810 Also, @rashmigottipati would be great if we could add the python one as well used by you to demo. So we can demonstrate that it can work with any language

b) Add the e2e test to build the binary from the samples added and check that the kubebuilder CLI is capable of to properly using them by creating a project with the external plugin and verifying the result ( very simple we do not need to check all details. )

c) Add the docs and a tutorial to let people know how to create their own plugins that can be consumed by d) update the plugins doc to let the users know that it is implemented, see:

Could we update the description of this issue as well accordingly?

Also, I am adding it as a priority for the project since we accepted the implementation but we are missing these parts which can make it harder we ensure its maintainability and usability.

c/c @everettraven

@camilamacedo86 I'm not that much confident but I'd like to join and develop the items you listed.
(Definitely let me know if we have better candidates OR someone is interested in working on this, so that we can switch the assign)

@Kavinjsir
Copy link
Contributor

/assign @Kavinjsir

@everettraven
Copy link
Contributor

@Kavinjsir Thanks for taking this on. I am happy to answer any questions you may have and help any way I can. I would take this on myself but I just haven't had the time available to dedicate to writing the e2e tests and documentation :(

@irvifa
Copy link
Member

irvifa commented Mar 21, 2023

/remove-lifecycle frozen

@k8s-ci-robot k8s-ci-robot removed the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Mar 21, 2023
@camilamacedo86
Copy link
Member

Why did you remove the /remove-lifecycle frozen?
This label is for the bot does not close this issue.

@camilamacedo86 camilamacedo86 added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Mar 21, 2023
@k8s-triage-robot
Copy link

This issue is labeled with priority/important-soon but has not been updated in over 90 days, and should be re-triaged.
Important-soon issues must be staffed and worked on either currently, or very soon, ideally in time for the next release.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Deprioritize it with /priority important-longterm or /priority backlog
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jun 19, 2023
@Kavinjsir
Copy link
Contributor

/unassign

@Kavinjsir
Copy link
Contributor

/assign @Eileen-Yu

@camilamacedo86
Copy link
Member

All is done.
During this work extra needs were found and tracked in other issues.

Great work @Eileen-Yu 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

9 participants