Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScaleResourceKind ¶
type ScaleResourceKind string
ScaleResourceKind describes what resource type need to scale. Only one of the following kind may be specified. If none of the following kind is specified, the default one is DeploymentScaleKind. +kubebuilder:validation:Enum=Deployment;StatefulSet;DaemonSet
const ( // DeploymentScaleKind scale Deployment kind resource. DeploymentScaleKind ScaleResourceKind = "Deployment" // StatefulSetScaleKind scale StatefulSet kind resource. StatefulSetScaleKind ScaleResourceKind = "StatefulSet" // DaemonSetScaleKind scale DaemonSet kind resource. DaemonSetScaleKind ScaleResourceKind = "DaemonSet" )
func (*ScaleResourceKind) AdaptFromProto ¶
func (srk *ScaleResourceKind) AdaptFromProto(proto enums.ResourceType) *ScaleResourceKind
func (ScaleResourceKind) AdaptToProto ¶
func (srk ScaleResourceKind) AdaptToProto() enums.ResourceType
type ScaleSource ¶
type ScaleSource string
ScaleSource describes types of source for scaling resource. If none of the following source is specified, the default one is History. +kubebuilder:validation:Enum=History
const ( // History type of source for scaling resource. History ScaleSource = "History" )
type ScaleSourceMetrics ¶
type ScaleSourceMetrics string
ScaleSourceMetrics describes types of metrics for scaling source. +kubebuilder:validation:Enum=cpu;memory;disk;network;logs +k8s:openapi-gen=true
const ( // CPU metrics for cpu usage CPU ScaleSourceMetrics = "cpu" // Memory metrics for memory usage Memory ScaleSourceMetrics = "memory" // Disk metrics for disk usage Disk ScaleSourceMetrics = "disk" // Network metrics for network usage Network ScaleSourceMetrics = "network" // Logs metrics for logs Logs ScaleSourceMetrics = "logs" )
func (*ScaleSourceMetrics) AdaptFromProto ¶
func (ssm *ScaleSourceMetrics) AdaptFromProto(proto enums.MetricsType) *ScaleSourceMetrics
func (ScaleSourceMetrics) AdaptToProto ¶
func (ssm ScaleSourceMetrics) AdaptToProto() enums.MetricsType
type ScaleSourcePeriod ¶
type ScaleSourcePeriod string
ScaleSourcePeriod describes types of period for scaling source. +kubebuilder:validation:Enum=daily;weekly;monthly +k8s:openapi-gen=true
const ( // Daily 1 day period length Daily ScaleSourcePeriod = "daily" // Weekly 1 week period length Weekly ScaleSourcePeriod = "weekly" // Monthly 1 month period length Monthly ScaleSourcePeriod = "monthly" )
func (*ScaleSourcePeriod) AdaptFromProto ¶
func (ssp *ScaleSourcePeriod) AdaptFromProto(proto enums.PeriodType) *ScaleSourcePeriod
func (ScaleSourcePeriod) AdaptToProto ¶
func (ssp ScaleSourcePeriod) AdaptToProto() enums.PeriodType
type ScaleTargetRef ¶
type ScaleTargetRef struct { // ApiVersion is API version of scale resource //+kubebuilder:default="apps/v1" ApiVersion string `json:"apiVersion"` // Specifies type of resource. // Valid values are: // - "Deployment" (default); // - "StatefulSet"; // - "DaemonSet" //+kubebuilder:default="Deployment" Kind ScaleResourceKind `json:"kind"` // Name set name of scale resource //+kubebuilder:validation:MinLength=3 //+kubebuilder:validation:MaxLength=16 Name string `json:"name"` }
type Source ¶
type Source struct { // Specifies type of source. // Valid values are: // - "History" (default) // +kubebuilder:default="History" Type ScaleSource `json:"type"` // +k8s:openapi-gen=false // +kubebuilder:validation:Type=array // +kubebuilder:object:generate=false Period []ScaleSourcePeriod `json:"period"` // +k8s:openapi-gen=false // +kubebuilder:validation:Type=array // +kubebuilder:object:generate=false Metrics []ScaleSourceMetrics `json:"metrics"` }
Source for scaling resource +k8s:openapi-gen=false +kubebuilder:object:generate=false
type Sources ¶
type Sources []Source
Sources for scaling resource
func (*Sources) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sources.
func (*Sources) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.