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
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
cpu | CPUScaling | — | ❌ | CPU scaling configuration. Required if gpu is not specified. |
gpu | []GPUScaling | — | ❌ | GPU scaling configuration per GPU variant. Required if cpu is not specified. |
cpuResourceBounds | CPUResourceBounds | — | ❌ | 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. |
cooldownDuration | duration | 15m | ❌ | Waiting period after a successful scaling action before the next scaling decision. |
abortDuration | duration | 30m | ❌ | 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.
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
scaleUpThreshold | integer | 80 | ❌ | Utilization percentage above which scale-up is triggered. Must be between 1 and 100. Must be greater than scaleDownThreshold. |
scaleDownThreshold | integer | 20 | ❌ | Utilization percentage below which scale-down is triggered. Must be between 0 and 99. Must be less than scaleUpThreshold. |
scaleUpDuration | duration | 5m | ❌ | Duration for which utilization must remain consistently above scaleUpThreshold before scale-up is triggered. |
scaleDownDuration | duration | 10m | ❌ | Duration for which utilization must remain consistently below scaleDownThreshold before scale-down is triggered. |
Each gpu entry also requires:
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
variant | string | — | ✅ | 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
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
minCPUCount | integer | — | ❌ | Minimum aggregate CPU count across all nodes in the pool. Must be at least 1. |
maxCPUCount | integer | — | ❌ | 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[*]
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
variant | string | — | ✅ | GPU variant identifier. Must match a variant defined in spec.gpu. |
minGPUCount | integer | — | ❌ | Minimum aggregate GPU count across all nodes for this variant. Must be at least 1. |
maxGPUCount | integer | — | ❌ | 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.