-
Notifications
You must be signed in to change notification settings - Fork 2.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
feat: plugin Index #6641
Comments
Sounds really cool!
Perhaps we want to add namespace for plugins (e.g.
|
Since everybody, including Aqua, can create a plugin, I also lean toward namespaces. It is also easier to distinguish which plugins are managed by Aqua. However, Krew doesn't have them. It's simpler if we don't have to add it. Also if we add namespaces, it can be a bit confusing because the name when you install (e.g. |
Will the user have the option to install a specific version of the plugin? For example, in krew-index only the latest version of the plugin is specified. |
I'm worried that if number of plugins is large, it will be good if there is some kind of structure for plugins (they will be sorted somehow) so that it is convenient to find them.
If we do add namespaces, I think we should use full name (namespace + name) of plugin to run it. |
Yes, |
|
hm... I think you convinced me. |
Personally, I would like to add namespace, but I am concerned that I am introducing unnecessary complexity. Of course, if there are more than 1,000 plugins, namespace is absolutely necessary, but even Krew has only 245 plugins, so it is expected that Trivy will have even fewer than that. In that case, we need to consider whether the convenience of the namespace or the complexity it brings is greater. I'm torn between both methods, as they are both good and bad. |
I feel like it's common.
How do people know the binary name...? |
Another example
The installed binary name is
|
I think they install applications using instructions (e.g. https://pypi.org/project/awscli/). |
I would vote for no namespaces, simply to reduce complexity. Later on, if we ever decide to introduce namespaces, it won't be particularly hard as most likely we will begin by creating an "aqua" namespace (and updating all our plugins, which is in our control). While the rest of the plugins can be in the "community" namespace, unless the creators of those plugins decide to implement their own namespaces. |
After discussion, we seem to have agreed on no namespace. However, I'll add a maintainer field in the plugin definition file so that the namespace can be added in the future. Thanks for the feedback! |
Motivation
Trivy recently added support for output plugins (#4863). To further promote plugin adoption, I propose creating a plugin index.
Plugin Index
Inspired by Krew, the proposed plugin index follows a similar concept. We will create a
trivy-plugin-index
repository to manage the list of plugins, similar to krew-index. An HTML page will be generated to display the plugin list and hosted on GitHub Pages, just like Krew's plugin list.Additionally, an index file in YAML format will be created and hosted on GitHub Pages. Trivy will download and use this index file locally.
Usage
The usage will be as follows:
Currently,
trivy plugin update
is used to update existing plugins. We will change this behavior to use it to download the index. An announcement will be made regarding this breaking change.A new command
trivy plugin upgrade
will be introduced for updating plugins.Plugins listed in the index can be installed without specifying the URL. Trivy will transparently retrieve the repository URL from the index and perform the installation.
Installing custom plugins not registered in the index will still be possible using the following command:
Developer Guide
We will also create a Developer Guide that documents not only how to develop plugins but also how to register them in the index.
The text was updated successfully, but these errors were encountered: