-
Notifications
You must be signed in to change notification settings - Fork 528
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
Proposal: support Plugin Metadata API #2148
Comments
Hi, everyone. |
Where is the entry point for configuring Because the scope of the plugin_metadata is for all routes or services on which the plugin is configured. |
@tzssangglass |
So what's the key prefix in etcd about the plugin metadata ? |
@starsz It will be exactly the same as in APISIX. |
I think you could take a screenshot to illustrate, now it's completely based on imagination. |
Well. Got it. |
Hi, @nic-chen. It should generally provide Monaco Editor to support code completion and schema verification. Just like those plugins that do not support UI configuration. |
related PR: apache/apisix#5372 |
Feature request
Background
At present, some plugins in Apache APISIX have metadata configuration items. The current dashboard project cannot support setting these contents. We need to support it. This requires adding APIs at the backend and pages at the frontend.
About metadata
Metadata is a mechanism provided by Apache APISIX to store some global configuration content for plugins. It is different from plugin configuration on route or other entities. It is globally effective for plugins and takes plugins as dimensions. (for example, after configuring the metadata of
authz-caspin
plugin, the plugin on any route or service can obtain the content stored in the metadata)A plugin can support metadata?
We can easily distinguish whether a plugin needs metadata configuration. Plugins with the following structure in the plugin list of the built-in schema.json file in dashboard can support metadata configuration.
Proposal
Backend
Plugin List API
Read the metadata in the plugin information by traversing schema.json‘s schema property to generate a list of plugins that need metadata configuration and the property rules of plugins.
/apisix/admin/plugin_metadata
GET
Plugin Metadata Update API
According to the characteristics of plugin metadata, I think we only need to obtain and update APIs, rather than create API. When users want to create metadata, they can directly update the data JSON and store it in etcd
/apisix/admin/plugin_metadata/{plugin_name}
PUT
Plugin Metadata Delete API
Provides the function of clearing metadata data of plugin
/apisix/admin/plugin_metadata/{plugin_name}
DELETE
Frontend
Plugin List page
Obtain plugins and their data from the plugin list API (the effect is shown below, but only the plugins that need to configure metadata are displayed)
Plugin Metadata Setting page
Provide an input box that supports JSON and YAML, run users to input metadata data, and support input prompts.
Subtask decomposition
The text was updated successfully, but these errors were encountered: