Goal
Add sophisticated decision logic to improve cost optimization effectiveness.
Deliverables
Spot Price Volatility Detection
- Calculate rolling standard deviation of spot prices (15-minute window)
- If
spot_price_std_dev > 0.20, increase preference for stable RI/SP pricing
- Reduces cost unpredictability
Time-of-Day Patterns
- Track provisioning patterns by hour/day of week
- Learn when capacity demands spike
- Pre-emptively adjust overlays before known busy periods
Workload-Specific Tuning
Support NodePool labels:
apiVersion: karpenter.sh/v1beta1
kind: NodePool
metadata:
name: batch-jobs
labels:
cost-optimization: prefer-spot # Override for transient workloads
Capacity Forecasting
- Track RI/SP capacity utilization trends
- Predict when capacity will be exhausted
- Proactively adjust overlays before capacity runs out
Success Criteria
Testing Requirements
- Unit tests for all advanced features
- Integration tests with historical data
- A/B testing in production to validate improvements
References
- RFC-0003: Lines 383-390 (Volatility preference)
- RFC-0003: Lines 388-390 (Critical workloads)
- RFC-0003: Lines 403-407 (Transient workloads)
- RFC-0003: Lines 887-902
Goal
Add sophisticated decision logic to improve cost optimization effectiveness.
Deliverables
cost-optimization: prefer-reserved- Always prefer RI/SP when availablecost-optimization: prefer-spot- Always prefer spot for transient workloadscost-optimization: balanced- Default algorithmSpot Price Volatility Detection
spot_price_std_dev > 0.20, increase preference for stable RI/SP pricingTime-of-Day Patterns
Workload-Specific Tuning
Support NodePool labels:
Capacity Forecasting
Success Criteria
Testing Requirements
References