Documentation ¶
Index ¶
Constants ¶
const (
// RuleFinalizer is the name of the finalizer added to Rule objects
RuleFinalizer = "mimirrule.finalizers.k8s.healthjoy.com"
)
Variables ¶
var ( // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a common registration function for mapping go types to the GroupVersionKind scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: rulescontroller.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ConditionType ¶
type ConditionType string
ConditionType is a valid value for Condition.Type
const ( // ConditionTypeReady means the condition is in ready state ConditionTypeReady ConditionType = "Ready" // ConditionTypeFailed means the condition is in failed state ConditionTypeFailed ConditionType = "Failed" )
type Duration ¶
type Duration string
Duration is a wrapper around string that can hold a duration string.
type MimirRule ¶
type MimirRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RuleSpec `json:"spec"` Status RuleStatus `json:"status"` }
MimirRule is a specification for a MimirRule resource
func (*MimirRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MimirRule.
func (*MimirRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MimirRule) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MimirRuleList ¶
type MimirRuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []MimirRule `json:"items"` }
MimirRuleList is a list of MimirRule resources
func (*MimirRuleList) DeepCopy ¶
func (in *MimirRuleList) DeepCopy() *MimirRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MimirRuleList.
func (*MimirRuleList) DeepCopyInto ¶
func (in *MimirRuleList) DeepCopyInto(out *MimirRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MimirRuleList) DeepCopyObject ¶
func (in *MimirRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Rule ¶
type Rule struct { Record string `json:"record,omitempty"` Alert string `json:"alert,omitempty"` Expr intstr.IntOrString `json:"expr"` For Duration `json:"for,omitempty"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
Rule is a recording or alerting rule.
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 { Name string `json:"name"` Interval string `json:"interval,omitempty"` EvaluationDelay string `json:"evaluation_delay,omitempty"` Limit int `json:"limit,omitempty"` Rules []Rule `json:"rules"` SourceTenants []string `json:"source_tenants,omitempty"` }
RuleGroup is a list of sequentially evaluated recording and alerting rules.
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.
type RuleSpec ¶
type RuleSpec struct {
Groups []RuleGroup `json:"groups"`
}
RuleSpec is the spec for a MimirRule resource
func (*RuleSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSpec.
func (*RuleSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RuleSpec) GetMimirRuleNamespace ¶
func (mr *RuleSpec) GetMimirRuleNamespace(namespace string) (ruleNs *rules.RuleNamespace, err error)
GetMimirRuleNamespace converts a RuleSpec to a rwrulefmt.RuleGroup
type RuleStatus ¶
RuleStatus is the status for a MimirRule resource
func (*RuleStatus) DeepCopy ¶
func (in *RuleStatus) DeepCopy() *RuleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleStatus.
func (*RuleStatus) DeepCopyInto ¶
func (in *RuleStatus) DeepCopyInto(out *RuleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.