Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the autoscaling v1alpha1 API group. +kubebuilder:object:generate=true +groupName=autoscaling.kapacitystack.io
Index ¶
- Variables
- type ConfigMapPortraitAlgorithmResultSource
- type CronHorizontalPortraitData
- type CronHorizontalPortraitProvider
- type CronJobPortraitAlgorithmJob
- type CronJobTemplateSpec
- type DynamicHorizontalPortraitProvider
- type ExternalJobPortraitAlgorithm
- type ExternalPodSorter
- type ExternalPodTrafficController
- type ExternalStabilityChecker
- type GrayStatus
- type GrayStrategy
- type HorizontalPortrait
- type HorizontalPortraitConditionType
- type HorizontalPortraitData
- type HorizontalPortraitDataType
- type HorizontalPortraitList
- type HorizontalPortraitProvider
- type HorizontalPortraitProviderType
- type HorizontalPortraitSpec
- type HorizontalPortraitStatus
- type HorizontalPortraitValue
- type IntelligentHorizontalPodAutoscaler
- type IntelligentHorizontalPodAutoscalerBehavior
- type IntelligentHorizontalPodAutoscalerConditionType
- type IntelligentHorizontalPodAutoscalerList
- type IntelligentHorizontalPodAutoscalerSpec
- type IntelligentHorizontalPodAutoscalerStatus
- type KubeHPAPortraitAlgorithm
- type MetricSpec
- type MetricsStabilityChecker
- type Operator
- type PodSorter
- type PodSorterType
- type PodState
- type PodTrafficController
- type PodTrafficControllerType
- type PortraitAlgorithm
- type PortraitAlgorithmJob
- type PortraitAlgorithmJobType
- type PortraitAlgorithmResultSource
- type PortraitAlgorithmResultSourceType
- type PortraitAlgorithmType
- type PortraitSpec
- type PortraitType
- type ReplicaCron
- type ReplicaProfile
- type ReplicaProfileBehavior
- type ReplicaProfileConditionType
- type ReplicaProfileList
- type ReplicaProfileSpec
- type ReplicaProfileStatus
- type ReplicaTimeSeriesPoint
- type ScaleMode
- type ScalingBehavior
- type ScalingDirection
- type StabilityChecker
- type StabilityCheckerType
- type StabilizationActionType
- type StaticHorizontalPortraitData
- type StaticHorizontalPortraitProvider
- type TimeSeriesHorizontalPortraitData
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "autoscaling.kapacitystack.io", Version: "v1alpha1"} // 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 ConfigMapPortraitAlgorithmResultSource ¶ added in v0.2.0
type ConfigMapPortraitAlgorithmResultSource struct{}
ConfigMapPortraitAlgorithmResultSource defines configurations of ConfigMap result source.
func (*ConfigMapPortraitAlgorithmResultSource) DeepCopy ¶ added in v0.2.0
func (in *ConfigMapPortraitAlgorithmResultSource) DeepCopy() *ConfigMapPortraitAlgorithmResultSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapPortraitAlgorithmResultSource.
func (*ConfigMapPortraitAlgorithmResultSource) DeepCopyInto ¶ added in v0.2.0
func (in *ConfigMapPortraitAlgorithmResultSource) DeepCopyInto(out *ConfigMapPortraitAlgorithmResultSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronHorizontalPortraitData ¶
type CronHorizontalPortraitData struct { // Crons contains cron rule based replicas values. // +kubebuilder:validation:MinItems=1 Crons []ReplicaCron `json:"crons"` }
CronHorizontalPortraitData defines the cron portrait data.
func (*CronHorizontalPortraitData) DeepCopy ¶
func (in *CronHorizontalPortraitData) DeepCopy() *CronHorizontalPortraitData
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronHorizontalPortraitData.
func (*CronHorizontalPortraitData) DeepCopyInto ¶
func (in *CronHorizontalPortraitData) DeepCopyInto(out *CronHorizontalPortraitData)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronHorizontalPortraitProvider ¶
type CronHorizontalPortraitProvider struct { // Crons contains cron rule based replicas values. // +kubebuilder:validation:MinItems=1 Crons []ReplicaCron `json:"crons"` }
CronHorizontalPortraitProvider defines a built-in horizontal portrait provider which provides replicas values based on cron rules.
func (*CronHorizontalPortraitProvider) DeepCopy ¶
func (in *CronHorizontalPortraitProvider) DeepCopy() *CronHorizontalPortraitProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronHorizontalPortraitProvider.
func (*CronHorizontalPortraitProvider) DeepCopyInto ¶
func (in *CronHorizontalPortraitProvider) DeepCopyInto(out *CronHorizontalPortraitProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronJobPortraitAlgorithmJob ¶ added in v0.2.0
type CronJobPortraitAlgorithmJob struct { // Template is the template of the Kubernetes CronJob that runs algorithm. Template CronJobTemplateSpec `json:"template"` }
CronJobPortraitAlgorithmJob defines configurations of CronJob job.
func (*CronJobPortraitAlgorithmJob) DeepCopy ¶ added in v0.2.0
func (in *CronJobPortraitAlgorithmJob) DeepCopy() *CronJobPortraitAlgorithmJob
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobPortraitAlgorithmJob.
func (*CronJobPortraitAlgorithmJob) DeepCopyInto ¶ added in v0.2.0
func (in *CronJobPortraitAlgorithmJob) DeepCopyInto(out *CronJobPortraitAlgorithmJob)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronJobTemplateSpec ¶ added in v0.2.0
type CronJobTemplateSpec struct { // ObjectMeta is standard object's metadata of the CronJob. // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec is specification of the desired behavior of the CronJob. // +optional Spec batchv1.CronJobSpec `json:"spec,omitempty"` }
CronJobTemplateSpec describes the data a Kubernetes CronJob should have when created from a template.
func (*CronJobTemplateSpec) DeepCopy ¶ added in v0.2.0
func (in *CronJobTemplateSpec) DeepCopy() *CronJobTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobTemplateSpec.
func (*CronJobTemplateSpec) DeepCopyInto ¶ added in v0.2.0
func (in *CronJobTemplateSpec) DeepCopyInto(out *CronJobTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DynamicHorizontalPortraitProvider ¶
type DynamicHorizontalPortraitProvider struct {
PortraitSpec `json:",inline"`
}
DynamicHorizontalPortraitProvider defines a horizontal portrait provider which provides replicas value(s) from an external HorizontalPortrait. The spec of the HorizontalPortrait is managed by the provider and the status of which is produced by the HorizontalPortrait controller or other external systems.
func (*DynamicHorizontalPortraitProvider) DeepCopy ¶
func (in *DynamicHorizontalPortraitProvider) DeepCopy() *DynamicHorizontalPortraitProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicHorizontalPortraitProvider.
func (*DynamicHorizontalPortraitProvider) DeepCopyInto ¶
func (in *DynamicHorizontalPortraitProvider) DeepCopyInto(out *DynamicHorizontalPortraitProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalJobPortraitAlgorithm ¶ added in v0.2.0
type ExternalJobPortraitAlgorithm struct { // Job is the external job that runs the algorithm. Job PortraitAlgorithmJob `json:"job"` // ResultSource is the source from where to fetch the result of the algorithm. ResultSource PortraitAlgorithmResultSource `json:"resultSource"` }
ExternalJobPortraitAlgorithm defines configurations of ExternalJob algorithm.
func (*ExternalJobPortraitAlgorithm) DeepCopy ¶ added in v0.2.0
func (in *ExternalJobPortraitAlgorithm) DeepCopy() *ExternalJobPortraitAlgorithm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalJobPortraitAlgorithm.
func (*ExternalJobPortraitAlgorithm) DeepCopyInto ¶ added in v0.2.0
func (in *ExternalJobPortraitAlgorithm) DeepCopyInto(out *ExternalJobPortraitAlgorithm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalPodSorter ¶
type ExternalPodSorter struct { // Name is the name of the sorter. // It must be unique across all external pod sorters of the ReplicaProfile. Name string `json:"name"` // Config is used to pass arbitrary config data to the sorter. // +optional Config map[string]string `json:"config,omitempty"` }
ExternalPodSorter defines the user specified external pod sorter.
func (*ExternalPodSorter) DeepCopy ¶
func (in *ExternalPodSorter) DeepCopy() *ExternalPodSorter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPodSorter.
func (*ExternalPodSorter) DeepCopyInto ¶
func (in *ExternalPodSorter) DeepCopyInto(out *ExternalPodSorter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalPodTrafficController ¶
type ExternalPodTrafficController struct { // Name is the name of the controller. // It must be unique across all external pod traffic controllers of the ReplicaProfile. Name string `json:"name"` // Config is used to pass arbitrary config to the controller. // +optional Config map[string]string `json:"config,omitempty"` }
ExternalPodTrafficController defines the user specified external pod traffic controller.
func (*ExternalPodTrafficController) DeepCopy ¶
func (in *ExternalPodTrafficController) DeepCopy() *ExternalPodTrafficController
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPodTrafficController.
func (*ExternalPodTrafficController) DeepCopyInto ¶
func (in *ExternalPodTrafficController) DeepCopyInto(out *ExternalPodTrafficController)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalStabilityChecker ¶
type ExternalStabilityChecker struct { // Name is the name of the checker. // It must be unique across all external stability checkers of the autoscaler. Name string `json:"name"` // Config is used to pass arbitrary config to the checker. // +optional Config map[string]string `json:"config,omitempty"` }
ExternalStabilityChecker defines an external stability checker.
func (*ExternalStabilityChecker) DeepCopy ¶
func (in *ExternalStabilityChecker) DeepCopy() *ExternalStabilityChecker
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalStabilityChecker.
func (*ExternalStabilityChecker) DeepCopyInto ¶
func (in *ExternalStabilityChecker) DeepCopyInto(out *ExternalStabilityChecker)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GrayStatus ¶
type GrayStatus struct { // GrayPercent is the current gray percentage of the total change. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=100 GrayPercent int32 `json:"grayPercent"` // LastUpdateTime is the last update time of GrayPercent. LastUpdateTime metav1.Time `json:"lastUpdateTime"` }
GrayStatus is the representation of gray status of replicas change.
func (*GrayStatus) DeepCopy ¶
func (in *GrayStatus) DeepCopy() *GrayStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrayStatus.
func (*GrayStatus) DeepCopyInto ¶
func (in *GrayStatus) DeepCopyInto(out *GrayStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GrayStrategy ¶
type GrayStrategy struct { // GrayState is the desired state of pods that in gray stage. // For scaling up, it can only be set to "Online". // For scaling down, it can either be set to "Cutoff", "Standby" or "Deleted". // +kubebuilder:validation:Enum=Online;Cutoff;Standby;Deleted GrayState PodState `json:"grayState"` // ChangeIntervalSeconds is the interval time between each gray change. // +kubebuilder:validation:Minimum=1 ChangeIntervalSeconds int32 `json:"changeIntervalSeconds"` // ChangePercent is the percentage of the total change of replica numbers which is used to // calculate the amount of pods to change in each gray change. // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=100 ChangePercent int32 `json:"changePercent"` // ObservationSeconds is the additional observation time after the gray change reaching 100%. // During the observation time, all pods that in gray stage would be kept in GrayState // and the stability ensurance mechanism for the gray change would continue to take effect. // If not set, the gray change will not have observation time. // +optional // +kubebuilder:validation:Minimum=0 ObservationSeconds int32 `json:"observationSeconds,omitempty"` }
GrayStrategy defines the strategy for gray change of replicas when scaling from replicas specified by previous HorizontalPortraitValue to which specified by current HorizontalPortraitValue.
func (*GrayStrategy) DeepCopy ¶
func (in *GrayStrategy) DeepCopy() *GrayStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrayStrategy.
func (*GrayStrategy) DeepCopyInto ¶
func (in *GrayStrategy) DeepCopyInto(out *GrayStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HorizontalPortrait ¶
type HorizontalPortrait struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HorizontalPortraitSpec `json:"spec,omitempty"` Status HorizontalPortraitStatus `json:"status,omitempty"` }
HorizontalPortrait represents a horizontal portrait (the expectation of replicas) of a scale target with metrics and algorithm configurations that are used to generate the portrait.
func (*HorizontalPortrait) DeepCopy ¶
func (in *HorizontalPortrait) DeepCopy() *HorizontalPortrait
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPortrait.
func (*HorizontalPortrait) DeepCopyInto ¶
func (in *HorizontalPortrait) DeepCopyInto(out *HorizontalPortrait)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HorizontalPortrait) DeepCopyObject ¶
func (in *HorizontalPortrait) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HorizontalPortraitConditionType ¶
type HorizontalPortraitConditionType string
const ( // PortraitGenerated means the portrait has been successfully generated and populated to the status. PortraitGenerated HorizontalPortraitConditionType = "PortraitGenerated" )
type HorizontalPortraitData ¶
type HorizontalPortraitData struct { // Type is the type of this portrait data. // +kubebuilder:validation:Enum=Static;Cron;TimeSeries Type HorizontalPortraitDataType `json:"type"` // Static refers to static portrait data. // +optional Static *StaticHorizontalPortraitData `json:"static,omitempty"` // Cron refers to cron portrait data. // +optional Cron *CronHorizontalPortraitData `json:"cron,omitempty"` // TimeSeries refers to time series portrait data. // +optional TimeSeries *TimeSeriesHorizontalPortraitData `json:"timeSeries,omitempty"` // ExpireTime indicates when this portrait data will expire. // +optional ExpireTime *metav1.Time `json:"expireTime,omitempty"` }
HorizontalPortraitData represents the data of the portrait produced by algorithms.
func (*HorizontalPortraitData) DeepCopy ¶
func (in *HorizontalPortraitData) DeepCopy() *HorizontalPortraitData
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPortraitData.
func (*HorizontalPortraitData) DeepCopyInto ¶
func (in *HorizontalPortraitData) DeepCopyInto(out *HorizontalPortraitData)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HorizontalPortraitDataType ¶
type HorizontalPortraitDataType string
const ( // StaticHorizontalPortraitDataType is data with a static replicas value. StaticHorizontalPortraitDataType HorizontalPortraitDataType = "Static" // CronHorizontalPortraitDataType is data with cron based replicas values. CronHorizontalPortraitDataType HorizontalPortraitDataType = "Cron" // TimeSeriesHorizontalPortraitDataType is data with time series based replicas values. TimeSeriesHorizontalPortraitDataType HorizontalPortraitDataType = "TimeSeries" )
type HorizontalPortraitList ¶
type HorizontalPortraitList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HorizontalPortrait `json:"items"` }
HorizontalPortraitList contains a list of HorizontalPortrait.
func (*HorizontalPortraitList) DeepCopy ¶
func (in *HorizontalPortraitList) DeepCopy() *HorizontalPortraitList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPortraitList.
func (*HorizontalPortraitList) DeepCopyInto ¶
func (in *HorizontalPortraitList) DeepCopyInto(out *HorizontalPortraitList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HorizontalPortraitList) DeepCopyObject ¶
func (in *HorizontalPortraitList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HorizontalPortraitProvider ¶
type HorizontalPortraitProvider struct { // Type is the type of the horizontal portrait provider. // +kubebuilder:validation:Enum=Static;Cron;Dynamic Type HorizontalPortraitProviderType `json:"type"` // Priority is the priority of the horizontal portrait generated by this provider. // A valid portrait with higher priority overrides ones with lower priority. // The bigger the number, the higher the priority. // If multiple portraits have the same priority, // the one which desires most replicas at current time would override the other ones. Priority int32 `json:"priority"` // Static is the configuration for static horizontal portrait provider. // +optional Static *StaticHorizontalPortraitProvider `json:"static,omitempty"` // Cron is the configuration for cron horizontal portrait provider. // +optional Cron *CronHorizontalPortraitProvider `json:"cron,omitempty"` // Dynamic is the configuration for dynamic horizontal portrait provider. // Note that the PortraitType must be unique across all dynamic horizontal portrait providers of the autoscaler. // +optional Dynamic *DynamicHorizontalPortraitProvider `json:"dynamic,omitempty"` }
HorizontalPortraitProvider defines a specific horizontal portrait provider.
func (*HorizontalPortraitProvider) DeepCopy ¶
func (in *HorizontalPortraitProvider) DeepCopy() *HorizontalPortraitProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPortraitProvider.
func (*HorizontalPortraitProvider) DeepCopyInto ¶
func (in *HorizontalPortraitProvider) DeepCopyInto(out *HorizontalPortraitProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HorizontalPortraitProviderType ¶
type HorizontalPortraitProviderType string
const ( // StaticHorizontalPortraitProviderType is a built-in horizontal portrait provider // which always provides a static replicas value. StaticHorizontalPortraitProviderType HorizontalPortraitProviderType = "Static" // CronHorizontalPortraitProviderType is a built-in horizontal portrait provider // which provides replicas values based on cron rules. CronHorizontalPortraitProviderType HorizontalPortraitProviderType = "Cron" // DynamicHorizontalPortraitProviderType is a horizontal portrait provider // which provides replicas value(s) from an external HorizontalPortrait. DynamicHorizontalPortraitProviderType HorizontalPortraitProviderType = "Dynamic" )
type HorizontalPortraitSpec ¶
type HorizontalPortraitSpec struct { // ScaleTargetRef points to the target resource to scale. ScaleTargetRef k8sautoscalingv2.CrossVersionObjectReference `json:"scaleTargetRef"` PortraitSpec `json:",inline"` }
HorizontalPortraitSpec defines the desired state of HorizontalPortrait.
func (*HorizontalPortraitSpec) DeepCopy ¶
func (in *HorizontalPortraitSpec) DeepCopy() *HorizontalPortraitSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPortraitSpec.
func (*HorizontalPortraitSpec) DeepCopyInto ¶
func (in *HorizontalPortraitSpec) DeepCopyInto(out *HorizontalPortraitSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HorizontalPortraitStatus ¶
type HorizontalPortraitStatus struct { // PortraitData is the data of generated portrait. // +optional PortraitData *HorizontalPortraitData `json:"portraitData,omitempty"` // Conditions represents current conditions of the HorizontalPortrait. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
HorizontalPortraitStatus defines the observed state of HorizontalPortrait.
func (*HorizontalPortraitStatus) DeepCopy ¶
func (in *HorizontalPortraitStatus) DeepCopy() *HorizontalPortraitStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPortraitStatus.
func (*HorizontalPortraitStatus) DeepCopyInto ¶
func (in *HorizontalPortraitStatus) DeepCopyInto(out *HorizontalPortraitStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HorizontalPortraitValue ¶
type HorizontalPortraitValue struct { // Provider is the unique identification of the provider of the portrait from which this value is produced. Provider string `json:"provider"` // Replicas is the desired number of online replicas. // +kubebuilder:validation:Minimum=0 Replicas int32 `json:"replicas"` // ExpireTime indicates when this portrait value will expire. // +optional ExpireTime *metav1.Time `json:"expireTime,omitempty"` }
HorizontalPortraitValue contains the desired replicas produced by a portrait with optional expire time.
func (*HorizontalPortraitValue) DeepCopy ¶
func (in *HorizontalPortraitValue) DeepCopy() *HorizontalPortraitValue
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPortraitValue.
func (*HorizontalPortraitValue) DeepCopyInto ¶
func (in *HorizontalPortraitValue) DeepCopyInto(out *HorizontalPortraitValue)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IntelligentHorizontalPodAutoscaler ¶
type IntelligentHorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IntelligentHorizontalPodAutoscalerSpec `json:"spec,omitempty"` Status IntelligentHorizontalPodAutoscalerStatus `json:"status,omitempty"` }
IntelligentHorizontalPodAutoscaler is the configuration for an intelligent horizontal pod autoscaler, which automatically manages the replica count of the target workload based on the horizontal portraits provided by specified portrait providers.
func (*IntelligentHorizontalPodAutoscaler) DeepCopy ¶
func (in *IntelligentHorizontalPodAutoscaler) DeepCopy() *IntelligentHorizontalPodAutoscaler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntelligentHorizontalPodAutoscaler.
func (*IntelligentHorizontalPodAutoscaler) DeepCopyInto ¶
func (in *IntelligentHorizontalPodAutoscaler) DeepCopyInto(out *IntelligentHorizontalPodAutoscaler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IntelligentHorizontalPodAutoscaler) DeepCopyObject ¶
func (in *IntelligentHorizontalPodAutoscaler) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IntelligentHorizontalPodAutoscalerBehavior ¶
type IntelligentHorizontalPodAutoscalerBehavior struct { // ScaleUp is the behavior configuration for scaling up. // +optional ScaleUp ScalingBehavior `json:"scaleUp,omitempty"` // ScaleDown is the behavior configuration for scaling down. // +optional ScaleDown ScalingBehavior `json:"scaleDown,omitempty"` // ReplicaProfile is used to configure the behavior of the underlying ReplicaProfile. // +optional ReplicaProfile *ReplicaProfileBehavior `json:"replicaProfile,omitempty"` }
IntelligentHorizontalPodAutoscalerBehavior defines the configuration of the scaling behavior of the autoscaler.
func (*IntelligentHorizontalPodAutoscalerBehavior) DeepCopy ¶
func (in *IntelligentHorizontalPodAutoscalerBehavior) DeepCopy() *IntelligentHorizontalPodAutoscalerBehavior
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntelligentHorizontalPodAutoscalerBehavior.
func (*IntelligentHorizontalPodAutoscalerBehavior) DeepCopyInto ¶
func (in *IntelligentHorizontalPodAutoscalerBehavior) DeepCopyInto(out *IntelligentHorizontalPodAutoscalerBehavior)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IntelligentHorizontalPodAutoscalerConditionType ¶
type IntelligentHorizontalPodAutoscalerConditionType string
const ( // ScalingActive indicates that the IHPA controller is able to scale if necessary: // it's correctly configured, can fetch the desired portraits, and isn't paused. ScalingActive IntelligentHorizontalPodAutoscalerConditionType = "ScalingActive" // ScalingLimited indicates that the scale of current portrait would be above or // below the range for the IHPA, and has thus been capped. ScalingLimited IntelligentHorizontalPodAutoscalerConditionType = "ScalingLimited" // GrayProgressing indicates that current scaling is in gray progress from previous portrait // and has not reached the desired scale of current portrait. GrayProgressing IntelligentHorizontalPodAutoscalerConditionType = "GrayProgressing" )
type IntelligentHorizontalPodAutoscalerList ¶
type IntelligentHorizontalPodAutoscalerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []IntelligentHorizontalPodAutoscaler `json:"items"` }
IntelligentHorizontalPodAutoscalerList contains a list of IntelligentHorizontalPodAutoscaler.
func (*IntelligentHorizontalPodAutoscalerList) DeepCopy ¶
func (in *IntelligentHorizontalPodAutoscalerList) DeepCopy() *IntelligentHorizontalPodAutoscalerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntelligentHorizontalPodAutoscalerList.
func (*IntelligentHorizontalPodAutoscalerList) DeepCopyInto ¶
func (in *IntelligentHorizontalPodAutoscalerList) DeepCopyInto(out *IntelligentHorizontalPodAutoscalerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IntelligentHorizontalPodAutoscalerList) DeepCopyObject ¶
func (in *IntelligentHorizontalPodAutoscalerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IntelligentHorizontalPodAutoscalerSpec ¶
type IntelligentHorizontalPodAutoscalerSpec struct { // ScaleTargetRef points to the target resource to scale. ScaleTargetRef k8sautoscalingv2.CrossVersionObjectReference `json:"scaleTargetRef"` // Paused means if the autoscaler is paused. // +optional Paused bool `json:"paused,omitempty"` // MinReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. // +kubebuilder:validation:Minimum=0 MinReplicas int32 `json:"minReplicas"` // MaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. // It cannot be less than MinReplicas. // +kubebuilder:validation:Minimum=0 MaxReplicas int32 `json:"maxReplicas"` // ScaleMode is the scaling mode of the autoscaler. // +optional // +kubebuilder:validation:Enum=Auto;Preview // +kubebuilder:default=Auto ScaleMode ScaleMode `json:"scaleMode"` // PortraitProviders contains configurations of portrait providers // that are used to generate horizontal portraits for the scale target. PortraitProviders []HorizontalPortraitProvider `json:"portraitProviders"` // Behavior configures the scaling behavior of the autoscaler. // +optional Behavior IntelligentHorizontalPodAutoscalerBehavior `json:"behavior,omitempty"` // StabilityCheckers contains configurations of stability checkers // that are used to ensure stability during autoscaling. // TODO: reconsider the place of this field // +optional StabilityCheckers []StabilityChecker `json:"stabilityCheckers,omitempty"` }
IntelligentHorizontalPodAutoscalerSpec defines the desired state of IntelligentHorizontalPodAutoscaler.
func (*IntelligentHorizontalPodAutoscalerSpec) DeepCopy ¶
func (in *IntelligentHorizontalPodAutoscalerSpec) DeepCopy() *IntelligentHorizontalPodAutoscalerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntelligentHorizontalPodAutoscalerSpec.
func (*IntelligentHorizontalPodAutoscalerSpec) DeepCopyInto ¶
func (in *IntelligentHorizontalPodAutoscalerSpec) DeepCopyInto(out *IntelligentHorizontalPodAutoscalerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IntelligentHorizontalPodAutoscalerStatus ¶
type IntelligentHorizontalPodAutoscalerStatus struct { // PreviousPortraitValue is the last valid portrait value produced by portrait providers. // +optional PreviousPortraitValue *HorizontalPortraitValue `json:"previousPortraitValue,omitempty"` // CurrentPortraitValue is the current valid portrait value produced by portrait providers. // +optional CurrentPortraitValue *HorizontalPortraitValue `json:"currentPortraitValue,omitempty"` // Gray represents the current gray status of replicas change. // +optional Gray *GrayStatus `json:"gray,omitempty"` // Conditions represents current conditions of the IntelligentHorizontalPodAutoscaler. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
IntelligentHorizontalPodAutoscalerStatus defines the observed state of IntelligentHorizontalPodAutoscaler.
func (*IntelligentHorizontalPodAutoscalerStatus) DeepCopy ¶
func (in *IntelligentHorizontalPodAutoscalerStatus) DeepCopy() *IntelligentHorizontalPodAutoscalerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntelligentHorizontalPodAutoscalerStatus.
func (*IntelligentHorizontalPodAutoscalerStatus) DeepCopyInto ¶
func (in *IntelligentHorizontalPodAutoscalerStatus) DeepCopyInto(out *IntelligentHorizontalPodAutoscalerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubeHPAPortraitAlgorithm ¶
type KubeHPAPortraitAlgorithm struct { // SyncPeriod is the period for syncing the portrait. // +optional // +kubebuilder:default="15s" SyncPeriod metav1.Duration `json:"syncPeriod"` // Tolerance is the tolerance for when resource usage suggests upscaling/downscaling. // Should be a string formatted float64 number. // +optional // +kubebuilder:default="0.1" Tolerance string `json:"tolerance"` // CPUInitializationPeriod is the period after pod start when CPU samples might be skipped. // +optional // +kubebuilder:default="5m" CPUInitializationPeriod metav1.Duration `json:"cpuInitializationPeriod"` // InitialReadinessDelay is period after pod start during which readiness changes // are treated as readiness being set for the first time. The only effect of this is that // HPA will disregard CPU samples from unready pods that had last readiness change during that period. // +optional // +kubebuilder:default="30s" InitialReadinessDelay metav1.Duration `json:"initialReadinessDelay"` }
KubeHPAPortraitAlgorithm defines parameters of KubeHPA algorithm.
func (*KubeHPAPortraitAlgorithm) DeepCopy ¶
func (in *KubeHPAPortraitAlgorithm) DeepCopy() *KubeHPAPortraitAlgorithm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeHPAPortraitAlgorithm.
func (*KubeHPAPortraitAlgorithm) DeepCopyInto ¶
func (in *KubeHPAPortraitAlgorithm) DeepCopyInto(out *KubeHPAPortraitAlgorithm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricSpec ¶
type MetricSpec struct { k8sautoscalingv2.MetricSpec `json:",inline"` // Name is the unique identifier of this metric spec. // It must be unique across all metric specs if specified. // +optional Name string `json:"name,omitempty"` // Operator is an optional binary arithmetic operator which is used to specify // a custom comparison rule "<actual> <operator> <target>" for the metric. // Note that not all use cases support this. // +optional // +kubebuilder:validation:Enum===;>;<;>=;<= Operator Operator `json:"operator,omitempty"` }
MetricSpec represents the configuration for a single metric. It is an extended autoscalingv2.MetricSpec.
func (*MetricSpec) DeepCopy ¶
func (in *MetricSpec) DeepCopy() *MetricSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSpec.
func (*MetricSpec) DeepCopyInto ¶
func (in *MetricSpec) DeepCopyInto(out *MetricSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsStabilityChecker ¶
type MetricsStabilityChecker struct { // Metrics contains metrics rules of the checker. // +kubebuilder:validation:MinItems=1 Metrics []MetricSpec `json:"metrics"` }
MetricsStabilityChecker defines a built-in stability checker which checks for anomalies based on metrics rules.
func (*MetricsStabilityChecker) DeepCopy ¶
func (in *MetricsStabilityChecker) DeepCopy() *MetricsStabilityChecker
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsStabilityChecker.
func (*MetricsStabilityChecker) DeepCopyInto ¶
func (in *MetricsStabilityChecker) DeepCopyInto(out *MetricsStabilityChecker)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Operator ¶
type Operator string
const ( // Equals means that two numbers are equal. Equals Operator = "==" // GreaterThan means that left number is greater than right one. GreaterThan Operator = ">" // LessThan means that left number is less than right one. LessThan Operator = "<" // GreaterThanOrEquals means that left number is greater than or equal to right one. GreaterThanOrEquals Operator = ">=" // LessThanOrEquals means that left number is less than or equal to right one. LessThanOrEquals Operator = "<=" )
type PodSorter ¶
type PodSorter struct { // Type is the type of pod sorter. // It defaults to WorkloadDefault. // +optional // +kubebuilder:validation:Enum=WorkloadDefault;External // +kubebuilder:default=WorkloadDefault Type PodSorterType `json:"type"` // External refers to a user specified external pod sorter. // +optional External *ExternalPodSorter `json:"external,omitempty"` }
PodSorter is used to decide the priority of pods when scaling.
func (*PodSorter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSorter.
func (*PodSorter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSorterType ¶
type PodSorterType string
const ( // WorkloadDefaultPodSorterType is the default pod sorter of target workload. WorkloadDefaultPodSorterType PodSorterType = "WorkloadDefault" // ExternalPodSorterType is the external pod sorter specified by user. ExternalPodSorterType PodSorterType = "External" )
type PodState ¶
type PodState string
const ( // PodStateOnline means the pod is running and should handle full traffic. PodStateOnline PodState = "Online" // PodStateCutoff means the pod is running but would handle no traffic. PodStateCutoff PodState = "Cutoff" // PodStateStandby means the pod is running but its resources are reclaimed (aka hibernating). PodStateStandby PodState = "Standby" // PodStateDeleted means the pod is deleted (scaled down). PodStateDeleted PodState = "Deleted" )
type PodTrafficController ¶
type PodTrafficController struct { // Type is the type of pod traffic controller. // It defaults to ReadinessGate. // +optional // +kubebuilder:validation:Enum=ReadinessGate;External // +kubebuilder:default=ReadinessGate Type PodTrafficControllerType `json:"type"` // External refers to a user specified external pod traffic controller. // +optional External *ExternalPodTrafficController `json:"external,omitempty"` }
PodTrafficController is used to control pod traffic when scaling.
func (*PodTrafficController) DeepCopy ¶
func (in *PodTrafficController) DeepCopy() *PodTrafficController
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTrafficController.
func (*PodTrafficController) DeepCopyInto ¶
func (in *PodTrafficController) DeepCopyInto(out *PodTrafficController)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodTrafficControllerType ¶
type PodTrafficControllerType string
const ( // ReadinessGatePodTrafficControllerType controls pod traffic by setting its readiness gate. ReadinessGatePodTrafficControllerType PodTrafficControllerType = "ReadinessGate" // ExternalPodTrafficControllerType controls pod traffic by the external controller specified by user. ExternalPodTrafficControllerType PodTrafficControllerType = "External" )
type PortraitAlgorithm ¶
type PortraitAlgorithm struct { // Type is the type of algorithm. Type PortraitAlgorithmType `json:"type"` // ExternalJob is the configuration for ExternalJob algorithm. // +optional ExternalJob *ExternalJobPortraitAlgorithm `json:"externalJob,omitempty"` // KubeHPA is the configuration for KubeHPA algorithm. // +optional KubeHPA *KubeHPAPortraitAlgorithm `json:"kubeHPA,omitempty"` // Config is the general configuration data for arbitrary algorithm those // used by external portrait generators. // +optional // +kubebuilder:pruning:PreserveUnknownFields Config *runtime.RawExtension `json:"config,omitempty"` }
PortraitAlgorithm represents the configuration for a specific type of algorithm used for portrait generating.
func (*PortraitAlgorithm) DeepCopy ¶
func (in *PortraitAlgorithm) DeepCopy() *PortraitAlgorithm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortraitAlgorithm.
func (*PortraitAlgorithm) DeepCopyInto ¶
func (in *PortraitAlgorithm) DeepCopyInto(out *PortraitAlgorithm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PortraitAlgorithmJob ¶ added in v0.2.0
type PortraitAlgorithmJob struct { // Type is the type of job. Type PortraitAlgorithmJobType `json:"type"` // CronJob is the configuration for CronJob job. // +optional CronJob *CronJobPortraitAlgorithmJob `json:"cronJob,omitempty"` }
PortraitAlgorithmJob represents the configuration for a specific type of external algorithm job.
func (*PortraitAlgorithmJob) DeepCopy ¶ added in v0.2.0
func (in *PortraitAlgorithmJob) DeepCopy() *PortraitAlgorithmJob
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortraitAlgorithmJob.
func (*PortraitAlgorithmJob) DeepCopyInto ¶ added in v0.2.0
func (in *PortraitAlgorithmJob) DeepCopyInto(out *PortraitAlgorithmJob)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PortraitAlgorithmJobType ¶ added in v0.2.0
type PortraitAlgorithmJobType string
const ( // CronJobPortraitAlgorithmJobType runs algorithm by a Kubernetes CronJob. CronJobPortraitAlgorithmJobType PortraitAlgorithmJobType = "CronJob" )
type PortraitAlgorithmResultSource ¶ added in v0.2.0
type PortraitAlgorithmResultSource struct { // Type is the type of result source. Type PortraitAlgorithmResultSourceType `json:"type"` // ConfigMap is the configuration for ConfigMap result source. // +optional ConfigMap *ConfigMapPortraitAlgorithmResultSource `json:"configMap,omitempty"` }
PortraitAlgorithmResultSource represents the configuration for a specific type of result source of external algorithm job.
func (*PortraitAlgorithmResultSource) DeepCopy ¶ added in v0.2.0
func (in *PortraitAlgorithmResultSource) DeepCopy() *PortraitAlgorithmResultSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortraitAlgorithmResultSource.
func (*PortraitAlgorithmResultSource) DeepCopyInto ¶ added in v0.2.0
func (in *PortraitAlgorithmResultSource) DeepCopyInto(out *PortraitAlgorithmResultSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PortraitAlgorithmResultSourceType ¶ added in v0.2.0
type PortraitAlgorithmResultSourceType string
const ( // ConfigMapPortraitAlgorithmResultSourceType means that the result source is a Kubernetes ConfigMap. ConfigMapPortraitAlgorithmResultSourceType PortraitAlgorithmResultSourceType = "ConfigMap" )
type PortraitAlgorithmType ¶
type PortraitAlgorithmType string
const ( // ExternalJobPortraitAlgorithmType is algorithm that runs as an external job. ExternalJobPortraitAlgorithmType PortraitAlgorithmType = "ExternalJob" // KubeHPAPortraitAlgorithmType is the Kubernetes HPA algorithm. KubeHPAPortraitAlgorithmType PortraitAlgorithmType = "KubeHPA" )
type PortraitSpec ¶
type PortraitSpec struct { // PortraitType is the type of portrait. // Different type has different semantics with different portrait generating logic. PortraitType PortraitType `json:"portraitType"` // ExternalGeneratorName is the identifier of external controller which shall generate this portrait. // External controllers should use this field to filter portraits to generate. // Kapacity's built-in portrait generators would ignore portraits with this field set. // +optional ExternalGeneratorName string `json:"externalGeneratorName,omitempty"` // Metrics contains the specifications for which to use to generate the portrait. // +optional Metrics []MetricSpec `json:"metrics,omitempty"` // Algorithm is the algorithm for which to use to generate the portrait. Algorithm PortraitAlgorithm `json:"algorithm"` }
PortraitSpec defines general specs of portrait.
func (*PortraitSpec) DeepCopy ¶
func (in *PortraitSpec) DeepCopy() *PortraitSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortraitSpec.
func (*PortraitSpec) DeepCopyInto ¶
func (in *PortraitSpec) DeepCopyInto(out *PortraitSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PortraitType ¶
type PortraitType string
const ( // ReactivePortraitType generates portrait reactively based on latest metrics. ReactivePortraitType PortraitType = "Reactive" // PredictivePortraitType generates portrait by predicting the future based on historical metrics. PredictivePortraitType PortraitType = "Predictive" // TODO BurstPortraitType PortraitType = "Burst" )
type ReplicaCron ¶
type ReplicaCron struct { // Name is the name of this cron rule. // It must be unique across all rules. Name string `json:"name"` // Description is an additional description of this cron rule. // +optional Description string `json:"description,omitempty"` // TimeZone is the time zone in which the cron would run. // Defaults to UTC. // +optional // +kubebuilder:default=UTC TimeZone string `json:"timeZone"` // Start is the cron of time from which the rule takes effect. // It must be a valid standard cron expression. Start string `json:"start"` // End is the cron of time to which the rule takes effect. // It must be a valid standard cron expression. End string `json:"end"` // Replicas is the desired number of online replicas within this cron rule. // +kubebuilder:validation:Minimum=0 Replicas int32 `json:"replicas"` }
ReplicaCron defines the cron rule for a desired replicas value.
func (*ReplicaCron) DeepCopy ¶
func (in *ReplicaCron) DeepCopy() *ReplicaCron
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaCron.
func (*ReplicaCron) DeepCopyInto ¶
func (in *ReplicaCron) DeepCopyInto(out *ReplicaCron)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaProfile ¶
type ReplicaProfile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ReplicaProfileSpec `json:"spec,omitempty"` Status ReplicaProfileStatus `json:"status,omitempty"` }
ReplicaProfile controls the number and state of replicas of the target workload. It is used by IntelligentHorizontalPodAutoscaler to do actual workload scaling.
func (*ReplicaProfile) DeepCopy ¶
func (in *ReplicaProfile) DeepCopy() *ReplicaProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaProfile.
func (*ReplicaProfile) DeepCopyInto ¶
func (in *ReplicaProfile) DeepCopyInto(out *ReplicaProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReplicaProfile) DeepCopyObject ¶
func (in *ReplicaProfile) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReplicaProfileBehavior ¶
type ReplicaProfileBehavior struct { // PodSorter is used to decide the priority of pods when scaling. // If not set, default pod sorter will be set to WorkloadDefault. // +optional // +kubebuilder:default={type:"WorkloadDefault"} PodSorter PodSorter `json:"podSorter"` // PodTrafficController is used to control pod traffic when scaling. // If not set, default pod traffic controller will be set to ReadinessGate. // +optional // +kubebuilder:default={type:"ReadinessGate"} PodTrafficController PodTrafficController `json:"podTrafficController"` }
ReplicaProfileBehavior defines the behavior of ReplicaProfile.
func (*ReplicaProfileBehavior) DeepCopy ¶
func (in *ReplicaProfileBehavior) DeepCopy() *ReplicaProfileBehavior
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaProfileBehavior.
func (*ReplicaProfileBehavior) DeepCopyInto ¶
func (in *ReplicaProfileBehavior) DeepCopyInto(out *ReplicaProfileBehavior)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaProfileConditionType ¶
type ReplicaProfileConditionType string
const ( // ReplicaProfileApplied means all the operations for ensuring the replica profile are applied. ReplicaProfileApplied ReplicaProfileConditionType = "Applied" // ReplicaProfileEnsured means the replica profile is ensured. ReplicaProfileEnsured ReplicaProfileConditionType = "Ensured" )
type ReplicaProfileList ¶
type ReplicaProfileList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ReplicaProfile `json:"items"` }
ReplicaProfileList contains a list of ReplicaProfile
func (*ReplicaProfileList) DeepCopy ¶
func (in *ReplicaProfileList) DeepCopy() *ReplicaProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaProfileList.
func (*ReplicaProfileList) DeepCopyInto ¶
func (in *ReplicaProfileList) DeepCopyInto(out *ReplicaProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReplicaProfileList) DeepCopyObject ¶
func (in *ReplicaProfileList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReplicaProfileSpec ¶
type ReplicaProfileSpec struct { // ScaleTargetRef points to the target resource to scale. ScaleTargetRef k8sautoscalingv2.CrossVersionObjectReference `json:"scaleTargetRef"` // OnlineReplicas is the desired number of online replicas. // +optional // +kubebuilder:validation:Minimum=0 OnlineReplicas int32 `json:"onlineReplicas,omitempty"` // CutoffReplicas is the desired number of cutoff replicas. // +optional // +kubebuilder:validation:Minimum=0 CutoffReplicas int32 `json:"cutoffReplicas,omitempty"` // StandbyReplicas is the desired number of standby replicas. // +optional // +kubebuilder:validation:Minimum=0 StandbyReplicas int32 `json:"standbyReplicas,omitempty"` // Paused means if the replica control is paused. // +optional Paused bool `json:"paused,omitempty"` // AllowedScalingDirection is the allowed scaling direction. // Note that it only cares about online replicas. // It defaults to Both. // +optional // +kubebuilder:validation:Enum=Both;Neither;Up;Down // +kubebuilder:default=Both AllowedScalingDirection ScalingDirection `json:"allowedScalingDirection"` // Behavior configures the behavior of ReplicaProfile. // If not set, default behavior will be set. // +optional // +kubebuilder:default={podSorter:{type:"WorkloadDefault"},podTrafficController:{type:"ReadinessGate"}} Behavior ReplicaProfileBehavior `json:"behavior"` }
ReplicaProfileSpec defines the desired state of ReplicaProfile.
func (*ReplicaProfileSpec) DeepCopy ¶
func (in *ReplicaProfileSpec) DeepCopy() *ReplicaProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaProfileSpec.
func (*ReplicaProfileSpec) DeepCopyInto ¶
func (in *ReplicaProfileSpec) DeepCopyInto(out *ReplicaProfileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaProfileStatus ¶
type ReplicaProfileStatus struct { // OnlineReplicas is the current number of online replicas. // +optional // +kubebuilder:validation:Minimum=0 OnlineReplicas int32 `json:"onlineReplicas,omitempty"` // CutoffReplicas is the current number of cutoff replicas. // +optional // +kubebuilder:validation:Minimum=0 CutoffReplicas int32 `json:"cutoffReplicas,omitempty"` // StandbyReplicas is the current number of standby replicas. // +optional // +kubebuilder:validation:Minimum=0 StandbyReplicas int32 `json:"standbyReplicas,omitempty"` // Conditions represents current conditions of the ReplicaProfile. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
ReplicaProfileStatus defines the observed state of ReplicaProfile.
func (*ReplicaProfileStatus) DeepCopy ¶
func (in *ReplicaProfileStatus) DeepCopy() *ReplicaProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaProfileStatus.
func (*ReplicaProfileStatus) DeepCopyInto ¶
func (in *ReplicaProfileStatus) DeepCopyInto(out *ReplicaProfileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaTimeSeriesPoint ¶
type ReplicaTimeSeriesPoint struct { // Timestamp is the unix time stamp of this point. // +kubebuilder:validation:Minimum=0 Timestamp int64 `json:"timestamp"` // Replicas is the desired number of online replicas from this point. // +kubebuilder:validation:Minimum=0 Replicas int32 `json:"replicas"` }
ReplicaTimeSeriesPoint represents a specific point of the time series of replicas.
func (*ReplicaTimeSeriesPoint) DeepCopy ¶
func (in *ReplicaTimeSeriesPoint) DeepCopy() *ReplicaTimeSeriesPoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaTimeSeriesPoint.
func (*ReplicaTimeSeriesPoint) DeepCopyInto ¶
func (in *ReplicaTimeSeriesPoint) DeepCopyInto(out *ReplicaTimeSeriesPoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScalingBehavior ¶
type ScalingBehavior struct { // Disabled means if the scaling of this direction is disabled. // +optional Disabled bool `json:"disabled,omitempty"` // GrayStrategy is the configuration of the strategy for gray change of replicas. // If not set, gray change will be disabled. // +optional GrayStrategy *GrayStrategy `json:"grayStrategy,omitempty"` }
ScalingBehavior defines the scaling behavior for one direction.
func (*ScalingBehavior) DeepCopy ¶
func (in *ScalingBehavior) DeepCopy() *ScalingBehavior
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalingBehavior.
func (*ScalingBehavior) DeepCopyInto ¶
func (in *ScalingBehavior) DeepCopyInto(out *ScalingBehavior)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScalingDirection ¶ added in v0.4.0
type ScalingDirection string
const ( ScalingDirectionBoth ScalingDirection = "Both" ScalingDirectionNeither ScalingDirection = "Neither" ScalingDirectionUp ScalingDirection = "Up" ScalingDirectionDown ScalingDirection = "Down" )
type StabilityChecker ¶
type StabilityChecker struct { // Type is the type of stability checker. // +kubebuilder:validation:Enum=Metrics;External Type StabilityCheckerType `json:"type"` // StabilizationAction is the action to perform in order to ensure stability // when the checker detects anomalies. // +kubebuilder:validation:Enum=Pause;Rollback StabilizationAction StabilizationActionType `json:"stabilizationAction"` // CoolDownSeconds is the cooldown time after the checker no longer detects anomalies // after which the autoscaling process will resume normal. // +optional // +kubebuilder:validation:Minimum=0 CoolDownSeconds int32 `json:"coolDownSeconds,omitempty"` // Metrics is the configuration for metrics stability checker. // +optional Metrics *MetricsStabilityChecker `json:"metrics,omitempty"` // External is the configuration for external stability checker. // +optional External *ExternalStabilityChecker `json:"external,omitempty"` }
StabilityChecker defines a stability checker which is used to ensure stability during autoscaling.
func (*StabilityChecker) DeepCopy ¶
func (in *StabilityChecker) DeepCopy() *StabilityChecker
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StabilityChecker.
func (*StabilityChecker) DeepCopyInto ¶
func (in *StabilityChecker) DeepCopyInto(out *StabilityChecker)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StabilityCheckerType ¶
type StabilityCheckerType string
const ( // MetricsStabilityCheckerType is a built-in stability checker which checks for anomalies based on metrics rules. MetricsStabilityCheckerType StabilityCheckerType = "Metrics" // ExternalStabilityCheckerType is an external stability checker. ExternalStabilityCheckerType StabilityCheckerType = "External" )
type StabilizationActionType ¶
type StabilizationActionType string
const ( // StabilizationActionPause pauses an autoscaling process. StabilizationActionPause StabilizationActionType = "Pause" // StabilizationActionRollback rollbacks an autoscaling process. StabilizationActionRollback StabilizationActionType = "Rollback" )
type StaticHorizontalPortraitData ¶
type StaticHorizontalPortraitData struct { // Replicas is the desired number of online replicas. // +kubebuilder:validation:Minimum=0 Replicas int32 `json:"replicas"` }
StaticHorizontalPortraitData defines the static portrait data.
func (*StaticHorizontalPortraitData) DeepCopy ¶
func (in *StaticHorizontalPortraitData) DeepCopy() *StaticHorizontalPortraitData
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticHorizontalPortraitData.
func (*StaticHorizontalPortraitData) DeepCopyInto ¶
func (in *StaticHorizontalPortraitData) DeepCopyInto(out *StaticHorizontalPortraitData)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StaticHorizontalPortraitProvider ¶
type StaticHorizontalPortraitProvider struct { // Replicas is the desired number of online replicas. // +kubebuilder:validation:Minimum=0 Replicas int32 `json:"replicas"` }
StaticHorizontalPortraitProvider defines a built-in horizontal portrait provider which always provides a static replicas value.
func (*StaticHorizontalPortraitProvider) DeepCopy ¶
func (in *StaticHorizontalPortraitProvider) DeepCopy() *StaticHorizontalPortraitProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticHorizontalPortraitProvider.
func (*StaticHorizontalPortraitProvider) DeepCopyInto ¶
func (in *StaticHorizontalPortraitProvider) DeepCopyInto(out *StaticHorizontalPortraitProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TimeSeriesHorizontalPortraitData ¶
type TimeSeriesHorizontalPortraitData struct { // TimeSeries is time series of replicas. // The points of the series MUST be ordered by time. // The specified replicas would take effect from that point to the next point. // Thus, the last point could last forever until the whole portrait data become expired. // +kubebuilder:validation:MinItems=1 TimeSeries []ReplicaTimeSeriesPoint `json:"timeSeries"` }
TimeSeriesHorizontalPortraitData defines the time series portrait data.
func (*TimeSeriesHorizontalPortraitData) DeepCopy ¶
func (in *TimeSeriesHorizontalPortraitData) DeepCopy() *TimeSeriesHorizontalPortraitData
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeSeriesHorizontalPortraitData.
func (*TimeSeriesHorizontalPortraitData) DeepCopyInto ¶
func (in *TimeSeriesHorizontalPortraitData) DeepCopyInto(out *TimeSeriesHorizontalPortraitData)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.