enhance globalrulegroups (#5134)

Signed-off-by: junot <junotxiang@kubesphere.io>

Signed-off-by: junot <junotxiang@kubesphere.io>
This commit is contained in:
junot
2022-08-12 20:30:33 +08:00
committed by GitHub
parent f741bc7943
commit b97a49b925
8 changed files with 555 additions and 21 deletions

View File

@@ -49,6 +49,23 @@ spec:
additionalProperties:
type: string
type: object
clusterSelector:
description: Only one of its members may be specified.
properties:
inValues:
items:
type: string
type: array
matcher:
properties:
type:
type: string
value:
type: string
required:
- type
type: object
type: object
disable:
type: boolean
expr:
@@ -56,6 +73,144 @@ spec:
- type: integer
- type: string
x-kubernetes-int-or-string: true
exprBuilder:
description: If ExprBuilder is not nil, the configured Expr
will be ignored
properties:
node:
properties:
comparator:
type: string
metricThreshold:
description: Only one of its members may be specified.
properties:
cpu:
description: Only one of its members may be specified.
properties:
load15m:
type: number
load1m:
type: number
load5m:
type: number
utilization:
type: number
type: object
disk:
description: Only one of its members may be specified.
properties:
inodeUtilization:
type: number
iopsRead:
description: The unit is io/s
type: number
iopsWrite:
description: The unit is io/s
type: number
spaceAvailable:
description: The unit is bytes
type: number
spaceUtilization:
type: number
throughputRead:
description: The unit is bytes/s
type: number
throughputWrite:
description: The unit is bytes/s
type: number
type: object
memory:
description: Only one of its members may be specified.
properties:
available:
description: The unit is bytes
type: number
utilization:
type: number
type: object
network:
description: Only one of its members may be specified.
properties:
receivedRate:
description: The unit is bit/s
type: number
transmittedRate:
description: The unit is bit/s
type: number
type: object
pod:
description: Only one of its members may be specified.
properties:
abnormalRatio:
type: number
utilization:
type: number
type: object
type: object
names:
items:
type: string
type: array
required:
- comparator
- metricThreshold
- names
type: object
workload:
properties:
comparator:
type: string
kind:
type: string
metricThreshold:
description: Only one of its members may be specified.
properties:
cpu:
description: Only one of its members may be specified.
properties:
usage:
description: The unit is core
type: number
type: object
memory:
description: Only one of its members may be specified.
properties:
usage:
description: The memory usage contains cache
The unit is bytes
type: number
usageWoCache:
description: The memory usage contains no cache
The unit is bytes
type: number
type: object
network:
description: Only one of its members may be specified.
properties:
receivedRate:
description: The unit is bit/s
type: number
transmittedRate:
description: The unit is bit/s
type: number
type: object
replica:
description: Only one of its members may be specified.
properties:
unavailableRatio:
type: number
type: object
type: object
names:
items:
type: string
type: array
required:
- comparator
- kind
- names
type: object
type: object
for:
description: 'Duration is a valid time unit Supported units:
y, w, d, h, m, s, ms Examples: `30s`, `1m`, `1h20m15s`'
@@ -65,6 +220,23 @@ spec:
additionalProperties:
type: string
type: object
namespaceSelector:
description: Only one of its members may be specified.
properties:
inValues:
items:
type: string
type: array
matcher:
properties:
type:
type: string
value:
type: string
required:
- type
type: object
type: object
severity:
type: string
required: