Closed yangkaa closed 1 year ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Title: Rainbond plug-in mechanism design
Currently, the plug-ins that can be planned include large-screen system, monitoring system, workflow, security system or source code construction system.
There are currently two ideas for plug-in design:
Expansion capability mainly refers to how to reuse some existing Kubernetes capabilities to achieve functional expansion. It can be understood that capabilities are standard implementations in K8s, can be directly edited through the platform, and synchronized with cluster resources.
Plug-ins are uniformly stored in the application market, and can be installed and upgraded from the application market
There is a plug-in configuration page
Support the injection and use of various ServiceMesh frameworks. Support users to use their own GatewayAPI implementation, and support users to customize the ability to edit directly on the platform.
Plug-ins installed by users are divided into official plug-ins/unofficial plug-ins: official plug-ins will display hidden entrances on the UI; unofficial plug-ins will not.
The platform administrator deploys CRD resources in the cluster (defining the resource types that Rainbond needs to watch), and the console can see all the resources of the corresponding resource group.
If the watched resource type is integrated with the platform, you can configure the corresponding parameters on the page. Such as application governance mode, GatewayClass and other resources.
If it cannot be integrated with the platform, you can only edit the yaml file directly on this page.
apiVersion: rainbow.io/v1alpha1
kind: RainbowPlugin
spec:
name: large-screen
description: This is Linkerd Plugin
pluginType: Monitor # Custom
author: "goodrain"
apiVersion: rainbow.io/v1alpha1
kind: Rainbow Ability
spec:
name: ServiceMesh
description: "xxxxx"
watchGroups:
- apiVersion: rainbow.io/v1alpha1
kind: RBDServiceMesh
apiVersion: rainbow.io/v1alpha1
kind: RBDServiceMesh
spec:
name: linkerd
description: "xxxxx"
inject:
- method: label # label/annotation
key: istio/enable-sidecar
value: "true"
Two types of CRD resources are required, RainbondAbility and RainbondServiceMesh.
apiVersion: rainbow.io/v1alpha1
kind: Rainbow Ability
spec:
name: gateway
description: "xxxxx"
watchGroups:
- apiVersion: gateway.networking.k8s.io/v1beta1
kind: GatewayClass
目的
设计思路
当前可以规划的插件大概有大屏系统、监控系统、工作流、安全类系统或源码构建系统。
插件设计当前会有以下两种思路:
扩展能力主要是指如何能复用已有的 Kubernetes 上的一些能力,实现功能的扩充,可以理解为能力是 K8s 中标准实现,通过平台能直接编辑,与集群资源同步。
最终效果
插件统一存放到应用市场,可以从应用市场安装和升级
有插件配置页面
支持多种 ServiceMesh 框架的注入和使用。支持用户使用自己的 GatewayAPI 实现,支持用户自定义想要直接在平台上编辑的能力。
业务流程
插件
用户安装插件,分为官方插件/非官方插件:官方插件会在UI上展示隐藏入口;非官方插件则不会。
扩展能力
平台管理员在集群中部署 CRD 资源(定义Rainbond 需要 Watch 的资源类型),控制台可以看到对应资源组的全部资源。
如果 Watch 到的资源类型与平台集成,则可以在页面上配置对应的参数。如应用治理模式、GatewayClass等资源。
如果不能与平台集成,那么在该页面只能直接编辑 yaml 文件修改。
技术实现
插件
扩展能力
ServiceMesh能力的使用
需要两类CRD资源,RainbondAbility 和 RainbondServiceMesh。
GatewayAPI能力的使用
插件规划