v2beta1

package
v0.0.0-...-cfc12f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Overview

Package v2beta1 contains API Schema definitions for the alerting v2beta1 API group +groupName=alerting.kubesphere.io +kubebuilder:object:generate=true

Package v2beta1 contains API Schema definitions for the alerting v2beta1 API group +kubebuilder:object:generate=true +groupName=alerting.kubesphere.io

Index

Constants

View Source
const (
	ResourceKindRuleGroup        = "RuleGroup"
	ResourceKindClusterRuleGroup = "ClusterRuleGroup"
	ResourceKindGlobalRuleGroup  = "GlobalRuleGroup"
)
View Source
const (
	ComparatorLT Comparator = "<"
	ComparatorLE Comparator = "<="
	ComparatorGT Comparator = ">"
	ComparatorGE Comparator = ">="

	SeverityWarning  Severity = "warning"
	SeverityError    Severity = "error"
	SeverityCritical Severity = "critical"

	MatchEqual     = "="
	MatchNotEqual  = "!="
	MatchRegexp    = "=~"
	MatchNotRegexp = "!~"
)
View Source
const (
	MetricWorkloadCpuUsage               = "namespace:workload_cpu_usage:sum"
	MetricWorkloadMemoryUsage            = "namespace:workload_memory_usage:sum"
	MetricWorkloadMemoryUsageWoCache     = "namespace:workload_memory_usage_wo_cache:sum"
	MetricWorkloadNetworkTransmittedRate = "namespace:workload_net_bytes_transmitted:sum_irate"
	MetricWorkloadNetworkReceivedRate    = "namespace:workload_net_bytes_received:sum_irate"
	MetricWorkloadPodUnavailableRatio    = "namespace:%s_unavailable_replicas:ratio" // "%s" must be one of "deployment", "statefulset" and "daemonset"
)
View Source
const (
	MetricNodeCpuUtilization         = "node:node_cpu_utilisation:avg1m"
	MetricNodeCpuLoad1m              = "node:load1:ratio"
	MetricNodeCpuLoad5m              = "node:load5:ratio"
	MetricNodeCpuLoad15m             = "node:load15:ratio"
	MetricNodeMemoryUtilization      = "node:node_memory_utilisation:"
	MetricNodeMemoryAvailable        = "node:node_memory_bytes_available:sum"
	MetricNodeNetworkTransmittedRate = "node:node_net_bytes_transmitted:sum_irate"
	MetricNodeNetwrokReceivedRate    = "node:node_net_bytes_received:sum_irate"
	MetricNodeDiskSpaceUtilization   = "node:disk_space_utilization:ratio"
	MetricNodeDiskSpaceAvailable     = "node:disk_space_available:"
	MetricNodeDiskInodeUtilization   = "node:disk_inode_utilization:ratio"
	MetricNodeDiskIopsRead           = "node:data_volume_iops_reads:sum"
	MetricNodeDiskIopsWrite          = "node:data_volume_iops_writes:sum"
	MetricNodeDiskThroughputRead     = "node:data_volume_throughput_bytes_read:sum"
	MetricNodeDiskThroughputWrite    = "node:data_volume_throughput_bytes_write:sum"
	MetricNodePodUtilization         = "node:pod_utilization:ratio"
	MetricNodePodAbnormalRatio       = "node:pod_abnormal:ratio"
)
View Source
const (
	RuleLabelKeyRuleId   = "rule_id"
	MaxRuleCountPerGroup = 40
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "alerting.kubesphere.io", Version: "v2beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Types

type ClusterRule

type ClusterRule struct {
	Rule `json:",inline"`
	// If ExprBuilder is not nil, the configured Expr will be ignored
	ExprBuilder *ClusterRuleExprBuilder `json:"exprBuilder,omitempty"`
}

func (*ClusterRule) DeepCopy

func (in *ClusterRule) DeepCopy() *ClusterRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRule.

func (*ClusterRule) DeepCopyInto

func (in *ClusterRule) DeepCopyInto(out *ClusterRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterRuleExprBuilder

type ClusterRuleExprBuilder struct {
	Node *NodeExprBuilder `json:"node,omitempty"`
}

func (*ClusterRuleExprBuilder) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRuleExprBuilder.

func (*ClusterRuleExprBuilder) DeepCopyInto

func (in *ClusterRuleExprBuilder) DeepCopyInto(out *ClusterRuleExprBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterRuleGroup

type ClusterRuleGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterRuleGroupSpec   `json:"spec,omitempty"`
	Status ClusterRuleGroupStatus `json:"status,omitempty"`
}

ClusterRuleGroup is the Schema for the ClusterRuleGroup API

func (*ClusterRuleGroup) DeepCopy

func (in *ClusterRuleGroup) DeepCopy() *ClusterRuleGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRuleGroup.

func (*ClusterRuleGroup) DeepCopyInto

func (in *ClusterRuleGroup) DeepCopyInto(out *ClusterRuleGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterRuleGroup) DeepCopyObject

func (in *ClusterRuleGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ClusterRuleGroup) Default

func (r *ClusterRuleGroup) Default()

func (*ClusterRuleGroup) SetupWebhookWithManager

func (r *ClusterRuleGroup) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterRuleGroup) Validate

func (r *ClusterRuleGroup) Validate() error

func (*ClusterRuleGroup) ValidateCreate

func (r *ClusterRuleGroup) ValidateCreate() error

func (*ClusterRuleGroup) ValidateDelete

func (r *ClusterRuleGroup) ValidateDelete() error

func (*ClusterRuleGroup) ValidateUpdate

func (r *ClusterRuleGroup) ValidateUpdate(old runtime.Object) error

type ClusterRuleGroupList

type ClusterRuleGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterRuleGroup `json:"items"`
}

ClusterRuleGroupList contains a list of ClusterRuleGroup

func (*ClusterRuleGroupList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRuleGroupList.

func (*ClusterRuleGroupList) DeepCopyInto

func (in *ClusterRuleGroupList) DeepCopyInto(out *ClusterRuleGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterRuleGroupList) DeepCopyObject

func (in *ClusterRuleGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterRuleGroupSpec

type ClusterRuleGroupSpec struct {
	Interval                string `json:"interval,omitempty"`
	PartialResponseStrategy string `json:"partial_response_strategy,omitempty"`

	Rules []ClusterRule `json:"rules"`
}

ClusterRuleGroupSpec defines the desired state of ClusterRuleGroup

func (*ClusterRuleGroupSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRuleGroupSpec.

func (*ClusterRuleGroupSpec) DeepCopyInto

func (in *ClusterRuleGroupSpec) DeepCopyInto(out *ClusterRuleGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterRuleGroupStatus

type ClusterRuleGroupStatus struct {
}

ClusterRuleGroupStatus defines the observed state of ClusterRuleGroup

func (*ClusterRuleGroupStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRuleGroupStatus.

func (*ClusterRuleGroupStatus) DeepCopyInto

func (in *ClusterRuleGroupStatus) DeepCopyInto(out *ClusterRuleGroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Comparator

type Comparator string

type Duration

type Duration string

Duration is a valid time unit Supported units: y, w, d, h, m, s, ms Examples: `30s`, `1m`, `1h20m15s` +kubebuilder:validation:Pattern:="^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$"

type GlobalRule

type GlobalRule struct {
	ClusterSelector   *MetricLabelSelector `json:"clusterSelector,omitempty"`
	NamespaceSelector *MetricLabelSelector `json:"namespaceSelector,omitempty"`
	Rule              `json:",inline"`
	// If ExprBuilder is not nil, the configured Expr will be ignored
	ExprBuilder *GlobalRuleExprBuilder `json:"exprBuilder,omitempty"`
}

func (*GlobalRule) DeepCopy

func (in *GlobalRule) DeepCopy() *GlobalRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRule.

func (*GlobalRule) DeepCopyInto

func (in *GlobalRule) DeepCopyInto(out *GlobalRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalRuleExprBuilder

type GlobalRuleExprBuilder struct {
	Workload *ScopedWorkloadExprBuilder `json:"workload,omitempty"`
	Node     *ScopedNodeExprBuilder     `json:"node,omitempty"`
}

Only one of its members may be specified.

func (*GlobalRuleExprBuilder) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRuleExprBuilder.

func (*GlobalRuleExprBuilder) DeepCopyInto

func (in *GlobalRuleExprBuilder) DeepCopyInto(out *GlobalRuleExprBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalRuleGroup

type GlobalRuleGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GlobalRuleGroupSpec   `json:"spec,omitempty"`
	Status GlobalRuleGroupStatus `json:"status,omitempty"`
}

GlobalRuleGroup is the Schema for the GlobalRuleGroup API

func (*GlobalRuleGroup) DeepCopy

func (in *GlobalRuleGroup) DeepCopy() *GlobalRuleGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRuleGroup.

func (*GlobalRuleGroup) DeepCopyInto

func (in *GlobalRuleGroup) DeepCopyInto(out *GlobalRuleGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalRuleGroup) DeepCopyObject

func (in *GlobalRuleGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GlobalRuleGroup) Default

func (r *GlobalRuleGroup) Default()

func (*GlobalRuleGroup) SetupWebhookWithManager

func (r *GlobalRuleGroup) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*GlobalRuleGroup) Validate

func (r *GlobalRuleGroup) Validate() error

func (*GlobalRuleGroup) ValidateCreate

func (r *GlobalRuleGroup) ValidateCreate() error

func (*GlobalRuleGroup) ValidateDelete

func (r *GlobalRuleGroup) ValidateDelete() error

func (*GlobalRuleGroup) ValidateUpdate

func (r *GlobalRuleGroup) ValidateUpdate(old runtime.Object) error

type GlobalRuleGroupList

type GlobalRuleGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GlobalRuleGroup `json:"items"`
}

GlobalRuleGroupList contains a list of GlobalRuleGroup

func (*GlobalRuleGroupList) DeepCopy

func (in *GlobalRuleGroupList) DeepCopy() *GlobalRuleGroupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRuleGroupList.

func (*GlobalRuleGroupList) DeepCopyInto

func (in *GlobalRuleGroupList) DeepCopyInto(out *GlobalRuleGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalRuleGroupList) DeepCopyObject

func (in *GlobalRuleGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GlobalRuleGroupSpec

type GlobalRuleGroupSpec struct {
	Interval                string `json:"interval,omitempty"`
	PartialResponseStrategy string `json:"partial_response_strategy,omitempty"`

	Rules []GlobalRule `json:"rules"`
}

GlobalRuleGroupSpec defines the desired state of GlobalRuleGroup

func (*GlobalRuleGroupSpec) DeepCopy

func (in *GlobalRuleGroupSpec) DeepCopy() *GlobalRuleGroupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRuleGroupSpec.

func (*GlobalRuleGroupSpec) DeepCopyInto

func (in *GlobalRuleGroupSpec) DeepCopyInto(out *GlobalRuleGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalRuleGroupStatus

type GlobalRuleGroupStatus struct {
}

GlobalRuleGroupStatus defines the observed state of GlobalRuleGroup

func (*GlobalRuleGroupStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRuleGroupStatus.

func (*GlobalRuleGroupStatus) DeepCopyInto

func (in *GlobalRuleGroupStatus) DeepCopyInto(out *GlobalRuleGroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MatchType

type MatchType string

type Matcher

type Matcher struct {
	Type  MatchType `json:"type"`
	Value string    `json:"value,omitempty"`
}

func (*Matcher) DeepCopy

func (in *Matcher) DeepCopy() *Matcher

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matcher.

func (*Matcher) DeepCopyInto

func (in *Matcher) DeepCopyInto(out *Matcher)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Matcher) Validate

func (m *Matcher) Validate() error

type MetricLabelSelector

type MetricLabelSelector struct {
	InValues []string `json:"inValues,omitempty"`
	Matcher  *Matcher `json:"matcher,omitempty"`
}

Only one of its members may be specified.

func (*MetricLabelSelector) DeepCopy

func (in *MetricLabelSelector) DeepCopy() *MetricLabelSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricLabelSelector.

func (*MetricLabelSelector) DeepCopyInto

func (in *MetricLabelSelector) DeepCopyInto(out *MetricLabelSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MetricLabelSelector) ParseToMatcher

func (s *MetricLabelSelector) ParseToMatcher(labelName string) *labels.Matcher

func (*MetricLabelSelector) Validate

func (s *MetricLabelSelector) Validate() error

type NamespaceRule

type NamespaceRule struct {
	Rule `json:",inline"`
	// If ExprBuilder is not nil, the configured Expr will be ignored
	ExprBuilder *NamespaceRuleExprBuilder `json:"exprBuilder,omitempty"`
}

func (*NamespaceRule) DeepCopy

func (in *NamespaceRule) DeepCopy() *NamespaceRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceRule.

func (*NamespaceRule) DeepCopyInto

func (in *NamespaceRule) DeepCopyInto(out *NamespaceRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamespaceRuleExprBuilder

type NamespaceRuleExprBuilder struct {
	Workload *WorkloadExprBuilder `json:"workload,omitempty"`
}

func (*NamespaceRuleExprBuilder) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceRuleExprBuilder.

func (*NamespaceRuleExprBuilder) DeepCopyInto

func (in *NamespaceRuleExprBuilder) DeepCopyInto(out *NamespaceRuleExprBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeCpuThreshold

type NodeCpuThreshold struct {
	Utilization *float64 `json:"utilization,omitempty"`
	Load1m      *float64 `json:"load1m,omitempty"`
	Load5m      *float64 `json:"load5m,omitempty"`
	Load15m     *float64 `json:"load15m,omitempty"`
}

Only one of its members may be specified.

func (*NodeCpuThreshold) DeepCopy

func (in *NodeCpuThreshold) DeepCopy() *NodeCpuThreshold

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCpuThreshold.

func (*NodeCpuThreshold) DeepCopyInto

func (in *NodeCpuThreshold) DeepCopyInto(out *NodeCpuThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeDiskThreshold

type NodeDiskThreshold struct {
	SpaceUtilization *float64 `json:"spaceUtilization,omitempty"`
	// The unit is bytes
	SpaceAvailable   *float64 `json:"spaceAvailable,omitempty"`
	InodeUtilization *float64 `json:"inodeUtilization,omitempty"`
	// The unit is io/s
	IopsRead *float64 `json:"iopsRead,omitempty"`
	// The unit is io/s
	IopsWrite *float64 `json:"iopsWrite,omitempty"`
	// The unit is bytes/s
	ThroughputRead *float64 `json:"throughputRead,omitempty"`
	// The unit is bytes/s
	ThroughputWrite *float64 `json:"throughputWrite,omitempty"`
}

Only one of its members may be specified.

func (*NodeDiskThreshold) DeepCopy

func (in *NodeDiskThreshold) DeepCopy() *NodeDiskThreshold

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDiskThreshold.

func (*NodeDiskThreshold) DeepCopyInto

func (in *NodeDiskThreshold) DeepCopyInto(out *NodeDiskThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeExprBuilder

type NodeExprBuilder struct {
	NodeNames  []string   `json:"names"`
	Comparator Comparator `json:"comparator"`

	MetricThreshold NodeMetricThreshold `json:"metricThreshold"`
}

func (*NodeExprBuilder) Build

func (b *NodeExprBuilder) Build() string

func (*NodeExprBuilder) DeepCopy

func (in *NodeExprBuilder) DeepCopy() *NodeExprBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExprBuilder.

func (*NodeExprBuilder) DeepCopyInto

func (in *NodeExprBuilder) DeepCopyInto(out *NodeExprBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMemoryThreshold

type NodeMemoryThreshold struct {
	Utilization *float64 `json:"utilization,omitempty"`
	// The unit is bytes
	Available *float64 `json:"available,omitempty"`
}

Only one of its members may be specified.

func (*NodeMemoryThreshold) DeepCopy

func (in *NodeMemoryThreshold) DeepCopy() *NodeMemoryThreshold

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMemoryThreshold.

func (*NodeMemoryThreshold) DeepCopyInto

func (in *NodeMemoryThreshold) DeepCopyInto(out *NodeMemoryThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMetricThreshold

type NodeMetricThreshold struct {
	Cpu     *NodeCpuThreshold     `json:"cpu,omitempty"`
	Memory  *NodeMemoryThreshold  `json:"memory,omitempty"`
	Network *NodeNetworkThreshold `json:"network,omitempty"`
	Disk    *NodeDiskThreshold    `json:"disk,omitempty"`
	Pod     *NodePodThreshold     `json:"pod,omitempty"`
}

Only one of its members may be specified.

func (*NodeMetricThreshold) DeepCopy

func (in *NodeMetricThreshold) DeepCopy() *NodeMetricThreshold

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetricThreshold.

func (*NodeMetricThreshold) DeepCopyInto

func (in *NodeMetricThreshold) DeepCopyInto(out *NodeMetricThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeNetworkThreshold

type NodeNetworkThreshold struct {
	// The unit is bit/s
	TransmittedRate *float64 `json:"transmittedRate,omitempty"`
	// The unit is bit/s
	ReceivedRate *float64 `json:"receivedRate,omitempty"`
}

Only one of its members may be specified.

func (*NodeNetworkThreshold) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeNetworkThreshold.

func (*NodeNetworkThreshold) DeepCopyInto

func (in *NodeNetworkThreshold) DeepCopyInto(out *NodeNetworkThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodePodThreshold

type NodePodThreshold struct {
	Utilization   *float64 `json:"utilization,omitempty"`
	AbnormalRatio *float64 `json:"abnormalRatio,omitempty"`
}

Only one of its members may be specified.

func (*NodePodThreshold) DeepCopy

func (in *NodePodThreshold) DeepCopy() *NodePodThreshold

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePodThreshold.

func (*NodePodThreshold) DeepCopyInto

func (in *NodePodThreshold) DeepCopyInto(out *NodePodThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Rule

type Rule struct {
	Alert string `json:"alert"`

	Expr intstr.IntOrString `json:"expr,omitempty"`

	For      Duration `json:"for,omitempty"`
	Severity Severity `json:"severity,omitempty"`

	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Disable bool `json:"disable,omitempty"`
}

func (*Rule) DeepCopy

func (in *Rule) DeepCopy() *Rule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.

func (*Rule) DeepCopyInto

func (in *Rule) DeepCopyInto(out *Rule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RuleGroup

type RuleGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RuleGroupSpec   `json:"spec,omitempty"`
	Status RuleGroupStatus `json:"status,omitempty"`
}

RuleGroup is the Schema for the RuleGroup API

func (*RuleGroup) DeepCopy

func (in *RuleGroup) DeepCopy() *RuleGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroup.

func (*RuleGroup) DeepCopyInto

func (in *RuleGroup) DeepCopyInto(out *RuleGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RuleGroup) DeepCopyObject

func (in *RuleGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RuleGroup) Default

func (r *RuleGroup) Default()

func (*RuleGroup) SetupWebhookWithManager

func (r *RuleGroup) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*RuleGroup) Validate

func (r *RuleGroup) Validate() error

func (*RuleGroup) ValidateCreate

func (r *RuleGroup) ValidateCreate() error

func (*RuleGroup) ValidateDelete

func (r *RuleGroup) ValidateDelete() error

func (*RuleGroup) ValidateUpdate

func (r *RuleGroup) ValidateUpdate(old runtime.Object) error

type RuleGroupList

type RuleGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RuleGroup `json:"items"`
}

RuleGroupList contains a list of RuleGroup

func (*RuleGroupList) DeepCopy

func (in *RuleGroupList) DeepCopy() *RuleGroupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroupList.

func (*RuleGroupList) DeepCopyInto

func (in *RuleGroupList) DeepCopyInto(out *RuleGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RuleGroupList) DeepCopyObject

func (in *RuleGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RuleGroupSpec

type RuleGroupSpec struct {
	Interval                string          `json:"interval,omitempty"`
	PartialResponseStrategy string          `json:"partial_response_strategy,omitempty"`
	Rules                   []NamespaceRule `json:"rules"`
}

RuleGroupSpec defines the desired state of RuleGroup

func (*RuleGroupSpec) DeepCopy

func (in *RuleGroupSpec) DeepCopy() *RuleGroupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroupSpec.

func (*RuleGroupSpec) DeepCopyInto

func (in *RuleGroupSpec) DeepCopyInto(out *RuleGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RuleGroupStatus

type RuleGroupStatus struct {
}

RuleGroupStatus defines the observed state of RuleGroup

func (*RuleGroupStatus) DeepCopy

func (in *RuleGroupStatus) DeepCopy() *RuleGroupStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroupStatus.

func (*RuleGroupStatus) DeepCopyInto

func (in *RuleGroupStatus) DeepCopyInto(out *RuleGroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScopedNodeExprBuilder

type ScopedNodeExprBuilder struct {
	NodeNames  []ScopedNodeNames `json:"names"`
	Comparator Comparator        `json:"comparator"`

	MetricThreshold NodeMetricThreshold `json:"metricThreshold,omitempty"`
}

func (*ScopedNodeExprBuilder) Build

func (b *ScopedNodeExprBuilder) Build() string

func (*ScopedNodeExprBuilder) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedNodeExprBuilder.

func (*ScopedNodeExprBuilder) DeepCopyInto

func (in *ScopedNodeExprBuilder) DeepCopyInto(out *ScopedNodeExprBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScopedNodeNames

type ScopedNodeNames struct {
	Cluster string   `json:"cluster"`
	Names   []string `json:"names"`
}

The cluster to which the node belongs must be specified.

func (*ScopedNodeNames) DeepCopy

func (in *ScopedNodeNames) DeepCopy() *ScopedNodeNames

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedNodeNames.

func (*ScopedNodeNames) DeepCopyInto

func (in *ScopedNodeNames) DeepCopyInto(out *ScopedNodeNames)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScopedWorkloadExprBuilder

type ScopedWorkloadExprBuilder struct {
	WorkloadKind  WorkloadKind          `json:"kind"`
	WorkloadNames []ScopedWorkloadNames `json:"names"`
	Comparator    Comparator            `json:"comparator"`

	MetricThreshold WorkloadMetricThreshold `json:"metricThreshold,omitempty"`
}

func (*ScopedWorkloadExprBuilder) Build

func (b *ScopedWorkloadExprBuilder) Build() string

func (*ScopedWorkloadExprBuilder) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedWorkloadExprBuilder.

func (*ScopedWorkloadExprBuilder) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScopedWorkloadNames

type ScopedWorkloadNames struct {
	Cluster   string   `json:"cluster"`
	Namespace string   `json:"namespace"`
	Names     []string `json:"names"`
}

The cluster and namespace to which the workloads belongs must be specified.

func (*ScopedWorkloadNames) DeepCopy

func (in *ScopedWorkloadNames) DeepCopy() *ScopedWorkloadNames

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedWorkloadNames.

func (*ScopedWorkloadNames) DeepCopyInto

func (in *ScopedWorkloadNames) DeepCopyInto(out *ScopedWorkloadNames)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Severity

type Severity string

type WorkloadCpuThreshold

type WorkloadCpuThreshold struct {
	// The unit is core
	Usage *float64 `json:"usage,omitempty"`
}

Only one of its members may be specified.

func (*WorkloadCpuThreshold) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCpuThreshold.

func (*WorkloadCpuThreshold) DeepCopyInto

func (in *WorkloadCpuThreshold) DeepCopyInto(out *WorkloadCpuThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadExprBuilder

type WorkloadExprBuilder struct {
	WorkloadKind  WorkloadKind `json:"kind"`
	WorkloadNames []string     `json:"names"`
	Comparator    Comparator   `json:"comparator"`

	MetricThreshold WorkloadMetricThreshold `json:"metricThreshold,omitempty"`
}

func (*WorkloadExprBuilder) Build

func (b *WorkloadExprBuilder) Build() string

func (*WorkloadExprBuilder) DeepCopy

func (in *WorkloadExprBuilder) DeepCopy() *WorkloadExprBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadExprBuilder.

func (*WorkloadExprBuilder) DeepCopyInto

func (in *WorkloadExprBuilder) DeepCopyInto(out *WorkloadExprBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadKind

type WorkloadKind string
const (
	WorkloadDeployment  WorkloadKind = "deployment"
	WorkloadStatefulSet WorkloadKind = "statefulset"
	WorkloadDaemonSet   WorkloadKind = "daemonset"
)

type WorkloadMemoryThreshold

type WorkloadMemoryThreshold struct {
	// The memory usage contains cache
	// The unit is bytes
	Usage *float64 `json:"usage,omitempty"`
	// The memory usage contains no cache
	// The unit is bytes
	UsageWoCache *float64 `json:"usageWoCache,omitempty"`
}

Only one of its members may be specified.

func (*WorkloadMemoryThreshold) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMemoryThreshold.

func (*WorkloadMemoryThreshold) DeepCopyInto

func (in *WorkloadMemoryThreshold) DeepCopyInto(out *WorkloadMemoryThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadMetricThreshold

type WorkloadMetricThreshold struct {
	Cpu     *WorkloadCpuThreshold     `json:"cpu,omitempty"`
	Memory  *WorkloadMemoryThreshold  `json:"memory,omitempty"`
	Network *WorkloadNetworkThreshold `json:"network,omitempty"`
	Replica *WorkloadReplicaThreshold `json:"replica,omitempty"`
}

Only one of its members may be specified.

func (*WorkloadMetricThreshold) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMetricThreshold.

func (*WorkloadMetricThreshold) DeepCopyInto

func (in *WorkloadMetricThreshold) DeepCopyInto(out *WorkloadMetricThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadNetworkThreshold

type WorkloadNetworkThreshold struct {
	// The unit is bit/s
	TransmittedRate *float64 `json:"transmittedRate,omitempty"`
	// The unit is bit/s
	ReceivedRate *float64 `json:"receivedRate,omitempty"`
}

Only one of its members may be specified.

func (*WorkloadNetworkThreshold) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadNetworkThreshold.

func (*WorkloadNetworkThreshold) DeepCopyInto

func (in *WorkloadNetworkThreshold) DeepCopyInto(out *WorkloadNetworkThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadReplicaThreshold

type WorkloadReplicaThreshold struct {
	UnavailableRatio *float64 `json:"unavailableRatio,omitempty"`
}

Only one of its members may be specified.

func (*WorkloadReplicaThreshold) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadReplicaThreshold.

func (*WorkloadReplicaThreshold) DeepCopyInto

func (in *WorkloadReplicaThreshold) DeepCopyInto(out *WorkloadReplicaThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL