Documentation ¶
Overview ¶
Package scale abstracts interactions with the Kubernetes scale API, providing a consistent way to scale resources that are supported by the Custom Pod Autoscaler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scale ¶
type Scale struct { Scaler scale.ScalesGetter Config *config.Config Execute execute.Executer StabilizationEvaluations []TimestampedEvaluation }
Scale interacts with the Kubernetes API to allow scaling on evaluations
type Scaler ¶
type Scaler interface {
Scale(spec Spec) (*evaluate.Evaluation, error)
}
Scaler abstracts interactions with the Kubernetes scale API, allowing scaling based on an evaluation provided
type Spec ¶ added in v0.11.0
type Spec struct { Evaluation evaluate.Evaluation `json:"evaluation"` Resource metav1.Object `json:"resource"` ScaleTargetRef *autoscaling.CrossVersionObjectReference `json:"scaleTargetRef"` Namespace string `json:"namespace"` MinReplicas int32 `json:"minReplicas"` MaxReplicas int32 `json:"maxReplicas"` TargetReplicas int32 `json:"targetReplicas"` RunType string `json:"runType"` }
Spec defines information fed into a Scaler in order for it to make decisions as to how to scale
type TimestampedEvaluation ¶ added in v0.11.0
type TimestampedEvaluation struct { Time time.Time Evaluation evaluate.Evaluation }
TimestampedEvaluation is used to associate an evaluation with a timestamp, used in stabilizing evaluations with the downscale stabilization window
Click to show internal directories.
Click to hide internal directories.