v1alpha1

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the autoscaling API. +k8s:deepcopy-gen=package,register +groupName=autoscaling.crane.io

Index

Constants

View Source
const GroupName = "autoscaling.crane.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AdvancedHorizontalPodAutoscaler

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

	// +optional
	Spec AdvancedHorizontalPodAutoscalerSpec `json:"spec,omitempty"`

	// +optional
	Status AdvancedHorizontalPodAutoscalerStatus `json:"status,omitempty"`
}

AdvancedHorizontalPodAutoscaler is the Schema for the advancedhorizontalpodautoscaler API

func (*AdvancedHorizontalPodAutoscaler) DeepCopy

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

func (*AdvancedHorizontalPodAutoscaler) DeepCopyInto

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

func (*AdvancedHorizontalPodAutoscaler) DeepCopyObject

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

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

type AdvancedHorizontalPodAutoscalerList

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

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

AdvancedHorizontalPodAutoscalerList contains a list of AdvancedHorizontalPodAutoscaler

func (*AdvancedHorizontalPodAutoscalerList) DeepCopy

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

func (*AdvancedHorizontalPodAutoscalerList) DeepCopyInto

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

func (*AdvancedHorizontalPodAutoscalerList) DeepCopyObject

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

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

type AdvancedHorizontalPodAutoscalerSpec

type AdvancedHorizontalPodAutoscalerSpec struct {
	// ScaleTargetRef is the reference to the workload that should be scaled.
	ScaleTargetRef autoscalingv2.CrossVersionObjectReference `json:"scaleTargetRef"`
	// MinReplicas is the lower limit replicas to the scale target which the autoscaler can scale down to.
	// the default MinReplicas is 1.
	// +optional
	// +kubebuilder:default=1
	MinReplicas *int32 `json:"minReplicas,omitempty"`
	// MaxReplicas is the upper limit replicas to the scale target which the autoscaler can scale up to.
	// It cannot be less that MinReplicas.
	MaxReplicas int32 `json:"maxReplicas"`
	// metrics contains the specifications for which to use to calculate the
	// desired replica count (the maximum replica count across all metrics will
	// be used).  The desired replica count is calculated multiplying the
	// ratio between the target value and the current value by the current
	// number of pods.  Ergo, metrics used must decrease as the pod count is
	// increased, and vice-versa.  See the individual metric source types for
	// more information about how each type of metric must respond.
	// If not set, the default metric will be set to 80% average CPU utilization.
	// +optional
	Metrics []autoscalingv2.MetricSpec `json:"metrics,omitempty"`
	// behavior configures the scaling behavior of the target
	// in both Up and Down directions (scaleUp and scaleDown fields respectively).
	// If not set, the default HPAScalingRules for scale up and scale down are used.
	// +optional
	Behavior *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"`
	// PredictionConfig defines config for predict resources.
	// If unspecified, defaults don't enable prediction.
	PredictionConfig *PredictionConfig `json:"predictionConfig,omitempty"`
}

AdvancedHorizontalPodAutoscalerSpec defines the desired spec of AdvancedHorizontalPodAutoscaler

func (*AdvancedHorizontalPodAutoscalerSpec) DeepCopy

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

func (*AdvancedHorizontalPodAutoscalerSpec) DeepCopyInto

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

type AdvancedHorizontalPodAutoscalerStatus

type AdvancedHorizontalPodAutoscalerStatus struct {
	// ExpectReplicas is the expected replicas to scale to.
	// +optional
	ExpectReplicas *int32 `json:"expectReplicas,omitempty"`
	// CurrentReplicas is the current replicas to the scale target.
	// +optional
	CurrentReplicas *int32 `json:"currentReplicas,omitempty"`
	// LastScaleTime indicate the last time to execute scaling.
	// +optional
	LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty"`
	// Conditions is an array of current autoscaler conditions.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*AdvancedHorizontalPodAutoscalerStatus) DeepCopy

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

func (*AdvancedHorizontalPodAutoscalerStatus) DeepCopyInto

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

type PredictionAlgorithm

type PredictionAlgorithm struct {
	// AlgorithmType specifies algorithm to predict resource
	AlgorithmType predictionapi.AlgorithmType `json:"algorithmType,omitempty"`
	// +optional
	DSP *predictionapi.Dsp `json:"dsp,omitempty"`
	// +optional
	Percentile *predictionapi.Percentile `json:"percentile,omitempty"`
}

PredictionAlgorithm defines the algorithm to predict resources

func (*PredictionAlgorithm) DeepCopy

func (in *PredictionAlgorithm) DeepCopy() *PredictionAlgorithm

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

func (*PredictionAlgorithm) DeepCopyInto

func (in *PredictionAlgorithm) DeepCopyInto(out *PredictionAlgorithm)

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

type PredictionConfig

type PredictionConfig struct {
	// PredictionWindow is the time window seconds to predict metrics in the future.
	// +optional
	// +kubebuilder:default=600
	PredictionWindow *int32 `json:"predictionWindow,omitempty"`
	// PredictionAlgorithm contains all algorithm config that provider by prediction api.
	// +optional
	PredictionAlgorithm *PredictionAlgorithm `json:"predictionAlgorithm,omitempty"`
}

PredictionConfig defines config for predict resources

func (*PredictionConfig) DeepCopy

func (in *PredictionConfig) DeepCopy() *PredictionConfig

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

func (*PredictionConfig) DeepCopyInto

func (in *PredictionConfig) DeepCopyInto(out *PredictionConfig)

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