Skip to main content
Version: v1.4.x

ScalingPolicy Configuration Reference

This page provides technical reference information for configuring ScalingPolicy resources. For step-by-step instructions, refer to Create and Manage Scaling Policies. For the raw resource spec, refer to the ScalingPolicy CRD documentation.

Complete ScalingPolicy Example​

A ScalingPolicy is a namespaced resource in the spectrocloud.com/v1alpha1 API group. You must specify at least one of cpu or gpu scaling configurations.

apiVersion: spectrocloud.com/v1alpha1
kind: ScalingPolicy
metadata:
name: my-combined-policy
namespace: my-project-namespace
spec:
cpu:
scaleUpThreshold: 80
scaleDownThreshold: 20
scaleUpDuration: 5m
scaleDownDuration: 10m
gpu:
- variant: 'NVIDIA H100 PCIe | 80 GB'
scaleUpThreshold: 85
scaleDownThreshold: 15
scaleUpDuration: 3m
scaleDownDuration: 8m
cpuResourceBounds:
minCPUCount: 4
maxCPUCount: 64
gpuResourceBounds:
- variant: 'NVIDIA H100 PCIe | 80 GB'
minGPUCount: 1
maxGPUCount: 16
cooldownDuration: 15m
abortDuration: 30m

spec​

FieldTypeDefaultRequiredDescription
cpuCPUScaling—❌CPU scaling configuration. Required if gpu is not specified.
gpu[]GPUScaling—❌GPU scaling configuration per GPU variant. Required if cpu is not specified.
cpuResourceBoundsCPUResourceBounds—❌Aggregate CPU count bounds across all nodes in the pool.
gpuResourceBounds[]GPUResourceBounds—❌Aggregate GPU count bounds per GPU variant. Each entry must correspond to a variant in gpu.
cooldownDurationduration15m❌Waiting period after a successful scaling action before the next scaling decision.
abortDurationduration30m❌Timeout for an ongoing scale-up operation. When exceeded, pending nodes that have not reached Healthy status are removed; nodes that provisioned successfully are retained. Scale-down operations are never aborted.

spec.cpu and spec.gpu[*]​

Both cpu and each gpu entry use the same set of scaling parameters.

FieldTypeDefaultRequiredDescription
scaleUpThresholdinteger80❌Utilization percentage above which scale-up is triggered. Must be between 1 and 100. Must be greater than scaleDownThreshold.
scaleDownThresholdinteger20❌Utilization percentage below which scale-down is triggered. Must be between 0 and 99. Must be less than scaleUpThreshold.
scaleUpDurationduration5m❌Duration for which utilization must remain consistently above scaleUpThreshold before scale-up is triggered.
scaleDownDurationduration10m❌Duration for which utilization must remain consistently below scaleDownThreshold before scale-down is triggered.

Each gpu entry also requires:

FieldTypeDefaultRequiredDescription
variantstring—✅GPU variant identifier (for example, "NVIDIA H100 PCIe | 80 GB"). GPU variants are displayed in the UI in the format "GPU model - per-GPU memory". The controller matches this value against GPU variants present on allocated hosts in the worker pool. Entries for GPU variants not present in the pool are silently ignored.

spec.cpuResourceBounds​

FieldTypeDefaultRequiredDescription
minCPUCountinteger—❌Minimum aggregate CPU count across all nodes in the pool. Must be at least 1.
maxCPUCountinteger—❌Maximum aggregate CPU count across all nodes in the pool. Must be at least 1. Must be greater than or equal to minCPUCount.

spec.gpuResourceBounds[*]​

FieldTypeDefaultRequiredDescription
variantstring—✅GPU variant identifier. Must match a variant defined in spec.gpu.
minGPUCountinteger—❌Minimum aggregate GPU count across all nodes for this variant. Must be at least 1.
maxGPUCountinteger—❌Maximum aggregate GPU count across all nodes for this variant. Must be at least 1. Must be greater than or equal to minGPUCount.

Attach a Policy to a Compute Pool​

A Compute Pool opts in to autoscaling by referencing a ScalingPolicy through scalingPolicyRef in its clusterVariant configuration. Refer to Autoscaling Configuration in the ComputePool Configuration reference for the manifest paths and scaling behavior details.