v1alpha1

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=monitoring.spotahome.com

Index

Constants

View Source
const (
	ServiceLevelKind       = "ServiceLevel"
	ServiceLevelName       = "servicelevel"
	ServiceLevelNamePlural = "servicelevels"
	ServiceLevelScope      = apiextensionsv1beta1.NamespaceScoped
)

ServiceLevel constants

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: monitoring.GroupName, Version: version}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func VersionKind

func VersionKind(kind string) schema.GroupVersionKind

VersionKind takes an unqualified kind and returns back a Group qualified GroupVersionKind

Types

type Output

type Output struct {
	//Prometheus is the prometheus format for the SLO output.
	// +optional
	Prometheus *PrometheusOutputSource `json:"prometheus,omitempty"`
}

Output is how the SLO will expose the generated SLO.

func (*Output) DeepCopy

func (in *Output) DeepCopy() *Output

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

func (*Output) DeepCopyInto

func (in *Output) DeepCopyInto(out *Output)

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

type PrometheusOutputSource

type PrometheusOutputSource struct {
	// Labels are the labels that will be set to the output metrics of this SLO.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

PrometheusOutputSource is the source of the output in prometheus format.

func (*PrometheusOutputSource) DeepCopy

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

func (*PrometheusOutputSource) DeepCopyInto

func (in *PrometheusOutputSource) DeepCopyInto(out *PrometheusOutputSource)

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

type PrometheusSLISource

type PrometheusSLISource struct {
	// Address is the address of the Prometheus.
	Address string `json:"address"`
	// TotalQuery is the query that gets the total that will be the base to get the unavailability
	// of the SLO based on the errorQuery (errorQuery / totalQuery).
	TotalQuery string `json:"totalQuery"`
	// ErrorQuery is the query that gets the total errors that then will be divided against the total.
	ErrorQuery string `json:"errorQuery"`
}

PrometheusSLISource is the source to get SLIs from a Prometheus backend.

func (*PrometheusSLISource) DeepCopy

func (in *PrometheusSLISource) DeepCopy() *PrometheusSLISource

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

func (*PrometheusSLISource) DeepCopyInto

func (in *PrometheusSLISource) DeepCopyInto(out *PrometheusSLISource)

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

type SLI

type SLI struct {
	SLISource `json:",inline"`
}

SLI is the SLI to get for the SLO.

func (*SLI) DeepCopy

func (in *SLI) DeepCopy() *SLI

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

func (*SLI) DeepCopyInto

func (in *SLI) DeepCopyInto(out *SLI)

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

type SLISource

type SLISource struct {
	// Prometheus is the prometheus SLI source.
	// +optional
	Prometheus *PrometheusSLISource `json:"prometheus,omitempty"`
}

SLISource is where the SLI will get from.

func (*SLISource) DeepCopy

func (in *SLISource) DeepCopy() *SLISource

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

func (*SLISource) DeepCopyInto

func (in *SLISource) DeepCopyInto(out *SLISource)

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

type SLO

type SLO struct {
	// Name of the SLO, must be made of [a-zA-z0-9] and '_'(underscore) characters.
	Name string `json:"name"`
	// Description is a description of the SLO.
	// +optional
	Description string `json:"description,omitempty"`
	// Disable will disable the SLO.
	Disable bool `json:"disable,omitempty"`
	// AvailabilityObjectivePercent is the percentage of availability target for the SLO.
	AvailabilityObjectivePercent float64 `json:"availabilityObjectivePercent"`
	// ServiceLevelIndicator is the SLI associated with the SLO.
	ServiceLevelIndicator SLI `json:"serviceLevelIndicator"`
	// Output is the output backedn of the SLO.
	Output Output `json:"output"`
}

SLO represents a SLO.

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.

type ServiceLevel

type ServiceLevel struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the ddesired behaviour of the pod terminator.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
	// +optional
	Spec ServiceLevelSpec `json:"spec,omitempty"`
}

ServiceLevel represents a service level policy to measure the service level of an application.

func (*ServiceLevel) DeepCopy

func (in *ServiceLevel) DeepCopy() *ServiceLevel

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

func (*ServiceLevel) DeepCopyInto

func (in *ServiceLevel) DeepCopyInto(out *ServiceLevel)

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

func (*ServiceLevel) DeepCopyObject

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

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

func (*ServiceLevel) Validate

func (s *ServiceLevel) Validate() error

Validate validates and sets defaults on the ServiceLevel Kubernetes resource object.

type ServiceLevelList

type ServiceLevelList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ServiceLevel `json:"items"`
}

ServiceLevelList is a list of ServiceLevel resources

func (*ServiceLevelList) DeepCopy

func (in *ServiceLevelList) DeepCopy() *ServiceLevelList

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

func (*ServiceLevelList) DeepCopyInto

func (in *ServiceLevelList) DeepCopyInto(out *ServiceLevelList)

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

func (*ServiceLevelList) DeepCopyObject

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

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

type ServiceLevelSpec

type ServiceLevelSpec struct {
	// ServiceLevelName is override for setting service_level to a value other than the ObjectMeta.Name.
	// +optional
	ServiceLevelName string `json:"serviceLevelName,omitempty"`

	// ServiceLevelObjectives is the list of SLOs of a service/app.
	// +optional
	ServiceLevelObjectives []SLO `json:"serviceLevelObjectives,omitempty"`
}

ServiceLevelSpec is the spec for a ServiceLevel resource.

func (*ServiceLevelSpec) DeepCopy

func (in *ServiceLevelSpec) DeepCopy() *ServiceLevelSpec

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

func (*ServiceLevelSpec) DeepCopyInto

func (in *ServiceLevelSpec) DeepCopyInto(out *ServiceLevelSpec)

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