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
- Variables
- func Resource(resource string) schema.GroupResource
- type ClusterRule
- type ClusterRuleExprBuilder
- type ClusterRuleGroup
- func (in *ClusterRuleGroup) DeepCopy() *ClusterRuleGroup
- func (in *ClusterRuleGroup) DeepCopyInto(out *ClusterRuleGroup)
- func (in *ClusterRuleGroup) DeepCopyObject() runtime.Object
- func (r *ClusterRuleGroup) Default()
- func (r *ClusterRuleGroup) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *ClusterRuleGroup) Validate() error
- func (r *ClusterRuleGroup) ValidateCreate() error
- func (r *ClusterRuleGroup) ValidateDelete() error
- func (r *ClusterRuleGroup) ValidateUpdate(old runtime.Object) error
- type ClusterRuleGroupList
- type ClusterRuleGroupSpec
- type ClusterRuleGroupStatus
- type Comparator
- type Duration
- type GlobalRule
- type GlobalRuleExprBuilder
- type GlobalRuleGroup
- func (in *GlobalRuleGroup) DeepCopy() *GlobalRuleGroup
- func (in *GlobalRuleGroup) DeepCopyInto(out *GlobalRuleGroup)
- func (in *GlobalRuleGroup) DeepCopyObject() runtime.Object
- func (r *GlobalRuleGroup) Default()
- func (r *GlobalRuleGroup) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *GlobalRuleGroup) Validate() error
- func (r *GlobalRuleGroup) ValidateCreate() error
- func (r *GlobalRuleGroup) ValidateDelete() error
- func (r *GlobalRuleGroup) ValidateUpdate(old runtime.Object) error
- type GlobalRuleGroupList
- type GlobalRuleGroupSpec
- type GlobalRuleGroupStatus
- type MatchType
- type Matcher
- type MetricLabelSelector
- type NamespaceRule
- type NamespaceRuleExprBuilder
- type NodeCpuThreshold
- type NodeDiskThreshold
- type NodeExprBuilder
- type NodeMemoryThreshold
- type NodeMetricThreshold
- type NodeNetworkThreshold
- type NodePodThreshold
- type Rule
- type RuleGroup
- func (in *RuleGroup) DeepCopy() *RuleGroup
- func (in *RuleGroup) DeepCopyInto(out *RuleGroup)
- func (in *RuleGroup) DeepCopyObject() runtime.Object
- func (r *RuleGroup) Default()
- func (r *RuleGroup) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *RuleGroup) Validate() error
- func (r *RuleGroup) ValidateCreate() error
- func (r *RuleGroup) ValidateDelete() error
- func (r *RuleGroup) ValidateUpdate(old runtime.Object) error
- type RuleGroupList
- type RuleGroupSpec
- type RuleGroupStatus
- type ScopedNodeExprBuilder
- type ScopedNodeNames
- type ScopedWorkloadExprBuilder
- type ScopedWorkloadNames
- type Severity
- type WorkloadCpuThreshold
- type WorkloadExprBuilder
- type WorkloadKind
- type WorkloadMemoryThreshold
- type WorkloadMetricThreshold
- type WorkloadNetworkThreshold
- type WorkloadReplicaThreshold
Constants ¶
const ( ResourceKindRuleGroup = "RuleGroup" ResourceKindClusterRuleGroup = "ClusterRuleGroup" ResourceKindGlobalRuleGroup = "GlobalRuleGroup" )
const ( ComparatorLT Comparator = "<" ComparatorLE Comparator = "<=" ComparatorGT Comparator = ">" ComparatorGE Comparator = ">=" SeverityWarning Severity = "warning" SeverityError Severity = "error" SeverityCritical Severity = "critical" MatchEqual = "=" MatchNotEqual = "!=" MatchRegexp = "=~" MatchNotRegexp = "!~" )
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" )
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" )
const ( RuleLabelKeyRuleId = "rule_id" MaxRuleCountPerGroup = 40 )
Variables ¶
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 ¶
func (in *ClusterRuleExprBuilder) DeepCopy() *ClusterRuleExprBuilder
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 ¶
func (in *ClusterRuleGroupList) DeepCopy() *ClusterRuleGroupList
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 ¶
func (in *ClusterRuleGroupSpec) DeepCopy() *ClusterRuleGroupSpec
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 ¶
func (in *ClusterRuleGroupStatus) DeepCopy() *ClusterRuleGroupStatus
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 ¶
func (in *GlobalRuleExprBuilder) DeepCopy() *GlobalRuleExprBuilder
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 ¶
func (in *GlobalRuleGroupStatus) DeepCopy() *GlobalRuleGroupStatus
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 Matcher ¶
func (*Matcher) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matcher.
func (*Matcher) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
func (in *NamespaceRuleExprBuilder) DeepCopy() *NamespaceRuleExprBuilder
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 ¶
func (in *NodeNetworkThreshold) DeepCopy() *NodeNetworkThreshold
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroup.
func (*RuleGroup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RuleGroup) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RuleGroup) SetupWebhookWithManager ¶
func (*RuleGroup) ValidateCreate ¶
func (*RuleGroup) ValidateDelete ¶
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 ¶
func (in *ScopedNodeExprBuilder) DeepCopy() *ScopedNodeExprBuilder
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 ¶
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 ¶
func (in *ScopedWorkloadExprBuilder) DeepCopy() *ScopedWorkloadExprBuilder
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedWorkloadExprBuilder.
func (*ScopedWorkloadExprBuilder) DeepCopyInto ¶
func (in *ScopedWorkloadExprBuilder) DeepCopyInto(out *ScopedWorkloadExprBuilder)
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 WorkloadCpuThreshold ¶
type WorkloadCpuThreshold struct { // The unit is core Usage *float64 `json:"usage,omitempty"` }
Only one of its members may be specified.
func (*WorkloadCpuThreshold) DeepCopy ¶
func (in *WorkloadCpuThreshold) DeepCopy() *WorkloadCpuThreshold
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 ¶
func (in *WorkloadMemoryThreshold) DeepCopy() *WorkloadMemoryThreshold
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 ¶
func (in *WorkloadMetricThreshold) DeepCopy() *WorkloadMetricThreshold
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 ¶
func (in *WorkloadNetworkThreshold) DeepCopy() *WorkloadNetworkThreshold
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 {
}Only one of its members may be specified.
func (*WorkloadReplicaThreshold) DeepCopy ¶
func (in *WorkloadReplicaThreshold) DeepCopy() *WorkloadReplicaThreshold
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.