Skip to content

Commit 5ac2d28

Browse files
authored
Merge pull request #622 from mamy-CS/update-breaking-changes-doc
doc update for breaking changes for v0.5
2 parents eafa9ce + 2af927f commit 5ac2d28

2 files changed

Lines changed: 51 additions & 2 deletions

File tree

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,16 @@ helm upgrade workload-variant-autoscaler ./charts/workload-variant-autoscaler \
169169
### Breaking Changes
170170

171171
#### v0.5.0 (upcoming)
172-
- **VariantAutoscaling CRD**: Added `scaleTargetRef` field to explicitly specify the target deployment. If not set, the controller infers the target from the `modelID` field.
172+
- **VariantAutoscaling CRD**: Added `scaleTargetRef` field as **required**. v0.4.1 VariantAutoscaling resources without `scaleTargetRef` must be updated before upgrading:
173+
- **Impact on Scale-to-Zero**: VAs without `scaleTargetRef` will not scale to zero properly, even with HPAScaleToZero enabled and HPA `minReplicas: 0`, because the HPA cannot reference the target deployment.
174+
- **Migration**: Update existing VAs to include `scaleTargetRef`:
175+
```yaml
176+
spec:
177+
scaleTargetRef:
178+
kind: Deployment
179+
name: <your-deployment-name>
180+
```
181+
- **Validation**: After CRD update, VAs without `scaleTargetRef` will fail validation.
173182

174183
### Verifying CRD Version
175184

docs/CHANGELOG-v0.5.0.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,47 @@ query := fmt.Sprintf(`vllm_kv_cache_usage{namespace="%s"}`, escapedNamespace)
169169

170170
## Breaking Changes
171171

172-
None. This release is fully backward compatible with v0.4.x.
172+
### VariantAutoscaling CRD: Required `scaleTargetRef` Field
173+
174+
**Impact:** VariantAutoscaling resources created before v0.5.0 that do not have `scaleTargetRef` must be updated before upgrading.
175+
176+
**What Changed:**
177+
- The `scaleTargetRef` field is now **required** in the VariantAutoscaling CRD (enforced via kubebuilder validation).
178+
- The controller skips processing VAs without `scaleTargetRef.name` (see `internal/utils/variant.go`).
179+
180+
**Impact on Scale-to-Zero:**
181+
- **Critical**: v0.4.1 VAs without `scaleTargetRef` will **not scale to zero** properly, even if:
182+
- HPAScaleToZero feature gate is enabled
183+
- HPA has `minReplicas: 0` configured
184+
- Scale-to-zero is enabled in WVA configuration
185+
- This occurs because the HPA cannot properly reference the target deployment without `scaleTargetRef`.
186+
187+
**Migration Required:**
188+
1. **Before upgrading to v0.5.0**, update all existing VariantAutoscaling resources:
189+
```yaml
190+
apiVersion: llmd.ai/v1alpha1
191+
kind: VariantAutoscaling
192+
metadata:
193+
name: <your-va-name>
194+
namespace: <your-namespace>
195+
spec:
196+
scaleTargetRef:
197+
kind: Deployment
198+
name: <your-deployment-name> # Required: must match your deployment
199+
modelID: <your-model-id>
200+
```
201+
202+
2. **After CRD update**, VAs without `scaleTargetRef` will fail validation and cannot be created or updated.
203+
204+
3. **Verify your VAs** have `scaleTargetRef` before upgrading:
205+
```bash
206+
kubectl get va -A -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{"\t"}{.spec.scaleTargetRef.name}{"\n"}{end}' | grep -v "^\s*$"
207+
```
208+
209+
**Why This Change:**
210+
- Provides explicit, unambiguous target deployment reference (follows HPA pattern)
211+
- Enables proper scale-to-zero functionality with HPA
212+
- Prevents controller from skipping VAs due to missing target reference
173213

174214
## Upgrade Notes
175215

0 commit comments

Comments
 (0)