Configure HPA Auto Apply
HPA Auto Apply refers to a Horizontal Pod Autoscaler (HPA) that is automatically managed by controllers which dynamically adjusts scaling policies.
By default, HPA Auto Apply is disabled. To use it, you must enable HPA Auto Apply in your autoscaler configuration.
For event scaling with Smart Scaler agent versions 2.9.28 or earlier, each application deployment in a namespace must have its own configured HPA. Without an individual HPA, event scaling fails.
However, starting with Smart Scaler agent versions 2.9.29 and later, event scaling no longer requires an individual HPA for each application deployment.
Configure HPA Auto Apply in Autoscaler
Configure HPA Auto Apply using the hpaAutoApply
object in your autoscaler configuration
of the ss-agents-values.yaml
file.
Refer to the following hpaAutoApply
object example:
eventAutoscaler:
autoscalerProperties:
hpaAutoApply:
enabled: true # Enable/disable auto HPA feature
syncInterval: 30m # How often to sync HPA configurations; default is 30m
hpaMinReplicas: 1 # Minimum number of replicas; default is 1
hpaMaxReplicas: 10 # Maximum number of replicas; default is 10
hpaStabilizationDownWindowSeconds: 30 # Time window for downscaling stabilization; default is 30
hpaStabilizationUpWindowSeconds: 0 # Time window for upscaling stabilization; default is 0
hpaScaleDownPeriodSeconds: 60 # Minimum time between scale down operations; default is 60
hpaScaleUpPeriodSeconds: 15 # Minimum time between scale up operations; default is 15
hpaScaleDownPercentage: 10 # Maximum percentage of pods to remove in one scale down; default is 10
hpaScaleUpPercentage: 100 # Maximum percentage of pods to add in one scale up; default is 100
hpaScaleDownPods: 1 # Maximum number of pods to remove in one scale down; default is 1
hpaScaleUpPods: 4 # Maximum number of pods to add in one scale up; default is 4
hpaAutoApplyExcludeNamespaces: # List of namespaces to skip for HPA auto apply
- kube-system
- default
- istio-system
- bookinfo2
recommendationTriggerType: # The type of recommendation to trigger the HPA auto apply
rl: true # Default is rl. Can have cpu, and both cpu and rl as options
Limitations
- The HPA Auto Apply feature cannot run if the Kubernetes Prometheus Adapter is installed, as this component uses the custom.metrics.k8s.io metrics extension.
- If Auto HPA Apply is enabled, the reconcile process for HPA and KEDA scaling objects used by the event scaler is paused.