v1

package
v0.0.0-...-82cf001 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Unlicense Imports: 7 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the scaling v1 API group +kubebuilder:object:generate=true +groupName=scaling.autoscaling.custom

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "scaling.autoscaling.custom", Version: "v1"}

	// 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 ContainerResources

type ContainerResources struct {
	Requests corev1.ResourceList `json:"requests"`
	Limits   corev1.ResourceList `json:"limits"`
}

func (*ContainerResources) DeepCopy

func (in *ContainerResources) DeepCopy() *ContainerResources

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

func (*ContainerResources) DeepCopyInto

func (in *ContainerResources) DeepCopyInto(out *ContainerResources)

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

type HybridScaler

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

	Spec   HybridScalerSpec   `json:"spec,omitempty"`
	Status HybridScalerStatus `json:"status,omitempty"`
}

HybridScaler is the Schema for the hybridscalers API

func (*HybridScaler) DeepCopy

func (in *HybridScaler) DeepCopy() *HybridScaler

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

func (*HybridScaler) DeepCopyInto

func (in *HybridScaler) DeepCopyInto(out *HybridScaler)

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

func (*HybridScaler) DeepCopyObject

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

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

type HybridScalerList

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

HybridScalerList contains a list of HybridScaler

func (*HybridScalerList) DeepCopy

func (in *HybridScalerList) DeepCopy() *HybridScalerList

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

func (*HybridScalerList) DeepCopyInto

func (in *HybridScalerList) DeepCopyInto(out *HybridScalerList)

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

func (*HybridScalerList) DeepCopyObject

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

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

type HybridScalerSpec

type HybridScalerSpec struct {
	ScaleTargetRef  v2.CrossVersionObjectReference `json:"scaleTargetRef"`
	MinReplicas     *int32                         `json:"minReplicas"`
	MaxReplicas     *int32                         `json:"maxReplicas"`
	ResourcePolicy  ResourcePolicy                 `json:"resourcePolicy"`
	LearningType    LearningType                   `json:"learningType"`
	QLearningParams QLearningParams                `json:"qLearningParams"`
	Interval        *int32                         `json:"interval"`
}

HybridScalerSpec defines the desired state of HybridScaler

func (*HybridScalerSpec) DeepCopy

func (in *HybridScalerSpec) DeepCopy() *HybridScalerSpec

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

func (*HybridScalerSpec) DeepCopyInto

func (in *HybridScalerSpec) DeepCopyInto(out *HybridScalerSpec)

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

type HybridScalerStatus

type HybridScalerStatus struct {
	Replicas           int32                         `json:"replicas"`
	ContainerResources map[string]ContainerResources `json:"containerResources"`
	PodMetrics         PodMetrics                    `json:"podMetrics"`
	LearningState      []byte                        `json:"learningState,omitempty"`
}

HybridScalerStatus defines the observed state of HybridScaler

func (*HybridScalerStatus) DeepCopy

func (in *HybridScalerStatus) DeepCopy() *HybridScalerStatus

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

func (*HybridScalerStatus) DeepCopyInto

func (in *HybridScalerStatus) DeepCopyInto(out *HybridScalerStatus)

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

type LearningType

type LearningType string
var (
	LearningTypeQLearning LearningType = "qLearning"
)

type PodMetrics

type PodMetrics struct {
	ResourceUsage corev1.ResourceList `json:"resourceUsage"`
}

func (*PodMetrics) DeepCopy

func (in *PodMetrics) DeepCopy() *PodMetrics

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

func (*PodMetrics) DeepCopyInto

func (in *PodMetrics) DeepCopyInto(out *PodMetrics)

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

type QLearningParams

type QLearningParams struct {
	LearningRate             resource.Quantity `json:"learningRate"`
	DiscountFactor           resource.Quantity `json:"discountFactor"`
	Epsilon                  resource.Quantity `json:"epsilon"`
	CpuCost                  resource.Quantity `json:"cpuCost"`
	MemoryCost               resource.Quantity `json:"memoryCost"`
	UnderprovisioningPenalty resource.Quantity `json:"underprovisioningPenalty"`
}

func (*QLearningParams) DeepCopy

func (in *QLearningParams) DeepCopy() *QLearningParams

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

func (*QLearningParams) DeepCopyInto

func (in *QLearningParams) DeepCopyInto(out *QLearningParams)

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

type ResourcePolicy

type ResourcePolicy struct {
	MinAllowed                  corev1.ResourceList           `json:"minAllowed"`
	MaxAllowed                  corev1.ResourceList           `json:"maxAllowed"`
	TargetUtilization           map[corev1.ResourceName]int32 `json:"targetUtilization"`
	LimitsToRequestsRatioCPU    resource.Quantity             `json:"limitsToRequestsRatioCPU"`
	LimitsToRequestsRatioMemory resource.Quantity             `json:"limitsToRequestsRatioMemory"`
}

func (*ResourcePolicy) DeepCopy

func (in *ResourcePolicy) DeepCopy() *ResourcePolicy

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

func (*ResourcePolicy) DeepCopyInto

func (in *ResourcePolicy) DeepCopyInto(out *ResourcePolicy)

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