v1alpha1

package
v0.0.0-...-e7cf197 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the monitoring v1alpha1 API group +kubebuilder:object:generate=true +groupName=monitoring.kanzifucius.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "monitoring.kanzifucius.com", 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
)
View Source
var (
	DefaultSamples = []sample{
		{
			Name:     "short",
			Interval: "30s",
			Buckets:  []string{"5m", "30m", "1h"},
		},
		{
			Name:     "medium",
			Interval: "2m",
			Buckets:  []string{"2h", "6h"},
		},
		{
			Name:     "daily",
			Interval: "5m",
			Buckets:  []string{"1d", "3d"},
		},
	}
)

Functions

This section is empty.

Types

type ExprBlock

type ExprBlock struct {
	// +kubebuilder:validation:Optional
	AlertMethod string `json:"alertMethod"`
	// +kubebuilder:validation:Optional
	BurnRate string `json:"burnRate"`
	// +kubebuilder:validation:Optional
	Windows []Window `json:"windows"`
	// +kubebuilder:validation:Optional
	ShortWindow *bool `json:"shortWindow"`
	// +kubebuilder:validation:Optional
	Buckets []string `json:"buckets"` // used to define buckets of histogram when using latency expression
	// +kubebuilder:validation:Optional
	Expr string `json:"expr"`
}

func (*ExprBlock) ComputeExpr

func (block *ExprBlock) ComputeExpr(window, le string) string

func (*ExprBlock) ComputeQuantile

func (block *ExprBlock) ComputeQuantile(window string, quantile float64) string

func (*ExprBlock) DeepCopy

func (in *ExprBlock) DeepCopy() *ExprBlock

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

func (*ExprBlock) DeepCopyInto

func (in *ExprBlock) DeepCopyInto(out *ExprBlock)

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

func (*ExprBlock) GetShortWindow

func (block *ExprBlock) GetShortWindow() bool

type LatencyTarget

type LatencyTarget struct {
	LE     string `json:"le"`
	Target string `json:"target"`
}

func (*LatencyTarget) DeepCopy

func (in *LatencyTarget) DeepCopy() *LatencyTarget

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

func (*LatencyTarget) DeepCopyInto

func (in *LatencyTarget) DeepCopyInto(out *LatencyTarget)

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

type Objectives

type Objectives struct {
	Availability string          `json:"availability"`
	Latency      []LatencyTarget `json:"latency"`
	Window       string          `json:"window"`
}

func (*Objectives) DeepCopy

func (in *Objectives) DeepCopy() *Objectives

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

func (*Objectives) DeepCopyInto

func (in *Objectives) DeepCopyInto(out *Objectives)

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

type Slo

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

	Spec   SloSpec   `json:"spec,omitempty"`
	Status SloStatus `json:"status,omitempty"`
}

Slo is the Schema for the sloes API

func (*Slo) DeepCopy

func (in *Slo) DeepCopy() *Slo

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

func (*Slo) DeepCopyInto

func (in *Slo) DeepCopyInto(out *Slo)

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

func (*Slo) DeepCopyObject

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

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

type SloList

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

SloList contains a list of Slo

func (*SloList) DeepCopy

func (in *SloList) DeepCopy() *SloList

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

func (*SloList) DeepCopyInto

func (in *SloList) DeepCopyInto(out *SloList)

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

func (*SloList) DeepCopyObject

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

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

type SloSpec

type SloSpec struct {
	Objectives Objectives `json:"objectives"`

	// +kubebuilder:validation:Optional
	TrafficRateRecord ExprBlock `json:"trafficRateRecord"`
	// +kubebuilder:validation:Optional
	ErrorRateRecord ExprBlock `json:"errorRateRecord"`
	// +kubebuilder:validation:Optional
	LatencyRecord ExprBlock `json:"latencyRecord"`
	// +kubebuilder:validation:Optional
	LatencyQuantileRecord ExprBlock `json:"latencyQuantileRecord"`
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels"`
	// +kubebuilder:validation:Optional
	Annotations map[string]string `json:"annotations"`
}

SloSpec defines the desired state of Slo

func (*SloSpec) DeepCopy

func (in *SloSpec) DeepCopy() *SloSpec

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

func (*SloSpec) DeepCopyInto

func (in *SloSpec) DeepCopyInto(out *SloSpec)

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

type SloStatus

type SloStatus struct {
}

SloStatus defines the observed state of Slo

func (*SloStatus) DeepCopy

func (in *SloStatus) DeepCopy() *SloStatus

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

func (*SloStatus) DeepCopyInto

func (in *SloStatus) DeepCopyInto(out *SloStatus)

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

type Window

type Window struct {
	Duration     string `json:"duration"`
	Consumption  string `json:"consumption"`
	Notification string `json:"notification"`
}

func (*Window) DeepCopy

func (in *Window) DeepCopy() *Window

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

func (*Window) DeepCopyInto

func (in *Window) DeepCopyInto(out *Window)

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