Documentation ¶
Index ¶
Constants ¶
View Source
const ( RuleLevelNamesapce RuleLevel = "namespace" RuleLevelCluster RuleLevel = "cluster" RuleLevelGlobal RuleLevel = "global" RuleTypeTemplate RuleType = "template" // for template rule configured by exprBuilder to build expression RuleTypeCustom RuleType = "custom" // for custom rule configured by direct expression // for rule.labels RuleLabelKeyRuleLevel = "rule_level" RuleLabelKeyRuleGroup = "rule_group" RuleLabelKeyRuleType = "rule_type" RuleLabelKeyCluster = "cluster" RuleLabelKeyNamespace = "namespace" RuleLabelKeySeverity = "severity" RuleLabelKeyAlertType = "alerttype" RuleLabelValueAlertTypeMetric = "metric" // label keys in RuleGroup/ClusterRuleGroup/GlobalRuleGroup.metadata.labels SourceGroupResourceLabelKeyEnable = "alerting.kubesphere.io/enable" SourceGroupResourceLabelValueEnableTrue = "true" SourceGroupResourceLabelValueEnableFalse = "false" // for PrometheusRule.metadata.labels PrometheusRuleResourceLabelKeyOwnerNamespace = "alerting.kubesphere.io/owner_namespace" PrometheusRuleResourceLabelKeyOwnerCluster = "alerting.kubesphere.io/owner_cluster" PrometheusRuleResourceLabelKeyRuleLevel = "alerting.kubesphere.io/rule_level" PrometheusRuleResourceLabelKeyBuiltin = "alerting.kubesphere.io/builtin" PrometheusRuleResourceLabelValueBuiltinTrue = "true" PrometheusRuleResourceLabelValueBuiltinFalse = "false" // name prefix for PrometheusRule PrometheusRulePrefix = "alertrules-" PrometheusRulePrefixNamespaceLevel = PrometheusRulePrefix + "ns-" PrometheusRulePrefixClusterLevel = PrometheusRulePrefix + "cl-" PrometheusRulePrefixGlobalLevel = PrometheusRulePrefix + "gl-" PrometheusRuleNamespace = constants.KubeSphereMonitoringNamespace )
Variables ¶
This section is empty.
Functions ¶
func ParseGlobalRuleEnforceMatchers ¶
func ParseGlobalRuleEnforceMatchers(rule *alertingv2beta1.GlobalRule) []*promlabels.Matcher
Types ¶
type ClusterRuleGroupReconciler ¶
func (*ClusterRuleGroupReconciler) SetupWithManager ¶
func (r *ClusterRuleGroupReconciler) SetupWithManager(mgr ctrl.Manager) error
type EnforceExprFunc ¶
func CreateEnforceExprFunc ¶
func CreateEnforceExprFunc(enforceRuleMatchers []*promlabels.Matcher) EnforceExprFunc
type GlobalRuleGroupReconciler ¶
func (*GlobalRuleGroupReconciler) SetupWithManager ¶
func (r *GlobalRuleGroupReconciler) SetupWithManager(mgr ctrl.Manager) error
type RuleGroupReconciler ¶
func (*RuleGroupReconciler) SetupWithManager ¶
func (r *RuleGroupReconciler) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.