Migration from v0.11.2 to v0.12.0
There are some minor breaking changes moving from Predictive Horizontal Pod Autoscaler v0.11.2
to v0.12.0
- this
page will detail how you can migrate between versions and handle these breaking changes.
This is split into two parts, for most users of the PHPA the only part that will apply is Migrating Predictive Horizontal Pod Autoscaler definitions, the section on Go code dependencies only applies if you have a Go project that directly depends on the Go modules exposed in this project.
Migrating Predictive Horizontal Pod Autoscaler definitions
The Predictive Horizontal Pod Autoscaler no longer has the downscaleStabilization
field, this has been replaced by
the behavior
field.
To apply downscale stabilization you can now use this behavior
field.
For example:
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
minReplicas: 1
maxReplicas: 10
downscaleStabilization: 0
Would instead be:
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
minReplicas: 1
maxReplicas: 10
behavior:
scaleDown:
stabilizationWindowSeconds: 0
Migrating Go code dependencies
The Go code no longer uses the autoscaling/v2beta2
types, instead using the autoscaling/v2
. This affects these
Go types:
CrossVersionObjectReference
in thescaleTargetRef
field.MetricSpec
in themetrics
field.MetricStatus
in thecurrentMetrics
field.
To migrate these switch from importing autoscaling/v2beta2
to importing autoscaling/v2
.
For example:
Would instead be: