Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the pyrra v1alpha1 API group +kubebuilder:object:generate=true +groupName=pyrra.dev
Index ¶
- Variables
- type Alerting
- type BoolGaugeIndicator
- type LatencyIndicator
- type NativeLatencyIndicator
- type Query
- type RatioIndicator
- type ServiceLevelIndicator
- type ServiceLevelObjective
- func (in *ServiceLevelObjective) DeepCopy() *ServiceLevelObjective
- func (in *ServiceLevelObjective) DeepCopyInto(out *ServiceLevelObjective)
- func (in *ServiceLevelObjective) DeepCopyObject() runtime.Object
- func (in *ServiceLevelObjective) Internal() (slo.Objective, error)
- func (in *ServiceLevelObjective) ValidateCreate() (admission.Warnings, error)
- func (in *ServiceLevelObjective) ValidateDelete() (admission.Warnings, error)
- func (in *ServiceLevelObjective) ValidateUpdate(_ runtime.Object) (admission.Warnings, error)
- type ServiceLevelObjectiveList
- type ServiceLevelObjectiveSpec
- type ServiceLevelObjectiveStatus
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "pyrra.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Alerting ¶ added in v0.5.0
type Alerting struct { // +optional // +kubebuilder:deprecatedversion:warning="disabled is deprecated. Use burnrates instead." // Disabled is used to disable the generation of alerts. Recording rules are still generated. Disabled *bool `json:"disabled,omitempty"` // +optional // +kubebuilder:default:=true Burnrates *bool `json:"burnrates,omitempty"` // +optional // +kubebuilder:default:=true Absent *bool `json:"absent,omitempty"` // +optional // Name is used as the name of the alert generated by Pyrra. Defaults to "ErrorBudgetBurn". Name string `json:"name,omitempty"` }
func (*Alerting) DeepCopy ¶ added in v0.5.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alerting.
func (*Alerting) DeepCopyInto ¶ added in v0.5.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BoolGaugeIndicator ¶ added in v0.6.0
type BoolGaugeIndicator struct { Query `json:",inline"` // +optional // Total is the metric that returns how many requests there are in total. Grouping []string `json:"grouping"` }
func (*BoolGaugeIndicator) DeepCopy ¶ added in v0.6.0
func (in *BoolGaugeIndicator) DeepCopy() *BoolGaugeIndicator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoolGaugeIndicator.
func (*BoolGaugeIndicator) DeepCopyInto ¶ added in v0.6.0
func (in *BoolGaugeIndicator) DeepCopyInto(out *BoolGaugeIndicator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LatencyIndicator ¶
type LatencyIndicator struct { // Success is the metric that returns how many errors there are. Success Query `json:"success"` // Total is the metric that returns how many requests there are in total. Total Query `json:"total"` // +optional // Grouping allows an SLO to be defined for many SLI at once, like HTTP handlers for example. Grouping []string `json:"grouping"` }
func (*LatencyIndicator) DeepCopy ¶
func (in *LatencyIndicator) DeepCopy() *LatencyIndicator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LatencyIndicator.
func (*LatencyIndicator) DeepCopyInto ¶
func (in *LatencyIndicator) DeepCopyInto(out *LatencyIndicator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NativeLatencyIndicator ¶ added in v0.7.0
type NativeLatencyIndicator struct { // Total is the metric that returns how many requests there are in total. Total Query `json:"total"` // Latency the requests should be faster than. Latency string `json:"latency"` // +optional // Grouping allows an SLO to be defined for many SLI at once, like HTTP handlers for example. Grouping []string `json:"grouping"` }
func (*NativeLatencyIndicator) DeepCopy ¶ added in v0.7.0
func (in *NativeLatencyIndicator) DeepCopy() *NativeLatencyIndicator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NativeLatencyIndicator.
func (*NativeLatencyIndicator) DeepCopyInto ¶ added in v0.7.0
func (in *NativeLatencyIndicator) DeepCopyInto(out *NativeLatencyIndicator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Query ¶
type Query struct {
Metric string `json:"metric"`
}
Query contains a PromQL metric.
func (*Query) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Query.
func (*Query) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RatioIndicator ¶
type RatioIndicator struct { // Errors is the metric that returns how many errors there are. Errors Query `json:"errors"` // Total is the metric that returns how many requests there are in total. Total Query `json:"total"` // +optional // Grouping allows an SLO to be defined for many SLI at once, like HTTP handlers for example. Grouping []string `json:"grouping"` }
func (*RatioIndicator) DeepCopy ¶
func (in *RatioIndicator) DeepCopy() *RatioIndicator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RatioIndicator.
func (*RatioIndicator) DeepCopyInto ¶
func (in *RatioIndicator) DeepCopyInto(out *RatioIndicator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceLevelIndicator ¶
type ServiceLevelIndicator struct { // +optional // Ratio is the indicator that measures against errors / total events. Ratio *RatioIndicator `json:"ratio,omitempty"` // +optional // Latency is the indicator that measures a certain percentage to be faster than the expected latency. Latency *LatencyIndicator `json:"latency,omitempty"` // +optional // LatencyNative is the indicator that measures a certain percentage to be faster than the expected latency. // This uses the new native histograms in Prometheus. LatencyNative *NativeLatencyIndicator `json:"latencyNative,omitempty"` // +optional // BoolGauge is the indicator that measures whether a boolean gauge is // successful. BoolGauge *BoolGaugeIndicator `json:"bool_gauge,omitempty"` }
ServiceLevelIndicator defines the underlying indicator that is a Prometheus metric.
func (*ServiceLevelIndicator) DeepCopy ¶
func (in *ServiceLevelIndicator) DeepCopy() *ServiceLevelIndicator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLevelIndicator.
func (*ServiceLevelIndicator) DeepCopyInto ¶
func (in *ServiceLevelIndicator) DeepCopyInto(out *ServiceLevelIndicator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceLevelObjective ¶
type ServiceLevelObjective struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ServiceLevelObjectiveSpec `json:"spec,omitempty"` Status ServiceLevelObjectiveStatus `json:"status,omitempty"` }
ServiceLevelObjective is the Schema for the ServiceLevelObjectives API.
func (*ServiceLevelObjective) DeepCopy ¶
func (in *ServiceLevelObjective) DeepCopy() *ServiceLevelObjective
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLevelObjective.
func (*ServiceLevelObjective) DeepCopyInto ¶
func (in *ServiceLevelObjective) DeepCopyInto(out *ServiceLevelObjective)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceLevelObjective) DeepCopyObject ¶
func (in *ServiceLevelObjective) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServiceLevelObjective) Internal ¶
func (in *ServiceLevelObjective) Internal() (slo.Objective, error)
func (*ServiceLevelObjective) ValidateCreate ¶ added in v0.7.0
func (in *ServiceLevelObjective) ValidateCreate() (admission.Warnings, error)
func (*ServiceLevelObjective) ValidateDelete ¶ added in v0.7.0
func (in *ServiceLevelObjective) ValidateDelete() (admission.Warnings, error)
func (*ServiceLevelObjective) ValidateUpdate ¶ added in v0.7.0
type ServiceLevelObjectiveList ¶
type ServiceLevelObjectiveList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ServiceLevelObjective `json:"items"` }
ServiceLevelObjectiveList contains a list of ServiceLevelObjective.
func (*ServiceLevelObjectiveList) DeepCopy ¶
func (in *ServiceLevelObjectiveList) DeepCopy() *ServiceLevelObjectiveList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLevelObjectiveList.
func (*ServiceLevelObjectiveList) DeepCopyInto ¶
func (in *ServiceLevelObjectiveList) DeepCopyInto(out *ServiceLevelObjectiveList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceLevelObjectiveList) DeepCopyObject ¶
func (in *ServiceLevelObjectiveList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ServiceLevelObjectiveSpec ¶
type ServiceLevelObjectiveSpec struct { // +optional // Description describes the ServiceLevelObjective in more detail and // gives extra context for engineers that might not directly work on the service. Description string `json:"description"` // Target is a string that's casted to a float64 between 0 - 100. // It represents the desired availability of the service in the given window. // float64 are not supported: https://github.com/kubernetes-sigs/controller-tools/issues/245 Target string `json:"target"` // Window within which the Target is supposed to be kept. Usually something like 1d, 7d or 28d. Window string `json:"window"` // ServiceLevelIndicator is the underlying data source that indicates how the service is doing. // This will be a Prometheus metric with specific selectors for your service. ServiceLevelIndicator ServiceLevelIndicator `json:"indicator"` // +optional // Alerting customizes the alerting rules generated by Pyrra. Alerting Alerting `json:"alerting"` }
ServiceLevelObjectiveSpec defines the desired state of ServiceLevelObjective.
func (*ServiceLevelObjectiveSpec) DeepCopy ¶
func (in *ServiceLevelObjectiveSpec) DeepCopy() *ServiceLevelObjectiveSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLevelObjectiveSpec.
func (*ServiceLevelObjectiveSpec) DeepCopyInto ¶
func (in *ServiceLevelObjectiveSpec) DeepCopyInto(out *ServiceLevelObjectiveSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceLevelObjectiveStatus ¶
type ServiceLevelObjectiveStatus struct { // Type is the generated resource type, like PrometheusRule or ConfigMap Type string `json:"type,omitempty"` }
ServiceLevelObjectiveStatus defines the observed state of ServiceLevelObjective.
func (*ServiceLevelObjectiveStatus) DeepCopy ¶
func (in *ServiceLevelObjectiveStatus) DeepCopy() *ServiceLevelObjectiveStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLevelObjectiveStatus.
func (*ServiceLevelObjectiveStatus) DeepCopyInto ¶
func (in *ServiceLevelObjectiveStatus) DeepCopyInto(out *ServiceLevelObjectiveStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.