Documentation ¶
Overview ¶
Package v1beta1 is the v1beta1 version of the API SystemAutoscaler.
Index ¶
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type MetricRequirement
- type PodScale
- type PodScaleList
- type PodScaleSpec
- type PodScaleStatus
- type RecommendLogic
- type Service
- type ServiceLevelAgreement
- type ServiceLevelAgreementList
- type ServiceLevelAgreementSpec
Constants ¶
This section is empty.
Variables ¶
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 )
var SchemeGroupVersion = schema.GroupVersion{Group: systemautoscaler.GroupName, Version: "v1beta1"}
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodScale.
func (*PodScale) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodScale) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶
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 ¶
func (in *ServiceLevelAgreement) DeepCopy() *ServiceLevelAgreement
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 ¶
func (in *ServiceLevelAgreementList) DeepCopy() *ServiceLevelAgreementList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLevelAgreementList.
func (*ServiceLevelAgreementList) DeepCopyInto ¶
func (in *ServiceLevelAgreementList) DeepCopyInto(out *ServiceLevelAgreementList)
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 ¶
func (in *ServiceLevelAgreementSpec) DeepCopy() *ServiceLevelAgreementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLevelAgreementSpec.
func (*ServiceLevelAgreementSpec) DeepCopyInto ¶
func (in *ServiceLevelAgreementSpec) DeepCopyInto(out *ServiceLevelAgreementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.