v1beta1

package
v0.0.0-...-3acc49a Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1beta1 is the v1beta1 version of the API SystemAutoscaler.

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: systemautoscaler.GroupName, Version: "v1beta1"}

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

Types

type MetricRequirement

type MetricRequirement struct {
	// +kubebuilder:validation:Required
	ResponseTime resource.Quantity `json:"responseTime,omitempty"`
}

MetricRequirement specifies a requirement for a metric. This means that System Autoscaler will try to honor the agreement, making the service metric coherent with it. Only one MetricRequirement per ServiceLevelAgreement resource must be set to avoid ambiguity. Currently supports only ResponseTime.

i.e.: the metric type is the Response Time and the value is 4 units of time. This means that the system will try to keep the service response time below 4 on average.

func (*MetricRequirement) DeepCopy

func (in *MetricRequirement) DeepCopy() *MetricRequirement

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

func (*MetricRequirement) DeepCopyInto

func (in *MetricRequirement) DeepCopyInto(out *MetricRequirement)

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

type PodScale

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

	Spec   PodScaleSpec   `json:"spec"`
	Status PodScaleStatus `json:"status"`
}

PodScale defines the mapping between a `ServiceLevelAgreement` and a `Pod` matching the selector. It also keeps track of the resource values computed by `Recommender` and adjusted by `Contention Manager`.

func (*PodScale) DeepCopy

func (in *PodScale) DeepCopy() *PodScale

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

func (*PodScale) DeepCopyInto

func (in *PodScale) DeepCopyInto(out *PodScale)

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

func (*PodScale) DeepCopyObject

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

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

type PodScaleList

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

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

PodScaleList is a list of PodScale resources

func (*PodScaleList) DeepCopy

func (in *PodScaleList) DeepCopy() *PodScaleList

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

func (*PodScaleList) DeepCopyInto

func (in *PodScaleList) DeepCopyInto(out *PodScaleList)

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

func (*PodScaleList) DeepCopyObject

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

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

type PodScaleSpec

type PodScaleSpec struct {
	Namespace        string          `json:"namespace"`
	SLA              string          `json:"serviceLevelAgreement"`
	Pod              string          `json:"pod"`
	Service          string          `json:"service"`
	Container        string          `json:"container"`
	DesiredResources v1.ResourceList `json:"desired,omitempty" protobuf:"bytes,3,rep,name=desired,casttype=ResourceList,castkey=ResourceName"`
}

PodScaleSpec is the spec for a PodScale resource

func (*PodScaleSpec) DeepCopy

func (in *PodScaleSpec) DeepCopy() *PodScaleSpec

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

func (*PodScaleSpec) DeepCopyInto

func (in *PodScaleSpec) DeepCopyInto(out *PodScaleSpec)

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

type PodScaleStatus

type PodScaleStatus struct {
	CappedResources v1.ResourceList `json:"capped,omitempty" protobuf:"bytes,3,rep,name=actual,casttype=ResourceList,castkey=ResourceName"`
	ActualResources v1.ResourceList `json:"actual,omitempty" protobuf:"bytes,3,rep,name=actual,casttype=ResourceList,castkey=ResourceName"`
}

PodScaleStatus contains the resources patched by the `Contention Manager` according to the available node resources and other pods' SLA

func (*PodScaleStatus) DeepCopy

func (in *PodScaleStatus) DeepCopy() *PodScaleStatus

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

func (*PodScaleStatus) DeepCopyInto

func (in *PodScaleStatus) DeepCopyInto(out *PodScaleStatus)

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

type RecommendLogic

type RecommendLogic string

RecommendLogic defines logic used during the recommendation phase

const (
	FixedGainControl    RecommendLogic = "fixedGainControl"
	AdaptiveGainControl RecommendLogic = "adaptiveGainControl"
)

type Service

type Service struct {
	// Specify the selector to match Services and Service Level Agreement
	// +kubebuilder:validation:Required
	Selector *metav1.LabelSelector `json:"selector"`
	// The container to track inside the Pods.
	// +kubebuilder:validation:Required
	Container string `json:"container"`
}

Service is used to identify the application to scale by its service Lavels and the container offering the Application service

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

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

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

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

type ServiceLevelAgreement

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

	// +kubebuilder:validation:Required
	Spec ServiceLevelAgreementSpec `json:"spec"`
}

ServiceLevelAgreement is a configuration for the autoscaling system. It sets a requirement on the services that matches the selector.

func (*ServiceLevelAgreement) DeepCopy

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

func (*ServiceLevelAgreement) DeepCopyInto

func (in *ServiceLevelAgreement) DeepCopyInto(out *ServiceLevelAgreement)

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

func (*ServiceLevelAgreement) DeepCopyObject

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

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

type ServiceLevelAgreementList

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

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

ServiceLevelAgreementList is a list of ServiceLevelAgreement resources

func (*ServiceLevelAgreementList) DeepCopy

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

func (*ServiceLevelAgreementList) DeepCopyInto

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

func (*ServiceLevelAgreementList) DeepCopyObject

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

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

type ServiceLevelAgreementSpec

type ServiceLevelAgreementSpec struct {
	// Specify the metric on which the requirement is set.
	// +kubebuilder:validation:Required
	Metric MetricRequirement `json:"metric"`
	// Specify the logic used during the recommendation phase
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:="fixed_gain_control"
	RecommenderLogic RecommendLogic `json:"recommenderLogic"`
	// Specify the default resources assigned to pods in case `requests` field is empty in `PodSpec`.
	// +kubebuilder:validation:Required
	DefaultResources v1.ResourceList `json:"defaultResources,omitempty" protobuf:"bytes,3,rep,name=defaultResources,casttype=ResourceList,castkey=ResourceName"`
	// The lower bound of resources to assign to containers.
	// +kubebuilder:validation:Optional
	MinResources v1.ResourceList `json:"minResources,omitempty" protobuf:"bytes,3,rep,name=minResources,casttype=ResourceList,castkey=ResourceName"`
	// The upper bound of resources to assign to containers.
	// +kubebuilder:validation:Optional
	MaxResources v1.ResourceList `json:"maxResources,omitempty" protobuf:"bytes,3,rep,name=maxResources,casttype=ResourceList,castkey=ResourceName"`
	// The lower bound of replicas for the application.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=1
	MinReplicas int32 `json:"minReplicas,omitempty" protobuf:"bytes,3,rep,name=minResources,casttype=ResourceList,castkey=ResourceName"`
	// The upper bound of replicas for the application.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=100
	MaxReplicas int32 `json:"maxReplicas,omitempty" protobuf:"bytes,3,rep,name=maxResources,casttype=ResourceList,castkey=ResourceName"`
	// Identify the Service on which the agreement is defined
	// +kubebuilder:validation:Required
	Service *Service `json:"service"`
}

ServiceLevelAgreementSpec defines the agreement specifying the metric requirement to honor by System Autoscaler, a Selector used to match a service with the Service Level Agreement and the default resources assigned to pods in case the `requests` field is empty in the `PodSpec`.

func (*ServiceLevelAgreementSpec) DeepCopy

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

func (*ServiceLevelAgreementSpec) DeepCopyInto

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