Prerequisites
The grouped workloads feature requires a minimum chart version of 5.14.0 and must be enabled in your Helm values:values.yaml
Configuration
Create a ClusterAIScaleTemplate that targets your ephemeral namespaces. Because these namespaces are created and destroyed dynamically, useexcludedNamespaces to list your persistent
namespaces and let everything else match:
ephemeral-workloads.yaml
Key settings
model.group
model.group
A string that enables grouped forecasting for the workloads created by
this template. Each AIScaleTarget still receives its own independent
recommendation based on its own metrics. A single group name for all
your ephemeral workloads is recommended.
min_lookback_to_scale
min_lookback_to_scale
How long Thoras must observe a workload before applying recommendations
in autonomous mode. The default is
24h, which is longer than most
ephemeral workloads live. Set this to 60m so recommendations become
actionable within the first hour.See model.min_lookback_to_scale
for details.forecast_buffer_percentage
forecast_buffer_percentage
Adds a fixed percentage on top of the forecasted recommendation.
Because ephemeral workloads have a shorter observation window, a
10%
buffer provides additional headroom while the forecast has less data to
work with.See model.forecast_buffer_percentage
for details.Namespace strategy
excludedNamespaces works best when your ephemeral namespaces are dynamic and
unpredictable. List your persistent namespaces (the ones that should not use
this template), and every other namespace is in scope automatically.
If your ephemeral namespaces are known ahead of time, you can use
includedNamespaces instead. See
Namespace Filtering
for details.
Existing templates
Each AIScaleTarget is owned by one template at a time. If you already have a ClusterAIScaleTemplate whose scope includes your ephemeral namespaces, you need to make the scopes disjoint before the new template can manage those workloads. First, update the existing template’s scope so it no longer covers ephemeral namespaces (e.g. switch it toincludedNamespaces listing only your persistent
namespaces). Then apply the new ephemeral template.
For workloads in existing ephemeral namespaces, you have two options:
-
Immediate: Delete the existing AIScaleTargets so the new template can
recreate them with the grouped configuration. The operator processes
finalizers through its normal reconcile loop, so this completes in minutes.
Use
-n <namespace>instead of-Aif the existing template also manages persistent workloads you want to keep. - Gradual: Leave them in place. Existing ephemeral namespaces continue with their current configuration until they are torn down. New namespaces are claimed by the ephemeral template automatically.
What to expect
After applying the template:
When an ephemeral namespace is torn down and later recreated with the same
workloads, Thoras starts fresh. New AIScaleTargets are created automatically and
the recommendation cycle begins again from the first minute.
Validating
After applying the template, verify everything is working: 1. Check that AIScaleTargets were created:group, min_lookback_to_scale, and
forecast_buffer_percentage matching your template.
3. Check for a recommendation (after 15 minutes):
hasEnoughDataToScale (after 1 hour):
true once the workload has been running for at least 1 hour
(with min_lookback_to_scale: 60m).
Transitioning to autonomous mode
Start withmode: observation to review recommendations before enabling
autonomous scaling. Once you are confident the recommendations are appropriate:
- Update the template to
mode: auto - All managed AIScaleTargets will be updated on the next reconciliation
- Thoras will begin applying recommendations automatically for workloads with
hasEnoughDataToScale: true
Related
- ClusterAIScaleTemplate: full reference for template configuration
- Choosing a Forecast Optimization Strategy: mode selection and tuning
- Enabling Autonomous Mode: prerequisites for autonomous scaling
- Configuring AIScaleTargets: manual AST configuration

