VelUX plugin could help you customs any page applications. Most default and extensional runtime APIs make you develop the application easies.
Refer contributing guide.
mkdir custom-plugins
$pluginName=<your_plugin_name>
git clone https://github.com/kubevela-contrib/velaux-plugin-template custom-plugins/$pluginName
cd custom-plugins/$pluginName
- src/plugin.json: Plugin metadata, you should change it.
- package.json: Project metadata, you should change the project name, version, and description etc.
Plugin metadata spec:
{
"type": "page-app",
"name": string,
"id": string,
"info": {
"keywords": []string,
"description": string,
"author": {
"name": string
},
"logos": {
"small": string,
"large": string
},
"screenshots": [],
"version": string,
"updated": string
},
"backend"?: bool,
"proxy"?: bool,
"backendType?": "kube-api" | "kube-service",
"routes"?: [
{
"path": string,
"permission": {
"resource": string,
"action": string
}
}
],
"backendService"?: {
"name": string
"namespace"?: string
},
"kubePermissions"?: [
{
"apiGroups": string[],
"resources": string[],
"verbs": string[],
}
]
}
There are some example plugin configs. https://github.com/kubevela/velaux/tree/main/docs/plugins
yarn install
yarn dev
import { getBackendSrv } from '@velaux/ui';
// Request the core APIs
getBackendSrv().get('/api/v1/clusters').then(res=>{console.log(res)})
// Request the plugin proxy APIs
getBackendSrv().get(`/proxy/plugins/${pluginID}/${realPath}`).then(res=>{console.log(res)})
Core API Reference: https://kubevela.net/docs/platform-engineers/openapi/overview
import { Table, Form } from '@velaux/ui';
UI Component Reference: https://fusion.design/pc/component/box?themeid=2
go run ./cmd/server/main.go --plugin-path <custom-plugins-path>