diff --git a/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_circuitbreakerrules_crd.yaml b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_circuitbreakerrules_crd.yaml new file mode 100644 index 000000000..201315248 --- /dev/null +++ b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_circuitbreakerrules_crd.yaml @@ -0,0 +1,93 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: cbrules.datasource.sentinel.com + namespace: default + labels: + sentinel-datasource: k8s +spec: + group: datasource.sentinel.com + names: + kind: CircuitBreakerRules + listKind: CircuitBreakerRulesList + plural: cbrules + singular: cbrule + shortNames: + - cbrs + scope: Namespaced + validation: + openAPIV3Schema: + description: CircuitBreakerRules is the Schema for the circuit breaker rules API + properties: + apiVersion: + description: 'Kind is a string value representing the REST resource this object represents.' + type: string + kind: + description: 'APIVersion defines the versioned schema of this representation of an object.' + type: string + metadata: + type: object + spec: + description: CircuitBreakerRulesSpec defines the desired state of CircuitBreakerRules + properties: + rules: + description: 'rules is the circuit breaker rule list' + items: + properties: + resource: + type: string + minLength: 1 + maxLength: 100 + strategy: + format: int32 + type: integer + enum: + - 0 + - 1 + - 2 + retryTimeoutMs: + format: int32 + type: integer + minimum: 1 + minRequestAmount: + format: int64 + type: integer + minimum: 1 + statIntervalMs: + format: int32 + type: integer + minimum: 1 + maxAllowedRtMs: + format: int64 + type: integer + minimum: 1 + maxSlowRequestRatio: + type: number + format: float + errorCountThreshold: + format: int64 + type: integer + minimum: 1 + errorRatioThreshold: + type: number + format: float + required: + - resource + - strategy + - retryTimeoutMs + - minRequestAmount + - statIntervalMs + type: object + type: array + required: + - rules + type: object + status: + description: CircuitBreakerRulesStatus defines the observed state of CircuitBreakerRules + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true diff --git a/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_flowrules_crd.yaml b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_flowrules_crd.yaml new file mode 100644 index 000000000..e451cc4da --- /dev/null +++ b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_flowrules_crd.yaml @@ -0,0 +1,103 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: flowrules.datasource.sentinel.com + namespace: default + labels: + sentinel-datasource: k8s +spec: + group: datasource.sentinel.com + names: + kind: FlowRules + listKind: FlowRulesList + plural: flowrules + singular: flowrule + shortNames: + - frs + scope: Namespaced + validation: + openAPIV3Schema: + description: FlowRules is the Schema for the flowrules API + properties: + apiVersion: + description: 'Kind is a string value representing the REST resource this object represents.' + type: string + kind: + description: 'APIVersion defines the versioned schema of this representation of an object.' + type: string + metadata: + type: object + spec: + description: FlowRulesSpec defines the desired state of FlowRules + properties: + rules: + description: 'rules is the flow rule list' + items: + properties: + resource: + type: string + minLength: 1 + maxLength: 100 + limitOrigin: + type: string + minLength: 1 + maxLength: 100 + metricType: + type: integer + format: int32 + enum: + - 0 + - 1 + count: + type: number + format: float + relationStrategy: + type: integer + format: int32 + enum: + - 0 + - 1 + controlBehavior: + type: integer + format: int32 + enum: + - 0 + - 1 + - 2 + - 3 + refResource: + type: string + minLength: 1 + maxLength: 100 + warmUpPeriodSec: + format: int32 + type: integer + minimum: 0 + maxQueueingTimeMs: + format: int32 + type: integer + minimum: 0 + required: + - resource + - limitOrigin + - metricType + - count + - relationStrategy + - controlBehavior + - refResource + - warmUpPeriodSec + - maxQueueingTimeMs + type: object + type: array + required: + - rules + type: object + status: + description: FlowRulesStatus defines the observed state of FlowRules + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true diff --git a/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_hotspotrules_crd.yaml b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_hotspotrules_crd.yaml new file mode 100644 index 000000000..653c5010f --- /dev/null +++ b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_hotspotrules_crd.yaml @@ -0,0 +1,128 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: hotspotrules.datasource.sentinel.com + namespace: default + labels: + sentinel-datasource: k8s +spec: + group: datasource.sentinel.com + names: + kind: HotspotRules + listKind: HotspotRulesList + plural: hotspotrules + singular: hotspotrule + shortNames: + - hrs + scope: Namespaced + validation: + openAPIV3Schema: + description: HotspotRules is the Schema for the hotspotrules API + properties: + apiVersion: + description: 'Kind is a string value representing the REST resource this object represents.' + type: string + kind: + description: 'APIVersion defines the versioned schema of this representation of an object.' + type: string + metadata: + type: object + spec: + description: HotspotRulesSpec defines the desired state of HotspotRules + properties: + rules: + description: 'rules is the hot spot(frequency) rule list' + items: + properties: + resource: + type: string + minLength: 1 + maxLength: 100 + metricType: + type: integer + format: int32 + enum: + - 0 + - 1 + controlBehavior: + type: integer + format: int32 + enum: + - 0 + - 1 + paramIndex: + description: ParamIndex is the index in context arguments list. + type: integer + minimum: 0 + threshold: + format: number + type: float + maxQueueingTimeMs: + description: MaxQueueingTimeMs is the max queueing time in Throttling ControlBehavior + format: int64 + type: integer + minimum: 0 + burstCount: + format: int64 + type: integer + minimum: 0 + durationInSec: + format: int64 + type: integer + minimum: 0 + paramsMaxCapacity: + format: int64 + type: integer + minimum: 1 + specificItems: + description: specific item list + items: + description: 'specific item' + properties: + valKind: + format: int32 + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + valStr: + type: string + minLength: 1 + maxLength: 100 + specificThreshold: + format: int64 + type: integer + minimum: 0 + required: + - valKind + - valStr + - specificThreshold + type: object + type: array + required: + - resource + - metricType + - controlBehavior + - paramIndex + - threshold + - maxQueueingTimeMs + - burstCount + - durationInSec + - paramsMaxCapacity + - specificItems + type: object + type: array + required: + - rules + type: object + status: + description: HotspotRulesStatus defines the observed state of HotspotRules + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true diff --git a/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_systemrules_crd.yaml b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_systemrules_crd.yaml new file mode 100644 index 000000000..ce289fe9b --- /dev/null +++ b/ext/datasource/k8s/deploy/crds/datasource.sentinel.com_systemrules_crd.yaml @@ -0,0 +1,72 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: systemrules.datasource.sentinel.com + namespace: default + labels: + sentinel-datasource: k8s +spec: + group: datasource.sentinel.com + names: + kind: SystemRules + listKind: SystemRulesList + plural: systemrules + singular: systemrule + shortNames: + - srs + scope: Namespaced + validation: + openAPIV3Schema: + description: SystemRules is the Schema for the systemrules API + properties: + apiVersion: + description: 'Kind is a string value representing the REST resource this object represents.' + type: string + kind: + description: 'APIVersion defines the versioned schema of this representation of an object.' + type: string + metadata: + type: object + spec: + description: SystemRulesSpec defines the desired state of SystemRules + properties: + rules: + description: 'rules is the system rule list' + items: + properties: + metricType: + type: integer + format: int32 + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + strategy: + type: integer + format: int32 + enum: + - -1 + - 1 + triggerCount: + type: number + format: float + required: + - metricType + - strategy + - triggerCount + type: object + type: array + required: + - rules + type: object + status: + description: SystemRulesStatus defines the observed state of SystemRules + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true