HPA
StormForge integrates with Horizontal Pod Autoscalers (HPA) and can:
- Generate vertical rightsizing recommendations for HPA-managed workloads
- Preserve HPA scaling behavior when adjusting resource requests
How StormForge integrates with HPA
StormForge integrates with the HPA by adjusting HPA target utilization when Pod resource requests change.
Because HPA scaling is based on a percentage of resource requests, changing requests without adjusting target utilization changes how a workload scales.
StormForge balances vertical sizing changes with corresponding adjustments to HPA target utilization so the workload continues to scale at the same overall load level.
The HPA scale point is the average Pod resource usage level at which the HPA begins adding or removing replicas.
The scale point determines how many replicas the HPA deploys to handle a given load.
Preserving the scale point is usually the desired behavior because it maintains a workload’s horizontal scaling characteristics.
The settings in this section control how strictly StormForge preserves the scale point, and whether it may change it for idle or saturated workloads.
HPA settings
Use these settings to control how StormForge interacts with HPA-managed workloads.
- Minimum and maximum bounds for HPA target utilization
- Preserve horizontal scale point
- Ignore horizontally-scaled resources
- Ignore the HPA
Minimum and maximum bounds for HPA target utilization
Specifies the lower and upper bounds within which StormForge can set HPA target utilization.
| Annotation | Default value |
|---|---|
live.stormforge.io/hpa.cpu.target-utilization.min |
"50" |
live.stormforge.io/hpa.cpu.target-utilization.max |
"90" |
live.stormforge.io/hpa.memory.target-utilization.min |
"50" |
live.stormforge.io/hpa.memory.target-utilization.max |
"90" |
Description
These constraints prevent StormForge from recommending HPA target utilization values outside the defined bounds. CPU and memory constraints are configured separately.
These settings take effect only when:
- An HPA is enabled for a workload
- The HPA scales on CPU or memory
Valid values
- Integer strings greater than or equal to zero, for example,
"0"or"100"
Preserve horizontal scale point
Controls whether StormForge constrains resource request recommendations to maintain a stable HPA scale point.
| Annotation | Default value |
|---|---|
live.stormforge.io/hpa.preserve-horizontal-scale-point |
"False" |
Description
When StormForge adjusts resource requests for workloads with an HPA, the HPA scale point may change.
This setting controls whether, and under what circumstances, StormForge may recommend values that change the scale point, in combination with other configuration constraints such as min/max bounds for HPA target utilization.
Valid values
True
Recommendations never cause the HPA scale point to change.
Vertical sizing recommendations are constrained to values that can be balanced by corresponding adjustments to HPA target utilization without violating the configured min/max bounds for HPA target utilization.
Use this setting to preserve HPA scaling behavior in both directions. This ensures the workload scales up and down the same way it did before StormForge was enabled, but may limit some potential cost savings.
False (default)
Recommendations may cause the HPA scale point to change.
StormForge attempts to preserve the scale point for actively scaling workloads, but may change it for:
- An idle HPA that runs with
minReplicasmost or all of the time - A saturated HPA that runs with
maxReplicasmost or all of the time - A workload whose observed target utilization falls outside the configured min/max bounds for HPA target utilization
Use this setting when you want StormForge to preserve HPA scaling behavior where possible while allowing scale point changes that improve cost efficiency or reliability.
UnlessUnderProvisioned
Recommendations never reduce resource requests in a way that causes the HPA scale point to change.
StormForge may recommend increasing resource requests to correct underprovisioning, even if doing so changes the scale point.
Use this setting when you want to preserve scaling behavior in most cases, but allow scale point changes to resolve underprovisioned workloads with a saturated HPA (running at maxReplicas).
Ignore horizontally-scaled resources
Controls whether StormForge recommends changes to resource requests for resources scaled by an HPA.
| Annotation | Default value |
|---|---|
live.stormforge.io/hpa.ignore-horizontally-scaled-resources |
"False" |
Description
In some environments, you may want to disable automatic rightsizing for resources scaled by an HPA.
For example, you may want to preserve manual CPU request and HPA configuration while still allowing StormForge to rightsize memory.
When this setting is enabled, StormForge doesn’t recommend changes to resource requests for resources scaled by an HPA.
Valid values
True
StormForge doesn’t make recommendations for resources scaled by an HPA.
False (default)
StormForge may make recommendations for resources scaled by an HPA.
Ignore the HPA
Controls whether StormForge considers a workload’s HPA configuration at all when generating recommendations.
| Annotation | Default value |
|---|---|
live.stormforge.io/hpa.ignore |
"False" |
Description
Some HPAs exist only as an emergency backstop and aren’t intended to scale the workload under normal conditions. For example, an HPA with target utilization thresholds far above normal operating levels, such as 500% CPU or 500% memory, adds replicas only during extreme resource spikes.
For workloads like these, preserving the HPA scale point isn’t meaningful, and HPA-based constraints can prevent otherwise beneficial rightsizing.
When this setting is enabled, StormForge generates recommendations as if the workload has no HPA:
- Vertical rightsizing recommendations aren’t constrained by the HPA configuration.
- StormForge doesn’t recommend changes to HPA target utilization.
- The other settings in this section have no effect.
Unlike ignore horizontally-scaled resources, which prevents StormForge from changing resource requests for resources the HPA scales on, this setting removes the HPA from consideration entirely: StormForge rightsizes all resources and leaves the HPA configuration unchanged.
Valid values
True
StormForge ignores the HPA when generating recommendations for the workload.
False (default)
StormForge considers the HPA when generating recommendations for the workload.