Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Controls whether to turn on the HPA for this workload. HPAEnable = "hpa.autoscaling.navigatorcloud.io/enable" // minReplicas is the lower limit for the number of replicas to which the autoscaler // can scale down. HPAMinReplicas = "hpa.autoscaling.navigatorcloud.io/minReplicas" // maxReplicas is the upper limit for the number of replicas to which the autoscaler // can scale up. HPAMaxReplicas = "hpa.autoscaling.navigatorcloud.io/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). HPAMetrics = "hpa.autoscaling.navigatorcloud.io/metrics" // The scheme of `schedule-jobs` is similar with `crontab`, create HPA resource for the // workload regularly. HPAScheduleJobs = "hpa.autoscaling.navigatorcloud.io/schedule-jobs" )
View Source
const (
CronHPAType = "hpa.autoscaling.navigatorcloud.io/hpa-type"
)
Variables ¶
View Source
var (
HPADefaultLabels = map[string]string{
"managed-by": "hpa-operator",
}
)
Functions ¶
This section is empty.
Types ¶
type CronHPA ¶
type CronHPA interface { AddJob(job apis.Job, hpa *v2beta2.HorizontalPodAutoscaler, client client.Client) error Start() Stop() Remove(job apis.Job, hpa *v2beta2.HorizontalPodAutoscaler) RemoveByJobKey(jobKey string) }
func NewCronHPA ¶
func NewCronHPA() CronHPA
type HPAOperator ¶
func NewHPAOperator ¶
Click to show internal directories.
Click to hide internal directories.