Skip to main content
Each ScaleWindow in a ScheduledScalePolicy can optionally override HPA scaling behavior during the window. All fields are optional — omitting a field means the HPA’s existing config is untouched. Original values are saved in the CRD status and restored when windows deactivate.

Fields

Speed presets

scaleUpSpeed

scaleDownSpeed

Overlapping windows

  • minReplicas: highest wins.
  • Behavior fields: the first active window (in spec order) that sets a given field wins.
  • Different fields from different windows compose — window A’s scaleUpSpeed and window B’s scaleDownSpeed both apply.

Save / restore

  • Original minReplicas/maxReplicas are stored as HPA annotations (lightweight, survives controller restarts).
  • Original HPA spec.behavior is stored as JSON in the CRD status (OriginalBehavior field) — too complex for annotations.
  • Original CPU target is stored as OriginalCPUTarget in the CRD status (-1 = the metric didn’t exist before).

Full example