Sentinel
Sentinel copied to clipboard
[Feature] Add data-source extension for OpenSergo rate limiting and fault-tolerance spec
Issue Description
Type: feature request
Describe what happened (or what feature you want)
OpenSergo is a universal microservice governance specification, which covers fundamental scenarios like traffic routing, rate limiting and fault-tolerance.
Sentinel 2.0 will be the standard implementation of OpenSergo traffic governance spec (including traffic routing, rate limiting and fault-tolerance). Since Sentinel has already provided capabilities of rate limiting and microservice fault-tolerance, we could just add a data-source extension, which subscribes rules from the OpenSergo Control Plane, convert the rules to Sentinel rules, then developers could register the data-source to rule managers of Sentinel.
Anything else we need to know?
- OpenSergo fault-tolerance v1alpha1 spec: https://github.com/opensergo/opensergo-specification/blob/main/specification/zh-Hans/fault-tolerance.md
- Structure of OpenSergo operator and SDK: https://github.com/opensergo/opensergo-specification/issues/17
- OpenSergo Java SDK: https://github.com/opensergo/opensergo-java-sdk
For discussion of the spec: https://github.com/alibaba/Sentinel/issues/2759
A basic design and workflow of the OpenSergo data-source group:
规范定位文档中,关于容错治理规则的定义:
apiVersion: fault-tolerance.opensergo.io/v1alpha1
kind: FaultToleranceRule
metadata:
name: my-rule
namespace: prod
labels:
app: my-app # 规则配置生效的应用名
spec:
targets:
- targetResourceName: '/foo'
strategies:
- name: rate-limit-foo
fallbackAction: fallback-foo
{.metadata.labels}是设置当前容错治理规则
配置生效的应用名? 这是否应该放到{.spec.selector}中会更好一些?保持和其他CRD
语义一致?(例如Kubernetes
和Istio
中对CRD
的定义)。例如这个例子
metadata
设置的信息应当是当前CR
的元数据信息。
@YunWZ 很好的建议,可以 comment 到这里哈:https://github.com/opensergo/opensergo-specification/issues/8